#include <C4League.h>
Public Types | |
enum | ResponseType { NoPreference , XML } |
Public Member Functions | |
C4LeagueClient () | |
const char * | getCSID () const |
C4LeagueAction | getCurrentAction () const |
void | ResetCurrentAction () |
bool | Start (const C4Network2Reference &Ref) |
bool | GetStartReply (StdStrBuf *pMessage, StdStrBuf *pLeague, StdStrBuf *pStreamingAddr, int32_t *pSeed, int32_t *pMaxPlayers) |
bool | Update (const C4Network2Reference &Ref) |
bool | GetUpdateReply (StdStrBuf *pMessage, C4ClientPlayerInfos *pPlayerLeagueInfos) |
bool | End (const C4Network2Reference &Ref, const char *szRecordName, const BYTE *pRecordSHA) |
bool | GetEndReply (StdStrBuf *pMessage, class C4RoundResultsPlayers *pRoundResults) |
bool | Auth (const C4PlayerInfo &PlrInfo, const char *szAccount, const char *szPassword, const char *szNewAccount=nullptr, const char *szNewPassword=nullptr, bool fRememberLogin=false) |
bool | GetAuthReply (StdStrBuf *pMessage, StdStrBuf *pAUID, StdStrBuf *pAccount, bool *pRegister, StdStrBuf *pLoginToken) |
bool | AuthCheck (const C4PlayerInfo &PlrInfo) |
bool | GetAuthCheckReply (StdStrBuf *pMessage, const char *szLeague, class C4PlayerInfo *pPlrInfo) |
bool | ReportDisconnect (const C4ClientPlayerInfos &rSendPlayerFBIDs, C4LeagueDisconnectReason eReason) |
bool | GetReportDisconnectReply (StdStrBuf *pMessage) |
bool | QueryReferences () |
bool | GetReferences (C4Network2Reference **&rpReferences, int32_t &rRefCount) |
bool | Init () |
bool | Query (const StdBuf &Data, bool fBinary) |
bool | Query (const char *szData, bool fBinary) |
bool | isBusy () const |
bool | isConnected () const |
bool | isSuccess () const |
size_t | getTotalSize () const |
size_t | getDownloadedSize () const |
const StdBuf & | getResultBin () const |
const char * | getResultString () const |
const char * | getURL () const |
const char * | getServerName () const |
const C4NetIO::addr_t & | getServerAddress () const |
virtual const char * | GetError () const |
void | ResetError () |
void | Cancel (const char *szReason) |
void | Clear () |
bool | SetServer (const char *szServerAddress) |
void | SetExpectedResponseType (ResponseType type) |
void | SetNotify (class C4InteractiveThread *pnNotify) |
bool | Execute (int iMaxTime=-1, pollfd *readyfds=nullptr) override |
C4TimeMilliseconds | GetNextTick (C4TimeMilliseconds tNow) override |
void | GetFDs (std::vector< struct pollfd > &) override |
bool | ExecuteUntil (int iTimeout=-1) |
bool | IsSignaled () |
virtual bool | IsLowPriority () |
virtual bool | IsNotify () |
virtual uint32_t | TimerInterval () |
Protected Member Functions | |
void | SetError (const char *strnError) |
void | Changed () |
Protected Attributes | |
StdCopyBuf | ResultBin |
StdCopyStrBuf | ResultString |
StdCopyStrBuf | Error |
Definition at line 205 of file C4League.h.
|
inherited |
|
inline |
Definition at line 214 of file C4League.h.
bool C4LeagueClient::Auth | ( | const C4PlayerInfo & | PlrInfo, |
const char * | szAccount, | ||
const char * | szPassword, | ||
const char * | szNewAccount = nullptr , |
||
const char * | szNewPassword = nullptr , |
||
bool | fRememberLogin = false |
||
) |
Definition at line 405 of file C4League.cpp.
References C4LA_PlrAuth, StdStrBuf::getData(), mkDecompileAdapt(), mkInsertAdapt(), mkNamingAdapt(), C4HTTPClient::Query(), C4LeagueRequestHead::SetAuth(), C4LeagueRequestHead::SetNewAccount(), and C4LeagueRequestHead::SetNewPassword().
Referenced by C4Network2::LeaguePlrAuth().
bool C4LeagueClient::AuthCheck | ( | const C4PlayerInfo & | PlrInfo | ) |
Definition at line 455 of file C4League.cpp.
References C4LA_PlrAuthCheck, C4PlayerInfo::getAuthID(), StdStrBuf::getData(), StdStrBuf::getLength(), mkDecompileAdapt(), mkInsertAdapt(), mkNamingAdapt(), and C4HTTPClient::Query().
Referenced by C4Network2::LeaguePlrAuthCheck().
|
inherited |
Definition at line 277 of file C4HTTP.cpp.
References C4HTTPClient::Error.
Referenced by C4HTTPClient::Clear(), C4StartupNetListEntry::Execute(), C4HTTPClient::Query(), C4DownloadDlg::UserClose(), and C4HTTPClient::~C4HTTPClient().
|
protectedinherited |
Definition at line 108 of file StdScheduler.cpp.
References s.
Referenced by C4NetIOTCP::Accept(), C4NetIOTCP::AddConnectWait(), C4NetIOUDP::AddPeer(), C4NetIOTCP::Listen(), and CStdTimerProc::SetDelay().
|
inherited |
Definition at line 290 of file C4HTTP.cpp.
References C4HTTPClient::Cancel(), StdBuf::Clear(), StdStrBuf::Clear(), C4NetIO::EndpointAddress::Clear(), C4HTTPClient::ResultBin, and C4HTTPClient::ResultString.
Referenced by C4Network2::StreamOut().
bool C4LeagueClient::End | ( | const C4Network2Reference & | Ref, |
const char * | szRecordName, | ||
const BYTE * | pRecordSHA | ||
) |
Definition at line 375 of file C4League.cpp.
References C4LA_End, StdStrBuf::getData(), StdStrBuf::getLength(), mkDecompileAdapt(), mkInsertAdapt(), mkNamingAdapt(), and C4HTTPClient::Query().
Referenced by C4Network2::LeagueEnd().
|
overridevirtualinherited |
Implements StdSchedulerProc.
Definition at line 59 of file C4HTTP.cpp.
References StdStrBuf::Copy(), C4HTTPClient::Error, Ev_HTTP_Response, StdStrBuf::getData(), C4InteractiveThread::PushEvent(), C4NetIO::HostAddress::SetHost(), and SOCKET_ERROR.
Referenced by C4DownloadDlg::OnIdle().
|
inherited |
Definition at line 33 of file StdScheduler.cpp.
References StdSchedulerProc::Execute(), and C4TimeMilliseconds::Now().
Referenced by main().
bool C4LeagueClient::GetAuthCheckReply | ( | StdStrBuf * | pMessage, |
const char * | szLeague, | ||
class C4PlayerInfo * | pPlrInfo | ||
) |
Definition at line 471 of file C4League.cpp.
References StdStrBuf::Copy(), C4LeagueResponseHead::getAccount(), C4LeagueResponseHeadAuthCheck::getClanTag(), C4LeagueResponseHead::getMessage(), C4LeagueResponseHeadAuthCheck::getProgressData(), C4LeagueResponseHeadAuthCheck::getRank(), C4LeagueResponseHeadAuthCheck::getRankSymbol(), C4LeagueResponseHeadAuthCheck::getScore(), C4LeagueResponseHead::isSuccess(), mkNamingAdapt(), C4HTTPClient::ResultString, and C4PlayerInfo::SetLeagueData().
Referenced by C4Network2::LeaguePlrAuthCheck().
bool C4LeagueClient::GetAuthReply | ( | StdStrBuf * | pMessage, |
StdStrBuf * | pAUID, | ||
StdStrBuf * | pAccount, | ||
bool * | pRegister, | ||
StdStrBuf * | pLoginToken | ||
) |
Definition at line 425 of file C4League.cpp.
References C4LeagueFBIDList::AddFBID(), StdStrBuf::Copy(), C4LeagueResponseHead::getAccount(), C4LeagueResponseHead::getAUID(), C4LeagueResponseHead::getFBID(), C4LeagueResponseHead::getLoginToken(), C4LeagueResponseHead::getMessage(), C4LeagueResponseHead::isStatusRegister(), C4LeagueResponseHead::isSuccess(), LoadResStr(), mkNamingAdapt(), StdStrBuf::Ref(), and C4HTTPClient::ResultString.
Referenced by C4Network2::LeaguePlrAuth().
|
inline |
Definition at line 215 of file C4League.h.
References StdStrBuf::getData().
|
inline |
Definition at line 216 of file C4League.h.
Referenced by C4Network2::Execute(), C4Network2::LeagueUpdateProcessReply(), and C4Network2::LeagueWaitNotBusy().
|
inlineinherited |
Definition at line 90 of file C4HTTP.h.
Referenced by C4DownloadDlg::OnIdle().
bool C4LeagueClient::GetEndReply | ( | StdStrBuf * | pMessage, |
class C4RoundResultsPlayers * | pRoundResults | ||
) |
Definition at line 390 of file C4League.cpp.
References StdStrBuf::Copy(), C4LeagueResponseHead::getMessage(), C4LeagueResponseHead::isSuccess(), mkNamingAdapt(), and C4HTTPClient::ResultString.
Referenced by C4Network2::LeagueEnd().
|
inlinevirtualinherited |
Definition at line 96 of file C4HTTP.h.
References C4HTTPClient::Error, and StdStrBuf::getData().
Referenced by C4DownloadDlg::GetError(), C4Network2::InitLeague(), C4Game::InitNetworkFromAddress(), C4Network2::LeagueEnd(), C4Network2::LeaguePlrAuthCheck(), C4Network2::LeagueStart(), C4Network2::LeagueUpdate(), C4Network2::LeagueUpdateProcessReply(), C4StartupNetListEntry::OnReference(), and C4StartupNetListEntry::SetRefQuery().
|
overridevirtualinherited |
|
overridevirtualinherited |
Reimplemented from StdSchedulerProc.
Definition at line 125 of file C4HTTP.cpp.
|
inherited |
Definition at line 292 of file C4Network2Reference.cpp.
References StdCompilerINIRead::Begin(), StdCompilerINIRead::End(), StdStrBuf::getData(), C4HTTPClient::getServerAddress(), C4HTTPClient::isBusy(), C4HTTPClient::isSuccess(), mkArrayAdaptMap(), mkNamingAdapt(), mkNamingCountAdapt(), StdCompiler::Exception::Msg, C4HTTPClient::ResetError(), C4HTTPClient::ResultString, C4HTTPClient::SetError(), StdCompilerINIRead::setInput(), and StdCompiler::Value().
Referenced by C4Game::InitNetworkFromAddress(), and C4StartupNetListEntry::OnReference().
bool C4LeagueClient::GetReportDisconnectReply | ( | StdStrBuf * | pMessage | ) |
Definition at line 500 of file C4League.cpp.
References StdStrBuf::Copy(), C4LeagueResponseHead::getMessage(), C4LeagueResponseHead::isSuccess(), mkNamingAdapt(), and C4HTTPClient::ResultString.
Referenced by C4Network2::LeagueNotifyDisconnect().
|
inlineinherited |
Definition at line 91 of file C4HTTP.h.
References C4HTTPClient::ResultBin.
Referenced by C4DownloadDlg::ShowModal().
|
inlineinherited |
Definition at line 92 of file C4HTTP.h.
References StdStrBuf::getData(), and C4HTTPClient::ResultString.
|
inlineinherited |
Definition at line 95 of file C4HTTP.h.
Referenced by C4Network2RefClient::GetReferences().
|
inlineinherited |
Definition at line 94 of file C4HTTP.h.
References StdStrBuf::getData().
Referenced by C4StartupNetListEntry::GetJoinAddress(), C4Network2::LeagueEnd(), C4Network2::LeaguePlrAuth(), C4Network2::LeagueStart(), and C4StartupNetListEntry::SetRefQuery().
bool C4LeagueClient::GetStartReply | ( | StdStrBuf * | pMessage, |
StdStrBuf * | pLeague, | ||
StdStrBuf * | pStreamingAddr, | ||
int32_t * | pSeed, | ||
int32_t * | pMaxPlayers | ||
) |
Definition at line 312 of file C4League.cpp.
References C4LA_Start, StdStrBuf::Copy(), C4LeagueResponseHead::getCSID(), C4LeagueResponseHeadStart::getLeague(), C4LeagueResponseHeadStart::getMaxPlayers(), C4LeagueResponseHead::getMessage(), C4LeagueResponseHeadStart::getSeed(), C4LeagueResponseHeadStart::getStreamingAddr(), C4LeagueResponseHeadStart::haveSeed(), C4HTTPClient::isSuccess(), C4LeagueResponseHead::isSuccess(), LoadResStr(), mkNamingAdapt(), and C4HTTPClient::ResultString.
Referenced by C4Network2::LeagueStart().
|
inlineinherited |
Definition at line 89 of file C4HTTP.h.
Referenced by C4DownloadDlg::OnIdle().
bool C4LeagueClient::GetUpdateReply | ( | StdStrBuf * | pMessage, |
C4ClientPlayerInfos * | pPlayerLeagueInfos | ||
) |
Definition at line 360 of file C4League.cpp.
References StdStrBuf::Copy(), C4LeagueResponseHead::getMessage(), C4LeagueResponseHeadUpdate::GetPlrInfos(), mkNamingAdapt(), and C4HTTPClient::ResultString.
Referenced by C4Network2::LeagueUpdateProcessReply().
|
inlineinherited |
Definition at line 93 of file C4HTTP.h.
References StdStrBuf::getData().
Referenced by C4DownloadDlg::OnIdle().
|
inherited |
Definition at line 42 of file C4HTTP.cpp.
References C4HTTPClient::SetError().
Referenced by C4StartupNetDlg::CheckVersionUpdate(), C4Network2::InitLeague(), C4Game::InitNetworkFromAddress(), C4StartupNetListEntry::SetRefQuery(), C4DownloadDlg::ShowModal(), and C4Network2::StartStreaming().
|
inlineinherited |
Definition at line 86 of file C4HTTP.h.
Referenced by C4StartupNetListEntry::Execute(), C4Network2::Execute(), C4Network2RefClient::GetReferences(), C4Network2UpdateClient::GetUpdateURL(), C4Network2UpdateClient::GetVersion(), C4Game::InitNetworkFromAddress(), C4Network2::LeagueEnd(), C4Network2::LeaguePlrAuth(), C4Network2::LeaguePlrAuthCheck(), C4Network2::LeagueStart(), C4Network2::LeagueUpdate(), C4Network2::LeagueUpdateProcessReply(), C4Network2::LeagueWaitNotBusy(), C4DownloadDlg::OnIdle(), C4StartupNetListEntry::OnReference(), and C4Network2::StreamOut().
|
inlineinherited |
Definition at line 87 of file C4HTTP.h.
Referenced by C4DownloadDlg::OnIdle().
|
inlinevirtualinherited |
Definition at line 82 of file StdScheduler.h.
|
inlinevirtualinherited |
Reimplemented in CStdNotifyProc, and C4NetIO.
Definition at line 83 of file StdScheduler.h.
|
inherited |
|
inlineinherited |
Definition at line 88 of file C4HTTP.h.
Referenced by C4Network2RefClient::GetReferences(), GetStartReply(), C4Network2UpdateClient::GetUpdateURL(), C4Network2UpdateClient::GetVersion(), C4Game::InitNetworkFromAddress(), C4Network2::LeagueEnd(), C4Network2::LeaguePlrAuthCheck(), C4Network2::LeagueStart(), C4Network2::LeagueUpdateProcessReply(), C4DownloadDlg::OnIdle(), C4StartupNetListEntry::OnReference(), and C4Network2::StreamOut().
|
inlineinherited |
Definition at line 84 of file C4HTTP.h.
References C4HTTPClient::Query(), and SLen().
Referenced by C4HTTPClient::Query().
|
inherited |
Definition at line 158 of file C4HTTP.cpp.
References C4HTTPQueryTimeout, C4HTTPClient::Cancel(), StdStrBuf::Clear(), Config, C4HTTPClient::Error, FormatString(), C4Config::General, StdBuf::getData(), StdStrBuf::getData(), StdStrBuf::getMData(), StdBuf::getSize(), StdStrBuf::isNull(), C4ConfigGeneral::LanguageEx, C4HTTPClient::ResultString, and StdStrBuf::SetLength().
Referenced by Auth(), AuthCheck(), End(), C4Network2RefClient::QueryReferences(), C4Network2UpdateClient::QueryUpdateURL(), ReportDisconnect(), C4DownloadDlg::ShowModal(), Start(), C4Network2::StreamOut(), and Update().
|
inherited |
Definition at line 286 of file C4Network2Reference.cpp.
References C4HTTPClient::Query().
Referenced by C4Game::InitNetworkFromAddress().
bool C4LeagueClient::ReportDisconnect | ( | const C4ClientPlayerInfos & | rSendPlayerFBIDs, |
C4LeagueDisconnectReason | eReason | ||
) |
Definition at line 485 of file C4League.cpp.
References C4LA_ReportDisconnect, StdStrBuf::getData(), mkInsertAdapt(), mkNamingAdapt(), and C4HTTPClient::Query().
Referenced by C4Network2::LeagueNotifyDisconnect().
|
inline |
Definition at line 217 of file C4League.h.
References C4LA_None.
Referenced by C4Network2::LeagueUpdateProcessReply().
|
inlineinherited |
Definition at line 97 of file C4HTTP.h.
References StdStrBuf::Clear(), and C4HTTPClient::Error.
Referenced by C4Network2RefClient::GetReferences().
|
inlineprotectedinherited |
Definition at line 80 of file C4HTTP.h.
References C4HTTPClient::Error.
Referenced by C4Network2RefClient::GetReferences(), C4Network2UpdateClient::GetUpdateURL(), C4Network2UpdateClient::GetVersion(), C4HTTPClient::Init(), and C4HTTPClient::SetServer().
|
inherited |
Definition at line 315 of file C4HTTP.cpp.
|
inlineinherited |
Definition at line 106 of file C4HTTP.h.
Referenced by C4StartupNetDlg::CheckVersionUpdate(), and C4StartupNetListEntry::SetRefQuery().
|
inherited |
Definition at line 298 of file C4HTTP.cpp.
References StdStrBuf::Copy(), and C4HTTPClient::SetError().
Referenced by C4StartupNetDlg::CheckVersionUpdate(), C4Network2::InitLeague(), C4Game::InitNetworkFromAddress(), C4StartupNetListEntry::SetRefQuery(), C4DownloadDlg::ShowModal(), and C4Network2::StreamOut().
bool C4LeagueClient::Start | ( | const C4Network2Reference & | Ref | ) |
Definition at line 298 of file C4League.cpp.
References C4LA_Start, StdStrBuf::getData(), mkDecompileAdapt(), mkInsertAdapt(), mkNamingAdapt(), and C4HTTPClient::Query().
Referenced by C4Network2::LeagueStart().
|
inlinevirtualinherited |
bool C4LeagueClient::Update | ( | const C4Network2Reference & | Ref | ) |
Definition at line 345 of file C4League.cpp.
References C4LA_Update, StdStrBuf::getData(), StdStrBuf::getLength(), mkDecompileAdapt(), mkInsertAdapt(), mkNamingAdapt(), and C4HTTPClient::Query().
Referenced by C4Network2::LeagueUpdate().
|
protectedinherited |
Definition at line 79 of file C4HTTP.h.
Referenced by C4HTTPClient::Cancel(), C4HTTPClient::Execute(), C4HTTPClient::GetError(), C4HTTPClient::Query(), C4HTTPClient::ResetError(), and C4HTTPClient::SetError().
|
protectedinherited |
Definition at line 77 of file C4HTTP.h.
Referenced by C4HTTPClient::Clear(), and C4HTTPClient::getResultBin().
|
protectedinherited |
Definition at line 78 of file C4HTTP.h.
Referenced by C4HTTPClient::Clear(), GetAuthCheckReply(), GetAuthReply(), GetEndReply(), C4Network2RefClient::GetReferences(), GetReportDisconnectReply(), C4HTTPClient::getResultString(), GetStartReply(), GetUpdateReply(), C4Network2UpdateClient::GetUpdateURL(), C4Network2UpdateClient::GetVersion(), and C4HTTPClient::Query().