OpenClonk
C4LeagueRequestHead Class Reference

#include <C4League.h>

Inheritance diagram for C4LeagueRequestHead:
[legend]

Public Member Functions

 C4LeagueRequestHead (C4LeagueAction eAction, const char *szCSID="", const char *szAUID="")
 
void SetAuth (const char *szAccount, const char *szPassword, bool fRememberLogin)
 
void SetNewAccount (const char *szNewAccount)
 
void SetNewPassword (const char *szNewPassword)
 
void CompileFunc (StdCompiler *pComp)
 

Detailed Description

Definition at line 46 of file C4League.h.

Constructor & Destructor Documentation

◆ C4LeagueRequestHead()

C4LeagueRequestHead::C4LeagueRequestHead ( C4LeagueAction  eAction,
const char *  szCSID = "",
const char *  szAUID = "" 
)
inline

Definition at line 49 of file C4League.h.

50  : eAction(eAction), CSID(szCSID), AUID(szAUID), fRememberLogin(false)
51  { }

Member Function Documentation

◆ CompileFunc()

void C4LeagueRequestHead::CompileFunc ( StdCompiler pComp)

Definition at line 27 of file C4League.cpp.

28 {
29 
31  {
32  { "Start", C4LA_Start },
33  { "Update", C4LA_Update },
34  { "End", C4LA_End },
35  { "Join", C4LA_PlrAuthCheck },
36 
37  { "", C4LA_RefQuery },
38  { "Auth", C4LA_PlrAuth },
39 
40  { "ReportDisconnect", C4LA_ReportDisconnect },
41  };
42 
43  pComp->Value(mkNamingAdapt(mkEnumAdaptT<uint8_t>(eAction, Actions), "Action", C4LA_RefQuery));
46 
47  // Auth
48  pComp->Value(mkNamingAdapt(mkParAdapt(Account, StdCompiler::RCT_All), "Account", ""));
49  pComp->Value(mkNamingAdapt(mkParAdapt(Password, StdCompiler::RCT_All), "Password", ""));
50  pComp->Value(mkNamingAdapt(mkParAdapt(NewAccount, StdCompiler::RCT_All), "NewAccount", ""));
51  pComp->Value(mkNamingAdapt(mkParAdapt(NewPassword, StdCompiler::RCT_All), "NewPassword", ""));
52  pComp->Value(mkNamingAdapt(fRememberLogin, "RememberLogin", false));
53 
54 }
@ C4LA_RefQuery
Definition: C4League.h:40
@ C4LA_PlrAuthCheck
Definition: C4League.h:38
@ C4LA_ReportDisconnect
Definition: C4League.h:43
@ C4LA_Update
Definition: C4League.h:36
@ C4LA_PlrAuth
Definition: C4League.h:41
@ C4LA_End
Definition: C4League.h:37
@ C4LA_Start
Definition: C4League.h:35
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
Definition: StdAdaptors.h:490
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:92
Definition: StdAdaptors.h:795
void Value(const T &rStruct)
Definition: StdCompiler.h:161
@ RCT_IdtfAllowEmpty
Definition: StdCompiler.h:140

References C4LA_End, C4LA_PlrAuth, C4LA_PlrAuthCheck, C4LA_RefQuery, C4LA_ReportDisconnect, C4LA_Start, C4LA_Update, mkNamingAdapt(), mkParAdapt(), StdCompiler::RCT_All, StdCompiler::RCT_IdtfAllowEmpty, and StdCompiler::Value().

Referenced by C4LeagueReportDisconnectHead::CompileFunc(), and C4LeagueRequestHeadEnd::CompileFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAuth()

void C4LeagueRequestHead::SetAuth ( const char *  szAccount,
const char *  szPassword,
bool  fRememberLogin 
)

Definition at line 56 of file C4League.cpp.

57 {
58  Account = szAccount;
59  Password = szPassword;
60  this->fRememberLogin = fRememberLogin;
61 }

Referenced by C4LeagueClient::Auth().

Here is the caller graph for this function:

◆ SetNewAccount()

void C4LeagueRequestHead::SetNewAccount ( const char *  szNewAccount)

Definition at line 63 of file C4League.cpp.

64 {
65  NewAccount = szNewAccount;
66 }

Referenced by C4LeagueClient::Auth().

Here is the caller graph for this function:

◆ SetNewPassword()

void C4LeagueRequestHead::SetNewPassword ( const char *  szNewPassword)

Definition at line 68 of file C4League.cpp.

69 {
70  NewPassword = szNewPassword;
71 }

Referenced by C4LeagueClient::Auth().

Here is the caller graph for this function:

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