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

#include <abstract_client.h>

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

Signals

void statusChanged (ClientStatus _status)
void maxPingTime (int seconds, int maxSeconds)
void roomEventReceived (const RoomEvent &event)
void gameEventContainerReceived (const GameEventContainer &event)
void serverIdentificationEventReceived (const Event_ServerIdentification &event)
void connectionClosedEventReceived (const Event_ConnectionClosed &event)
void serverShutdownEventReceived (const Event_ServerShutdown &event)
void addToListEventReceived (const Event_AddToList &event)
void removeFromListEventReceived (const Event_RemoveFromList &event)
void userJoinedEventReceived (const Event_UserJoined &event)
void userLeftEventReceived (const Event_UserLeft &event)
void serverMessageEventReceived (const Event_ServerMessage &event)
void listRoomsEventReceived (const Event_ListRooms &event)
void gameJoinedEventReceived (const Event_GameJoined &event)
void userMessageEventReceived (const Event_UserMessage &event)
void notifyUserEventReceived (const Event_NotifyUser &event)
void userInfoChanged (const ServerInfo_User &userInfo)
void buddyListReceived (const QList< ServerInfo_User > &buddyList)
void ignoreListReceived (const QList< ServerInfo_User > &ignoreList)
void replayAddedEventReceived (const Event_ReplayAdded &event)
void registerAccepted ()
void registerAcceptedNeedsActivate ()
void activateAccepted ()
void sigQueuePendingCommand (PendingCommand *pend)

Public Member Functions

 AbstractClient (QObject *parent=nullptr)
 ~AbstractClient () override
ClientStatus getStatus () const
void sendCommand (const CommandContainer &cont)
void sendCommand (PendingCommand *pend)
bool getServerSupportsPasswordHash () const
const QString & getUserName () const

Static Public Member Functions

static PendingCommandprepareSessionCommand (const ::google::protobuf::Message &cmd)
static PendingCommandprepareRoomCommand (const ::google::protobuf::Message &cmd, int roomId)
static PendingCommandprepareModeratorCommand (const ::google::protobuf::Message &cmd)
static PendingCommandprepareAdminCommand (const ::google::protobuf::Message &cmd)

Public Attributes

QMap< QString, bool > clientFeatures

Protected Slots

void processProtocolItem (const ServerMessage &item)

Protected Member Functions

void setStatus (ClientStatus _status)
int getNewCmdId ()
virtual void sendCommandContainer (const CommandContainer &cont)=0

Protected Attributes

QMap< int, PendingCommand * > pendingCommands
QString userName
QString password
QString email
QString country
QString realName
QString token
bool serverSupportsPasswordHash

Private Slots

void queuePendingCommand (PendingCommand *pend)

Private Attributes

int nextCmdId
QMutex clientMutex
ClientStatus status

Constructor & Destructor Documentation

◆ AbstractClient()

AbstractClient::AbstractClient ( QObject * parent = nullptr)
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~AbstractClient()

AbstractClient::~AbstractClient ( )
override

Member Function Documentation

◆ activateAccepted

void AbstractClient::activateAccepted ( )
signal
Here is the caller graph for this function:

◆ addToListEventReceived

void AbstractClient::addToListEventReceived ( const Event_AddToList & event)
signal
Here is the caller graph for this function:

◆ buddyListReceived

void AbstractClient::buddyListReceived ( const QList< ServerInfo_User > & buddyList)
signal
Here is the caller graph for this function:

◆ connectionClosedEventReceived

void AbstractClient::connectionClosedEventReceived ( const Event_ConnectionClosed & event)
signal
Here is the caller graph for this function:

◆ gameEventContainerReceived

void AbstractClient::gameEventContainerReceived ( const GameEventContainer & event)
signal
Here is the caller graph for this function:

◆ gameJoinedEventReceived

void AbstractClient::gameJoinedEventReceived ( const Event_GameJoined & event)
signal
Here is the caller graph for this function:

◆ getNewCmdId()

int AbstractClient::getNewCmdId ( )
inlineprotected
Here is the caller graph for this function:

◆ getServerSupportsPasswordHash()

bool AbstractClient::getServerSupportsPasswordHash ( ) const
inline

◆ getStatus()

ClientStatus AbstractClient::getStatus ( ) const
inline
Here is the caller graph for this function:

◆ getUserName()

const QString & AbstractClient::getUserName ( ) const
inline

◆ ignoreListReceived

void AbstractClient::ignoreListReceived ( const QList< ServerInfo_User > & ignoreList)
signal
Here is the caller graph for this function:

◆ listRoomsEventReceived

void AbstractClient::listRoomsEventReceived ( const Event_ListRooms & event)
signal
Here is the caller graph for this function:

