using System.Collections.Generic; using System.Threading.Tasks; using SharedLibraryCore.Database.Models; using SharedLibraryCore.Objects; using SharedLibraryCore.RCon; 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(Connection 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(Connection connection, string dvarName, object dvarValue); /// /// executes a console command on the server /// /// RCon connection to use /// console command to execute /// Task ExecuteCommandAsync(Connection connection, string command); /// /// get the list of connected clients from status response /// /// RCon connection to use /// Task> GetStatusAsync(Connection 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; } } }