using System.Collections.Generic; using System.Threading.Tasks; using SharedLibraryCore.Database.Models; using static SharedLibraryCore.Server; namespace SharedLibraryCore.Interfaces { public interface IRConParser { /// /// retrieves the value of a given DVAR /// /// type of DVAR expected (string, int, float etc...) /// RCon connection to retrieve with /// name of DVAR /// Task> GetDvarAsync(IRConConnection connection, string dvarName); /// /// set value of DVAR by name /// /// RCon connection to use /// name of DVAR to set /// value to set DVAR to /// Task SetDvarAsync(IRConConnection connection, string dvarName, object dvarValue); /// /// executes a console command on the server /// /// RCon connection to use /// console command to execute /// Task ExecuteCommandAsync(IRConConnection connection, string command); /// /// get the list of connected clients from status response /// /// RCon connection to use /// list of clients, and current map Task<(List, string)> GetStatusAsync(IRConConnection connection); /// /// stores the RCon configuration /// IRConParserConfiguration Configuration { get; set; } /// /// stores the game/client specific version (usually the value of the "version" DVAR) /// string Version { get; set; } /// /// specifies the game name (usually the internal studio iteration ie: IW4, T5 etc...) /// Game GameName { get; set; } /// /// indicates if the game supports generating a log path from DVAR retrieval /// of fs_game, fs_basepath, g_log /// bool CanGenerateLogPath { get; set; } /// /// Specifies the name of the parser /// string Name { get; set; } } }