Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
IslInterface Class Reference

#include <isl_interface.h>

Inheritance diagram for IslInterface:
[legend]
Collaboration diagram for IslInterface:
[legend]

Public Slots

void initServer ()
void initClient ()

Signals

void outputBufferChanged ()
void externalUserJoined (ServerInfo_User userInfo)
void externalUserLeft (QString userName)
void externalRoomUserJoined (int roomId, ServerInfo_User userInfo)
void externalRoomUserLeft (int roomId, QString userName)
void externalRoomSay (int roomId, QString userName, QString message)
void externalRoomGameListChanged (int roomId, ServerInfo_Game gameInfo)
void externalRoomRemoveMessages (int roomId, QString userName, int amount)
void joinGameCommandReceived (const Command_JoinGame &cmd, int cmdId, int roomId, int serverId, qint64 sessionId)
void gameCommandContainerReceived (const CommandContainer &cont, int playerId, int serverId, qint64 sessionId)
void responseReceived (const Response &resp, qint64 sessionId)
void gameEventContainerReceived (const GameEventContainer &cont, qint64 sessionId)

Public Member Functions

 IslInterface (int socketDescriptor, const QSslCertificate &cert, const QSslKey &privateKey, Servatrice *_server)
 IslInterface (int _serverId, const QString &peerHostName, const QString &peerAddress, int peerPort, const QSslCertificate &peerCert, const QSslCertificate &cert, const QSslKey &privateKey, Servatrice *_server)
 ~IslInterface ()
void transmitMessage (const IslMessage &item)

Private Slots

void readClient ()
void catchSocketError (QAbstractSocket::SocketError socketError)
void flushOutputBuffer ()

Private Member Functions

void sessionEvent_ServerCompleteList (const Event_ServerCompleteList &event)
void sessionEvent_UserJoined (const Event_UserJoined &event)
void sessionEvent_UserLeft (const Event_UserLeft &event)
void roomEvent_UserJoined (int roomId, const Event_JoinRoom &event)
void roomEvent_UserLeft (int roomId, const Event_LeaveRoom &event)
void roomEvent_Say (int roomId, const Event_RoomSay &event)
void roomEvent_ListGames (int roomId, const Event_ListGames &event)
void roomEvent_RemoveMessages (int roomId, const Event_RemoveMessages &event)
void roomCommand_JoinGame (const Command_JoinGame &cmd, int cmdId, int roomId, qint64 sessionId)
void processSessionEvent (const SessionEvent &event, qint64 sessionId)
void processRoomEvent (const RoomEvent &event)
void processRoomCommand (const CommandContainer &cont, qint64 sessionId)
void processMessage (const IslMessage &item)
void sharedCtor (const QSslCertificate &cert, const QSslKey &privateKey)

Private Attributes

int serverId
int socketDescriptor
QString peerHostName
QString peerAddress
int peerPort
QSslCertificate peerCert
QMutex outputBufferMutex
Servatriceserver
QSslSocket * socket
QByteArray inputBuffer
QByteArray outputBuffer
bool messageInProgress
int messageLength

Constructor & Destructor Documentation

◆ IslInterface() [1/2]

IslInterface::IslInterface ( int socketDescriptor,
const QSslCertificate & cert,
const QSslKey & privateKey,
Servatrice * _server )
Here is the call graph for this function:

◆ IslInterface() [2/2]

IslInterface::IslInterface ( int _serverId,
const QString & peerHostName,
const QString & peerAddress,
int peerPort,
const QSslCertificate & peerCert,
const QSslCertificate & cert,
const QSslKey & privateKey,
Servatrice * _server )
Here is the call graph for this function:

◆ ~IslInterface()

IslInterface::~IslInterface ( )
Here is the call graph for this function:

Member Function Documentation

◆ catchSocketError

void IslInterface::catchSocketError ( QAbstractSocket::SocketError socketError)
privateslot
Here is the caller graph for this function:

◆ externalRoomGameListChanged

void IslInterface::externalRoomGameListChanged ( int roomId,
ServerInfo_Game gameInfo )
signal
Here is the caller graph for this function:

◆ externalRoomRemoveMessages

void IslInterface::externalRoomRemoveMessages ( int roomId,
QString userName,
int amount )
signal
Here is the caller graph for this function:

◆ externalRoomSay

void IslInterface::externalRoomSay ( int roomId,
QString userName,
QString message )
signal
Here is the caller graph for this function:

◆ externalRoomUserJoined