◆ maxPingTime

void AbstractClient::maxPingTime ( int seconds,
int maxSeconds )
signal
Here is the caller graph for this function:

◆ notifyUserEventReceived

void AbstractClient::notifyUserEventReceived ( const Event_NotifyUser & event)
signal
Here is the caller graph for this function:

◆ prepareAdminCommand()

PendingCommand * AbstractClient::prepareAdminCommand ( const ::google::protobuf::Message & cmd)
static
Here is the caller graph for this function:

◆ prepareModeratorCommand()

PendingCommand * AbstractClient::prepareModeratorCommand ( const ::google::protobuf::Message & cmd)
static

◆ prepareRoomCommand()

PendingCommand * AbstractClient::prepareRoomCommand ( const ::google::protobuf::Message & cmd,
int roomId )
static
Here is the caller graph for this function:

◆ prepareSessionCommand()

PendingCommand * AbstractClient::prepareSessionCommand ( const ::google::protobuf::Message & cmd)
static
Here is the caller graph for this function:

◆ processProtocolItem

void AbstractClient::processProtocolItem ( const ServerMessage & item)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ queuePendingCommand

void AbstractClient::queuePendingCommand ( PendingCommand * pend)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerAccepted

void AbstractClient::registerAccepted ( )
signal
Here is the caller graph for this function:

◆ registerAcceptedNeedsActivate

void AbstractClient::registerAcceptedNeedsActivate ( )
signal
Here is the caller graph for this function:

◆ removeFromListEventReceived

void AbstractClient::removeFromListEventReceived ( const Event_RemoveFromList & event)
signal
Here is the caller graph for this function:

◆ replayAddedEventReceived

void AbstractClient::replayAddedEventReceived ( const Event_ReplayAdded & event)
signal
Here is the caller graph for this function:

◆ roomEventReceived

void AbstractClient::roomEventReceived ( const RoomEvent & event)
signal
Here is the caller graph for this function:

◆ sendCommand() [1/2]

void AbstractClient::sendCommand ( const CommandContainer & cont)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendCommand() [2/2]

void AbstractClient::sendCommand ( PendingCommand * pend)
Here is the call graph for this function:

◆ sendCommandContainer()

virtual void AbstractClient::sendCommandContainer ( const CommandContainer & cont)
protectedpure virtual

Implemented in LocalClient.

Here is the caller graph for this function:

◆ serverIdentificationEventReceived

void AbstractClient::serverIdentificationEventReceived ( const Event_ServerIdentification & event)
signal
Here is the caller graph for this function:

◆ serverMessageEventReceived

void AbstractClient::serverMessageEventReceived ( const Event_ServerMessage & event)
signal
Here is the caller graph for this function:

◆ serverShutdownEventReceived

void AbstractClient::serverShutdownEventReceived ( const Event_ServerShutdown & event)
signal
Here is the caller graph for this function:

◆ setStatus()

void AbstractClient::setStatus ( ClientStatus _status)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sigQueuePendingCommand

void AbstractClient::sigQueuePendingCommand ( PendingCommand * pend)
signal
Here is the caller graph for this function:

◆ statusChanged

void AbstractClient::statusChanged ( ClientStatus _status)
signal
Here is the caller graph for this function:

◆ userInfoChanged

void AbstractClient::userInfoChanged ( const ServerInfo_User & userInfo)
signal
Here is the caller graph for this function:

◆ userJoinedEventReceived

void AbstractClient::userJoinedEventReceived ( const Event_UserJoined & event)
signal
Here is the caller graph for this function:

◆ userLeftEventReceived

void AbstractClient::userLeftEventReceived ( const Event_UserLeft & event)
signal
Here is the caller graph for this function:

◆ userMessageEventReceived

void AbstractClient::userMessageEventReceived ( const Event_UserMessage & event)
signal
Here is the caller graph for this function:

Member Data Documentation

◆ clientFeatures

QMap<QString, bool> AbstractClient::clientFeatures

◆ clientMutex

QMutex AbstractClient::clientMutex
mutableprivate

◆ country

QString AbstractClient::country
protected

◆ email

QString AbstractClient::email
protected

◆ nextCmdId

int AbstractClient::nextCmdId
private

◆ password

QString AbstractClient::password
protected

◆ pendingCommands

QMap<int, PendingCommand *> AbstractClient::pendingCommands
protected

◆ realName

QString AbstractClient::realName
protected

◆ serverSupportsPasswordHash

bool AbstractClient::serverSupportsPasswordHash
protected

◆ status

ClientStatus AbstractClient::status
private

◆ token

QString AbstractClient::token
protected

◆ userName

QString AbstractClient::userName
protected

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