using System.Collections.Generic; using System.Threading.Tasks; using SharedLibraryCore.Services; using SharedLibraryCore.Configuration; using SharedLibraryCore.Database.Models; using System.Threading; using System.Collections; namespace SharedLibraryCore.Interfaces { public interface IManager { Task Init(); Task Start(); void Stop(); void Restart(); ILogger GetLogger(long serverId); IList GetServers(); IList GetCommands(); IList GetMessageTokens(); IList GetActiveClients(); IConfigurationHandler GetApplicationSettings(); ClientService GetClientService(); AliasService GetAliasService(); PenaltyService GetPenaltyService(); /// /// enumerates the registered plugin instances /// IEnumerable Plugins { get; } /// /// provides a page list to add and remove from /// /// IPageList GetPageList(); IList AdditionalRConParsers { get; } IList AdditionalEventParsers { get; } /// /// provides a method to execute database operations by name without exposing the /// service level methods /// todo: this could be made obsolete by creating a seperate service library with more concrete definitions /// /// /// Task> ExecuteSharedDatabaseOperation(string operationName); void RegisterSharedDatabaseOperation(Task operation, string operationName); IMiddlewareActionHandler MiddlewareActionHandler { get; } /// /// generates an rcon parser that can be configured by script plugins /// /// name of the RCon parser /// new rcon parser instance IRConParser GenerateDynamicRConParser(string name); /// /// Generates an event parser that can be configured by script plugins /// /// name of the event parser /// new event parser instance IEventParser GenerateDynamicEventParser(string name); string Version { get;} ITokenAuthentication TokenAuthenticator { get; } string ExternalIPAddress { get; } CancellationToken CancellationToken { get; } bool IsRestartRequested { get; } bool IsRunning { get; } Task ExecuteEvent(GameEvent gameEvent); /// /// queues an event for processing /// /// event to be processed void AddEvent(GameEvent gameEvent); } }