using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Data.Models;
using SharedLibraryCore.Database.Models;
namespace SharedLibraryCore.Interfaces
{
public interface IGameServer
{
///
/// kicks target on behalf of origin for given reason
///
/// reason client is being kicked
/// client to kick
/// source of kick action
/// previous penalty the kick is occuring for (if applicable)
///
Task Kick(string reason, EFClient target, EFClient origin, EFPenalty previousPenalty = null);
///
/// Execute a server command
///
/// Server command to execute
///
/// Collection of console command output lines
Task ExecuteCommandAsync(string command, CancellationToken token = default);
///
/// Set value for server dvar
///
/// Name of the server value to set
/// Value of the server value
///
///
Task SetDvarAsync(string name, object value, CancellationToken token = default);
///
/// Time the most recent match ended
///
DateTime? MatchEndTime { get; }
///
/// Time the current match started
///
DateTime? MatchStartTime { get; }
///
/// List of connected clients
///
IReadOnlyList ConnectedClients { get; }
///
/// Game code corresponding to the development studio project
///
Reference.Game GameCode { get; }
///
/// Indicates if the anticheat/custom callbacks/live radar integration is enabled
///
bool IsLegacyGameIntegrationEnabled { get; }
///
/// Unique identifier for the server (typically ip:port)
///
string Id { get; }
///
/// Network address the server is listening on
///
string ListenAddress { get; }
///
/// Network port the server is listening on
///
int ListenPort { get; }
///
/// Name of the server (hostname)
///
string ServerName { get; }
///
/// Current gametype
///
string Gametype { get; }
///
/// Game password (required to join)
///
string GamePassword { get; }
///
/// Number of private client slots
///
int PrivateClientSlots { get; }
///
/// Current map the game server is running
///
Map Map { get; }
///
/// Database id for EFServer table and references
///
long LegacyDatabaseId { get; }
}
}