#include <C4Client.h>
Public Member Functions | |
C4ClientCore () | |
~C4ClientCore () override | |
int32_t | getID () const |
bool | isHost () const |
bool | isActivated () const |
bool | isObserver () const |
bool | isLobbyReady () const |
void | SetID (int32_t inID) |
void | SetName (const char *sznName) |
void | SetActivated (bool fnActivated) |
void | SetObserver (bool fnObserver) |
void | SetLobbyReady (bool fnLobbyReady) |
const char * | getName () const |
const char * | getCUID () const |
const char * | getNick () const |
const char * | getRevision () const |
bool | isRegistered () const |
void | SetLocal (int32_t iID, bool fnActivated, bool fnObserver) |
void | SetUnknown (int32_t iID) |
int32_t | getDiffLevel (const C4ClientCore &CCore2) const |
void | CompileFunc (StdCompiler *pComp) override |
C4NetIOPacket | pack (const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const |
C4NetIOPacket | pack (uint8_t cStatus, const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const |
void | unpack (const C4NetIOPacket &Pkt, char *pStatus=nullptr) |
Protected Attributes | |
int32_t | iID {-1} |
ValidatedStdCopyStrBuf< C4InVal::VAL_NameNoEmpty > | Name |
ValidatedStdCopyStrBuf< C4InVal::VAL_NameNoEmpty > | Nick |
ValidatedStdCopyStrBuf< C4InVal::VAL_NameAllowEmpty > | CUID |
ValidatedStdCopyStrBuf< C4InVal::VAL_NameAllowEmpty > | Revision |
int | iVersion [4] |
bool | fActivated {false} |
bool | fObserver {false} |
bool | fLobbyReady {false} |
Definition at line 34 of file C4Client.h.
C4ClientCore::C4ClientCore | ( | ) |
Definition at line 31 of file C4Client.cpp.
References CUID, Name, Nick, and StdStrBuf::Ref().
|
overridedefault |
|
overridevirtual |
Implements C4PacketBase.
Definition at line 92 of file C4Client.cpp.
References C4ClientIDUnknown, CUID, fActivated, fLobbyReady, fObserver, iID, mkNamingAdapt(), Name, Nick, Revision, and StdCompiler::Value().
|
inline |
Definition at line 70 of file C4Client.h.
References CUID, and StdStrBuf::getData().
Referenced by C4Client::getCUID(), and getDiffLevel().
int32_t C4ClientCore::getDiffLevel | ( | const C4ClientCore & | CCore2 | ) | const |
Definition at line 75 of file C4Client.cpp.
References C4ClientCoreDL_Different, C4ClientCoreDL_IDChange, C4ClientCoreDL_IDMatch, C4ClientCoreDL_None, CUID, fActivated, fLobbyReady, fObserver, getCUID(), getID(), getName(), getNick(), iID, isActivated(), isLobbyReady(), isObserver(), Name, and Nick.
Referenced by C4Network2::CheckConn(), C4Network2IO::doAutoAccept(), and C4Network2IO::RemoveAutoAccept().
|
inline |
Definition at line 57 of file C4Client.h.
References iID.
Referenced by C4ClientList::Add(), C4Network2::DrawStatus(), C4Network2IOConnection::getClientID(), getDiffLevel(), C4Client::getID(), C4Network2Client::getID(), C4ClientList::getLocalID(), C4Network2::HandleConn(), C4Network2IO::HandleFwdReq(), C4Network2IO::HandlePacket(), C4Network2::Join(), and C4Network2IO::SendConnPackets().
|
inline |
Definition at line 69 of file C4Client.h.
References StdStrBuf::getData(), and Name.
Referenced by C4Network2::DrawStatus(), getDiffLevel(), C4ClientList::getLocalName(), C4Client::getName(), C4Network2Client::getName(), C4Network2::HandleConn(), and C4Network2::Join().
|
inline |
Definition at line 71 of file C4Client.h.
References StdStrBuf::getData(), and Nick.
Referenced by getDiffLevel(), and C4Client::getNick().
|
inline |
Definition at line 72 of file C4Client.h.
References StdStrBuf::getData(), and Revision.
Referenced by C4Network2::Join().
|
inline |
Definition at line 59 of file C4Client.h.
References fActivated.
Referenced by C4Network2::DrawStatus(), getDiffLevel(), C4Client::isActivated(), and C4Network2Client::isActivated().
|
inline |
Definition at line 58 of file C4Client.h.
References C4ClientIDHost, and iID.
Referenced by C4Network2::DrawStatus(), C4Network2::HostConnect(), C4Client::isHost(), and C4Network2IOConnection::isHost().
|
inline |
Definition at line 61 of file C4Client.h.
References fLobbyReady.
Referenced by getDiffLevel(), and C4Client::isLobbyReady().
|
inline |
Definition at line 60 of file C4Client.h.
References fObserver.
Referenced by C4Network2::DrawStatus(), getDiffLevel(), C4Client::isObserver(), and C4Network2Client::isObserver().
|
inline |
Definition at line 73 of file C4Client.h.
References CUID, and StdStrBuf::getLength().
Referenced by C4Client::isRegistered().
|
inherited |
Definition at line 150 of file C4Packet2.cpp.
Referenced by MkC4NetIOPacket().
|
inherited |
Definition at line 155 of file C4Packet2.cpp.
References mkDecompileAdapt(), and mkInsertAdapt().
|
inline |
Definition at line 64 of file C4Client.h.
References fActivated, and fObserver.
Referenced by C4Network2::Join(), and C4Client::SetActivated().
|
inline |
Definition at line 62 of file C4Client.h.
References iID.
Referenced by C4Network2::InitNetIO(), C4Network2::Join(), and C4Client::SetID().
|
inline |
Definition at line 66 of file C4Client.h.
References fLobbyReady.
Referenced by C4Client::SetLobbyReady().
void C4ClientCore::SetLocal | ( | int32_t | iID, |
bool | fnActivated, | ||
bool | fnObserver | ||
) |
Definition at line 38 of file C4Client.cpp.
References Application, Config, StdStrBuf::Copy(), ValidatedStdCopyStrBufBase::CopyValidated(), CUID, fActivated, fObserver, C4Config::General, StdStrBuf::getLength(), C4Config::GetRegistrationData(), C4Application::GetRevision(), iID, Name, C4Config::Network, C4ConfigNetwork::Nick, Nick, C4ConfigGeneral::Participants, and Revision.
Referenced by C4ClientList::AddLocal().
|
inline |
Definition at line 63 of file C4Client.h.
References ValidatedStdCopyStrBufBase::CopyValidated(), and Name.
Referenced by C4Network2::Join().
|
inline |
Definition at line 65 of file C4Client.h.
References fActivated, and fObserver.
Referenced by C4Network2::Join(), and C4Client::SetObserver().
void C4ClientCore::SetUnknown | ( | int32_t | iID | ) |
Definition at line 65 of file C4Client.cpp.
References CUID, fActivated, fObserver, iID, Name, Nick, StdStrBuf::Ref(), and Revision.
|
inherited |
Definition at line 160 of file C4Packet2.cpp.
References C4NetIOPacket::getPBuf(), C4NetIOPacket::getRef(), and C4NetIOPacket::getStatus().
Referenced by C4IDPacket::C4IDPacket(), and C4Network2IO::HandlePacket().
|
protected |
Definition at line 45 of file C4Client.h.
Referenced by C4ClientCore(), CompileFunc(), getCUID(), getDiffLevel(), isRegistered(), SetLocal(), and SetUnknown().
|
protected |
Definition at line 52 of file C4Client.h.
Referenced by CompileFunc(), getDiffLevel(), isActivated(), SetActivated(), SetLocal(), SetObserver(), and SetUnknown().
|
protected |
Definition at line 52 of file C4Client.h.
Referenced by CompileFunc(), getDiffLevel(), isLobbyReady(), and SetLobbyReady().
|
protected |
Definition at line 52 of file C4Client.h.
Referenced by CompileFunc(), getDiffLevel(), isObserver(), SetActivated(), SetLocal(), SetObserver(), and SetUnknown().
|
protected |
Definition at line 43 of file C4Client.h.
Referenced by CompileFunc(), getDiffLevel(), getID(), isHost(), SetID(), SetLocal(), and SetUnknown().
|
protected |
Definition at line 49 of file C4Client.h.
|
protected |
Definition at line 44 of file C4Client.h.
Referenced by C4ClientCore(), CompileFunc(), getDiffLevel(), getName(), SetLocal(), SetName(), and SetUnknown().
|
protected |
Definition at line 44 of file C4Client.h.
Referenced by C4ClientCore(), CompileFunc(), getDiffLevel(), getNick(), SetLocal(), and SetUnknown().
|
protected |
Definition at line 46 of file C4Client.h.
Referenced by CompileFunc(), getRevision(), SetLocal(), and SetUnknown().