using Microsoft.AspNetCore.SignalR.Client;
using QtCNETAPI.Dtos.User;
using QtCNETAPI.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace QtCNETAPI.Services.GatewayService
{
public interface IGatewayService
{
// VARIABLES
///
/// The Current Room The Current User Is In
///
public Room? CurrentRoom { get; }
///
/// Is The User Currently In The Lobby?
///
public bool InLobby { get; }
///
/// The Current Connection To The Gateway
///
public HubConnection? HubConnection { get; }
// FUNCTIONS
///
/// The Function Used To Connect To The Gateway Server Asynchronously
///
///
public Task StartAsync();
///
/// Stops The Connection To The Gateway Server
///
///
public Task StopAsync();
///
/// Disposes Of The Gateway Connection And Clears Other Variables
///
///
public Task DisposeAsync();
///
/// Joins The Lobby Of The Server
///
///
/// Thrown if the function is called before the connection is established.
public Task JoinLobbyAsync();
///
/// Joins The Current User To A Room On The Server
///
/// Room To Join
///
/// Thrown if the function is called before the connection is established.
public Task JoinRoomAsync(Room room);
///
/// Leaves The Current Room The Current User Is In
///
///
public Task LeaveRoomAsync();
///
/// Posts A Message To Whatever Room The User Is In
///
/// Message To Post
///
/// Thrown if the function is called before the connection is established.
public Task PostMessageAsync(Message message);
///
/// Sends A Direct Message To The Specified User
///
/// The User You Wish To DM
/// Yourself
///
///
public Task SendDirectMessageAsync(UserInformationDto user, Message message);
///
/// Updates The Status For The Current User
///
/// The Status You Want To Set On The Current User
///
public Task UpdateStatus(int status);
// EVENTS
///
/// When A Room Message Is Received, This Event Fires
///
public event EventHandler OnRoomMessageReceived;
///
/// Fires When The User List For A Room Is Received
///
public event EventHandler OnRoomUserListReceived;
///
/// Fires When The Room The User Is In Gets Deleted By An Admin
///
public event EventHandler OnRoomDeleted;
///
/// Fires When A Guest User Joins Your Room
///
public event EventHandler OnGuestUserJoin;
///
/// When A Client Function/Event Is Received, This Event Fires
///
public event EventHandler OnClientFunctionReceived;
///
/// When The Client Received A DM, This Event Fires
///
public event EventHandler OnDirectMessageReceived;
///
/// Fires When The Client Receives The Request To Refresh Its User List
///
public event EventHandler OnRefreshUserListsReceived;
///
/// Fires When The Client Receives The Request To Refresh Its Room List
///
public event EventHandler OnRefreshRoomListReceived;
///
/// Fires When The Client Receives The Request To Refresh Its Contacts List
///
public event EventHandler OnRefreshContactsListReceived;
///
/// When The Server Config Is Received, This Event Fires
///
public event EventHandler OnServerConfigReceived;
///
/// When The Connection To The Gateway Is Lost, This Event Fires
///
public event EventHandler OnServerDisconnect;
///
/// When The Connection Attempts To Reconnect, This Event Fires
///
public event EventHandler OnServerReconnecting;
///
/// When the Connection Reconnects, This Event Fires
///
public event EventHandler OnServerReconnected;
///
/// Fires When The Current User Is Signed Out By The Server
///
public event EventHandler OnUserForceLogout;
}
}