// Copyright (c) Arlo Godfrey. All Rights Reserved.
// Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms.
// See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using OwlCore.Provisos;
using StrixMusic.Sdk.CoreModels;
namespace StrixMusic.Services.CoreManagement
{
///
/// Manages added and removing core instances.
///
public interface ICoreManagementService : IAsyncInit
{
///
/// Raised when a core is added to the registry.
///
event EventHandler? CoreInstanceRegistered;
///
/// Raised when a core is removed from the registry.
///
event EventHandler? CoreInstanceUnregistered;
///
/// Gets a list of all cores that the user has set up and configured.
///
/// A that represents the asynchronous operation.
Task> GetCoreInstanceRegistryAsync();
///
/// Gets a sorted list of cores instance IDs that indicate to the user's preferred ranking.
///
/// A that represents the asynchronous operation.
public Task> GetCoreInstanceRanking();
///
/// Registers a new core instance.
///
/// The metadata for the core being registered.
/// A representing the asynchronous operation. Value is the used to uniquely identify the core instance.
Task RegisterCoreInstanceAsync(CoreMetadata coreMetadata);
///
/// Unregisters an existing core instance.
///
/// The ID of the core to remove.
/// A representing the asynchronous operation.
Task UnregisterCoreInstanceAsync(string instanceId);
///
/// Given a core instance, return the that was used to create it.
///
/// The core instance to check.
/// The metadata used to create the given .
CoreMetadata GetCoreMetadata(ICore core);
}
}