// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using System.Threading.Tasks; using osu.Game.Overlays.Notifications; namespace osu.Game.Database { /// /// A class which handles importing of associated models to the game store. /// /// The model type. public interface IModelImporter : IPostNotifications, ICanAcceptFiles where TModel : class, IHasGuidPrimaryKey { /// /// Process multiple import tasks, updating a tracking notification with progress. /// /// The notification to update. /// The import tasks. /// The imported models. Task>> Import(ProgressNotification notification, params ImportTask[] tasks); /// /// A user displayable name for the model type associated with this manager. /// string HumanisedModelName => $"{typeof(TModel).Name.Replace(@"Info", "").ToLowerInvariant()}"; /// /// Fired when the user requests to view the resulting import. /// public Action>>? PresentImport { set; } } }