using JetBrains.Annotations;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Unity;
namespace Kyoo.Controllers
{
///
/// A common interface used to discord plugins
///
[UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)]
public interface IPlugin
{
///
/// A slug to identify this plugin in queries.
///
string Slug { get; }
///
/// The name of the plugin
///
string Name { get; }
///
/// The description of this plugin. This will be displayed on the "installed plugins" page.
///
string Description { get; }
///
/// A list of services that are provided by this service. This allow other plugins to declare dependencies.
///
///
/// The format should be the name of the interface ':' and the name of the implementation.
/// For a plugins that provide a new service named IService with a default implementation named Koala, that would
/// be "IService:Koala".
///
string[] Provides { get; }
///
/// A list of services that are required by this service.
/// The Core will warn the user that this plugin can't be loaded if a required service is not found.
///
///
/// This is the same format as but you may leave a blank implementation's name if you don't need a special one.
/// For example, if you need a service named IService but you don't care what implementation it will be, you can use
/// "IService:"
///
string[] Requires { get; }
///
/// A configure method that will be run on plugin's startup.
///
/// A unity container to register new services.
/// The configuration, if you need values at config time (database connection strings...)
/// The Asp.Net application builder. On most case it is not needed but you can use it to add asp net functionalities.
/// True if the app should run in debug mode.
void Configure(IUnityContainer container, IConfiguration config, IApplicationBuilder app, bool debugMode);
}
}