using System;
using System.Collections.Generic;
using Artemis.Core.Events;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Models;
using RGB.NET.Core;
namespace Artemis.Core.Services.Interfaces
{
public interface IPluginService : IArtemisService, IDisposable
{
///
/// Indicates whether or not plugins are currently being loaded
///
bool LoadingPlugins { get; }
///
/// Copy built-in plugins from the executable directory to the plugins directory if the version is higher
/// (higher or equal if compiled as debug)
///
void CopyBuiltInPlugins();
///
/// Loads all installed plugins. If plugins already loaded this will reload them all
///
void LoadPlugins();
///
/// Unloads all installed plugins.
///
void UnloadPlugins();
///
/// Loads the plugin defined in the provided
///
/// The plugin info defining the plugin to load
void LoadPlugin(PluginInfo pluginInfo);
///
/// Unloads the plugin defined in the provided
///
/// The plugin info defining the plugin to unload
void UnloadPlugin(PluginInfo pluginInfo);
///
/// Finds the plugin info related to the plugin
///
/// The plugin you want to find the plugin info for
/// The plugins PluginInfo
PluginInfo GetPluginInfo(Plugin plugin);
///
/// Gets the plugin info of all loaded plugins
///
/// A list containing all the plugin info
List GetAllPluginInfo();
///
/// Finds an instance of the layer type matching the given GUID
///
/// The GUID of the layer type to find
/// An instance of the layer type
LayerType GetLayerTypeByGuid(Guid layerTypeGuid);
///
/// Finds all enabled instances of type
///
/// Either or a plugin type implementing
/// Returns a list of plug instances of type
List GetPluginsOfType() where T : Plugin;
#region Events
///
/// Occurs when a plugin has loaded
///
event EventHandler PluginLoaded;
///
/// Occurs when a plugin has been unloaded
///
event EventHandler PluginUnloaded;
///
/// Occurs when a plugin has been enabled
///
event EventHandler PluginEnabled;
///
/// Occurs when a plugin has been disabled
///
event EventHandler PluginDisabled;
#endregion
Plugin GetDevicePlugin(IRGBDevice device);
}
}