2017-06-01 13:42:28 -04:00
|
|
|
|
using System.Collections.Generic;
|
2018-04-08 14:48:40 -04:00
|
|
|
|
using System.Threading.Tasks;
|
2018-04-08 02:44:42 -04:00
|
|
|
|
using SharedLibraryCore.Services;
|
|
|
|
|
using SharedLibraryCore.Configuration;
|
2018-05-28 21:30:31 -04:00
|
|
|
|
using System.Reflection;
|
2018-11-05 22:01:29 -05:00
|
|
|
|
using SharedLibraryCore.Database.Models;
|
2019-05-08 21:34:17 -04:00
|
|
|
|
using System.Threading;
|
2019-07-16 16:27:19 -04:00
|
|
|
|
using System.Collections;
|
2017-05-26 18:49:27 -04:00
|
|
|
|
|
2018-04-08 02:44:42 -04:00
|
|
|
|
namespace SharedLibraryCore.Interfaces
|
2017-05-26 18:49:27 -04:00
|
|
|
|
{
|
|
|
|
|
public interface IManager
|
|
|
|
|
{
|
2018-03-06 02:22:19 -05:00
|
|
|
|
Task Init();
|
2019-05-08 21:34:17 -04:00
|
|
|
|
Task Start();
|
2017-05-26 18:49:27 -04:00
|
|
|
|
void Stop();
|
2019-05-08 21:34:17 -04:00
|
|
|
|
void Restart();
|
2018-11-27 19:31:48 -05:00
|
|
|
|
ILogger GetLogger(long serverId);
|
2017-09-29 22:42:24 -04:00
|
|
|
|
IList<Server> GetServers();
|
|
|
|
|
IList<Command> GetCommands();
|
2017-06-12 17:47:31 -04:00
|
|
|
|
IList<Helpers.MessageToken> GetMessageTokens();
|
2018-11-05 22:01:29 -05:00
|
|
|
|
IList<EFClient> GetActiveClients();
|
2018-03-18 22:25:11 -04:00
|
|
|
|
IConfigurationHandler<ApplicationConfiguration> GetApplicationSettings();
|
2018-03-06 02:22:19 -05:00
|
|
|
|
ClientService GetClientService();
|
2017-11-25 20:29:58 -05:00
|
|
|
|
AliasService GetAliasService();
|
|
|
|
|
PenaltyService GetPenaltyService();
|
2018-04-26 02:13:04 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the event handlers
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>EventHandler for the manager</returns>
|
|
|
|
|
IEventHandler GetEventHandler();
|
2018-05-28 21:30:31 -04:00
|
|
|
|
IList<Assembly> GetPluginAssemblies();
|
2018-08-03 18:10:20 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// provides a page list to add and remove from
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IPageList GetPageList();
|
2019-01-26 21:33:37 -05:00
|
|
|
|
IList<IRConParser> AdditionalRConParsers { get; }
|
|
|
|
|
IList<IEventParser> AdditionalEventParsers { get; }
|
2019-07-16 16:27:19 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 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
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="operationName"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IList<T>> ExecuteSharedDatabaseOperation<T>(string operationName);
|
|
|
|
|
void RegisterSharedDatabaseOperation(Task<IList> operation, string operationName);
|
2019-01-26 21:33:37 -05:00
|
|
|
|
IRConParser GenerateDynamicRConParser();
|
|
|
|
|
IEventParser GenerateDynamicEventParser();
|
2018-09-16 16:34:16 -04:00
|
|
|
|
string Version { get;}
|
2019-02-15 23:19:59 -05:00
|
|
|
|
ITokenAuthentication TokenAuthenticator { get; }
|
2019-04-08 13:29:48 -04:00
|
|
|
|
string ExternalIPAddress { get; }
|
2019-05-08 21:34:17 -04:00
|
|
|
|
CancellationToken CancellationToken { get; }
|
|
|
|
|
bool IsRestartRequested { get; }
|
2017-05-26 18:49:27 -04:00
|
|
|
|
}
|
|
|
|
|
}
|