void IslInterface::externalRoomUserJoined ( int roomId,
ServerInfo_User userInfo )
signal
Here is the caller graph for this function:

◆ externalRoomUserLeft

void IslInterface::externalRoomUserLeft ( int roomId,
QString userName )
signal
Here is the caller graph for this function:

◆ externalUserJoined

void IslInterface::externalUserJoined ( ServerInfo_User userInfo)
signal
Here is the caller graph for this function:

◆ externalUserLeft

void IslInterface::externalUserLeft ( QString userName)
signal
Here is the caller graph for this function:

◆ flushOutputBuffer

void IslInterface::flushOutputBuffer ( )
privateslot
Here is the caller graph for this function:

◆ gameCommandContainerReceived

void IslInterface::gameCommandContainerReceived ( const CommandContainer & cont,
int playerId,
int serverId,
qint64 sessionId )
signal
Here is the caller graph for this function:

◆ gameEventContainerReceived

void IslInterface::gameEventContainerReceived ( const GameEventContainer & cont,
qint64 sessionId )
signal
Here is the caller graph for this function:

◆ initClient

void IslInterface::initClient ( )
slot

◆ initServer

void IslInterface::initServer ( )
slot
Here is the call graph for this function:

◆ joinGameCommandReceived

void IslInterface::joinGameCommandReceived ( const Command_JoinGame & cmd,
int cmdId,
int roomId,
int serverId,
qint64 sessionId )
signal
Here is the caller graph for this function:

◆ outputBufferChanged

void IslInterface::outputBufferChanged ( )
signal
Here is the caller graph for this function:

◆ processMessage()

void IslInterface::processMessage ( const IslMessage & item)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processRoomCommand()

void IslInterface::processRoomCommand ( const CommandContainer & cont,
qint64 sessionId )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processRoomEvent()

void IslInterface::processRoomEvent ( const RoomEvent & event)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processSessionEvent()

void IslInterface::processSessionEvent ( const SessionEvent & event,
qint64 sessionId )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readClient

void IslInterface::readClient ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ responseReceived

void IslInterface::responseReceived ( const Response & resp,
qint64 sessionId )
signal
Here is the caller graph for this function:

◆ roomCommand_JoinGame()

void IslInterface::roomCommand_JoinGame ( const Command_JoinGame & cmd,
int cmdId,
int roomId,
qint64 sessionId )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ roomEvent_ListGames()

void IslInterface::roomEvent_ListGames ( int roomId,
const Event_ListGames & event )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ roomEvent_RemoveMessages()

void IslInterface::roomEvent_RemoveMessages ( int roomId,
const Event_RemoveMessages & event )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ roomEvent_Say()

void IslInterface::roomEvent_Say ( int roomId,
const Event_RoomSay & event )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ roomEvent_UserJoined()

void IslInterface::roomEvent_UserJoined ( int roomId,
const Event_JoinRoom & event )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ roomEvent_UserLeft()

void IslInterface::roomEvent_UserLeft ( int roomId,
const Event_LeaveRoom & event )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sessionEvent_ServerCompleteList()

void IslInterface::sessionEvent_ServerCompleteList ( const Event_ServerCompleteList & event)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sessionEvent_UserJoined()

void IslInterface::sessionEvent_UserJoined ( const Event_UserJoined & event)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sessionEvent_UserLeft()

void IslInterface::sessionEvent_UserLeft ( const Event_UserLeft & event)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sharedCtor()

void IslInterface::sharedCtor ( const QSslCertificate & cert,
const QSslKey & privateKey )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transmitMessage()

void IslInterface::transmitMessage ( const IslMessage & item)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ inputBuffer

QByteArray IslInterface::inputBuffer
private

◆ messageInProgress

bool IslInterface::messageInProgress
private

◆ messageLength

int IslInterface::messageLength
private

◆ outputBuffer

QByteArray IslInterface::outputBuffer
private

◆ outputBufferMutex

QMutex IslInterface::outputBufferMutex
private

◆ peerAddress

QString IslInterface::peerAddress
private

◆ peerCert

QSslCertificate IslInterface::peerCert
private

◆ peerHostName

QString IslInterface::peerHostName
private

◆ peerPort

int IslInterface::peerPort
private

◆ server

Servatrice* IslInterface::server
private

◆ serverId

int IslInterface::serverId
private

◆ socket

QSslSocket* IslInterface::socket
private

◆ socketDescriptor

int IslInterface::socketDescriptor
private

The documentation for this class was generated from the following files: