34#ifdef VIDEO_STANDARD_PAL
36 static int sApplicationId;
50#ifdef VIDEO_STANDARD_PAL
51 return sApplicationId;
128 void Login(
MsgSink *pSink,
int nLocation,
const char *pszPassword)
override;
233 const char *pszArena,
235 int nSkillLevel)
override;
376 void SetAccount(
int nAccount,
int nChannel,
const rtNetConnectionInfo *pInfo);
495 static bool ReadNumber(
int *pnValue,
const char **ppszText,
int *pnRemaining,
int nDigits);
549 int *pnConnectionType,
551 const char *pszName);
586 static void EncodeRules(
int *pnValue,
int *pnComparison,
int nRuleSet,
int nSkillLevel);
647 return mDisconnectReason;
652 mDisconnectReason = nValue;
657 return mDisconnected;
662 mDisconnected = nValue;
672 return mDisconnectTask;
697 return mMediusConnected;
702 mMediusConnected = nValue;
712 mSessionKey = pszSessionKey;
737 mServerName = pszValue;
747 mServerPort = nValue;
752 return mServerAddress;
757 mServerAddress = pszAddress;
767 mLocationId = nValue;
772 return mJoinChatroomId;
777 mJoinChatroomId = nValue;
782 return mNewChatroomName;
787 return mNewChatroomName;
792 return mLaunchpadsPageSize;
797 return mLaunchpadsPage;
807 mLaunchpadId = nValue;
832 return mActiveFilters;
837 return mActiveFilters;
847 return mRanksPageSize;
857 return mTransferSize;
862 mTransferSize = nValue;
867 return mTransferName;
872 return mTransferBuffer;
877 mTransferBuffer = pValue;
907 return mLobbyPlayers;
912 return mLaunchpadPlayers;
917 return mRankedPlayers;
937 return mAnnouncement;
942 mAnnouncement = pszAnnouncement;
961 int mDisconnectReason;
984 int mMediusConnected;
986 rtNetKeyPair mKeyPair;
988 const char *mServerName;
991 std::list<LobbyLocation> mLocations;
996 int mLaunchpadsPageSize;
1000 std::vector<RTFilter> mFilters;
1004 int mUploadAttempts;
1007 char *mTransferBuffer;
1010 int mDeleteBeforeUpload;
1011 std::list<String> mFiles;
1015 rtNetConnectionInfo mLobbyInfo;
1017 std::set<int> mMuted;
1018 std::list<LobbyPlayer> mLobbyPlayers;
1019 std::list<LobbyPlayer> mLaunchpadPlayers;
1020 std::list<LobbyPlayer> mRankedPlayers;
1021 std::list<NetLaunchpadInfo> mLaunchpads;
1022 std::list<NetChatroomInfo> mChatrooms;
1027 std::vector<RTFilter> mActiveFilters;
1044 void ApplyMuted(std::list<LobbyPlayer> *pPlayers);
1053 void MoveLocalPlayerToFront(std::list<LobbyPlayer> *pPlayers);
1061 void MoveChatroomToFront();
1071 bool StartUpload(
MsgSink *pSink);
Saved settings and progress of one player, among them the controller bindings.
Definition campaign.h:20
Reference-counted array of script data nodes.
Definition dataarray.h:20
A player of the lobby server, as FindPlayerMsg reports it.
Definition lobbyplayer.h:16
void SetJoinChatroomId(int nValue)
Definition lobbyrt.h:776
void RequestChatrooms(MsgSink *pSink) override
Vtable slot 17.
char * GetTransferBuffer() const
Definition lobbyrt.h:871
std::list< NetLaunchpadInfo > & GetLaunchpads()
Definition lobbyrt.h:921
void SetServerAddress(const char *pszAddress)
Definition lobbyrt.h:756
void SetServerName(const char *pszValue)
Definition lobbyrt.h:736
static void ReportMediusError(int nLine, int nError)
Pass the result of a call to the lobby client to LogMediusError() of TheLobbyRT.
Definition lobbyrt.h:1124
std::list< NetChatroomInfo > & GetChatrooms()
Definition lobbyrt.h:926
int GetAccountId() override
Vtable slot 7.
const String & GetSessionKey() const
Definition lobbyrt.h:706
int GetRanksPage() const
Definition lobbyrt.h:841
const String & GetNewChatroomName() const
Definition lobbyrt.h:786
static constexpr int kApplicationId
The identifier of the game on the lobby server.
Definition lobbyrt.h:39
NetMultiTask & GetLoginTask()
Definition lobbyrt.h:676
void RequestRanks(MsgSink *pSink, int nCount, int nDirection, int nMode) override
Vtable slot 20.
static void Page(int *pnPage, int *pnPageSize, int nDirection, int nPageSize, int nLargePageSize, int nCount)
Move a page of a list.
void LogNetError(int nLine, int nError)
Record the result of a call to the peer-to-peer layer.
void Disconnect(MsgSink *pSink) override
Vtable slot 6.
void DownloadRemix(MsgSink *pSink, const char *pszName) override
Vtable slot 23.
static int LaunchpadStatusOf(int nWorldStatus)
Convert a state of a game on the lobby server to a NetLaunchpadInfo::Status.
String & GetNewChatroomName()
Definition lobbyrt.h:781
const char * GetName()
Report the name of the local player.
const char * GetPlayerStats()
Encode the record of the local player into mStatsText.
void Connect(MsgSink *pSink) override
Vtable slot 4.
void RequestFiles(MsgSink *pSink, int nRemixes) override
Vtable slot 24.
void FindPlayer(MsgSink *pSink, const char *pszName) override
Vtable slot 16.
void SetPolicy(const char *pszPolicy)
Definition lobbyrt.h:956
void UpdateStats(const LobbyPlayer *pPlayer)
Take the rating, the games, the record, and the rank of the local player after a game,...
LobbyPlayer & GetFoundPlayer()
Definition lobbyrt.h:931
std::list< LobbyPlayer > & GetLobbyPlayers()
Definition lobbyrt.h:906
NetMultiTask & GetDisconnectTask()
Definition lobbyrt.h:671
const NetChatroomInfo & GetChatroom() const
Definition lobbyrt.h:901
int GetDisconnectReason() const
Definition lobbyrt.h:646
void Login(MsgSink *pSink, int nLocation, const char *pszPassword) override
Vtable slot 5.
void RequestLaunchpadPlayers(MsgSink *pSink, int nLaunchpad) override
Vtable slot 12.
const String & GetPolicy() const
Definition lobbyrt.h:951
const String & GetNewPassword() const
Definition lobbyrt.h:816
void SetLaunchpadId(int nValue)
Definition lobbyrt.h:806
bool IsMuted(int nAccount)
Report whether an account is in mMuted.
void RequestRemixes(MsgSink *pSink) override
Vtable slot 22.
int GetDisconnected() const
Definition lobbyrt.h:656
std::vector< RTFilter > & GetFilters()
Definition lobbyrt.h:821
static void AllowUnlimitedUpload(DataArray *pCommand, void *pUserData)
The unlimited_upload script command, which lifts the limit of one upload a day.
PageDirection
Values of the direction of Page().
Definition lobbyrt.h:77
@ kPageFirst
Definition lobbyrt.h:78
@ kPageNext
Definition lobbyrt.h:79
@ kPagePrevious
Definition lobbyrt.h:81
@ kPageCurrent
Definition lobbyrt.h:80
@ kPageFirstAll
Definition lobbyrt.h:82
static void DecodeSong(NetGameParams *pParams, int nLevel)
Set the song of the settings from its number, or clear it for an unknown number.
int GetMediusConnected() const
Definition lobbyrt.h:696
void UploadRemix(MsgSink *pSink, const char *pszNote) override
Vtable slot 21.
static int sUnlimitedUpload
Non-zero once the unlimited_upload script command ran.
Definition lobbyrt.h:643
NetChatroomInfo & GetChatroom()
Definition lobbyrt.h:896
void SetDisconnectReason(int nValue)
Definition lobbyrt.h:651
static void DecodePlayer(LobbyPlayer *pPlayer, const char *pszText)
Decode the text EncodePlayer() writes.
rtNetKeyPair & GetKeyPair()
Definition lobbyrt.h:716
void AddLadderListener(MsgSink *pSink, int nAccount) override
Vtable slot 13.
void SetAccount(int nAccount, int nChannel, const rtNetConnectionInfo *pInfo)
Take the account, the chat channel, and the connection a login or a join reports.
const LobbyPlayer & GetLocalPlayer() const
Definition lobbyrt.h:886
void CreateChatroom(MsgSink *pSink, const String &name) override
Vtable slot 19.
void Fail(MsgSink *pSink, int nResult, int nReason)
Stop every request, forget the filters and the muted players, and start the chain of mDisconnectTask,...
int GetLaunchpadsPage() const
Definition lobbyrt.h:796
void SetAnnouncement(const char *pszAnnouncement)
Definition lobbyrt.h:941
const char * GetPassword()
Report the password of the local player.
std::list< LobbyPlayer > & GetLaunchpadPlayers()
Definition lobbyrt.h:911
static void ReportNetError(int nLine, int nError)
Pass the result of a call to the peer-to-peer layer to LogNetError() of TheLobbyRT.
Definition lobbyrt.h:1118
DisconnectReason
Values of mDisconnectReason, the result Poll() reports once mDisconnectTask finishes.
Definition lobbyrt.h:58
@ kReasonLogin
Definition lobbyrt.h:61
@ kReasonConnect
Definition lobbyrt.h:60
@ kReasonDisconnect
Definition lobbyrt.h:59
@ kReasonLost
Definition lobbyrt.h:62
int GetRanksPageSize() const
Definition lobbyrt.h:846
TaskList & GetTasks()
Definition lobbyrt.h:681
int GetSecure() const
Definition lobbyrt.h:721
NetMultiTask & GetConnectTask()
Definition lobbyrt.h:666
String & GetNewPassword()
Definition lobbyrt.h:811
const char * GetServerName() const
Definition lobbyrt.h:731
int GetLocationId() const
Definition lobbyrt.h:761
void Poll()
Service the library and every request, and report the finished chains.
static void DecodeGameName(NetGameParams *pParams, int *pnPlayers, int *pnConnectionType, int *pnAccountId, const char *pszName)
Decode the name EncodeGameName() writes.
void SetSecure(int nValue)
Definition lobbyrt.h:726
void SetTransferSize(int nValue)
Definition lobbyrt.h:861
int GetJoinChatroomId() const
Definition lobbyrt.h:771
LobbyPlayer & GetLocalPlayer()
Definition lobbyrt.h:881
LobbyRT()
Construct the service, read server.cfg, and build the chain of each request.
const std::vector< RTFilter > & GetActiveFilters() const
Definition lobbyrt.h:836
String & GetTransferName()
Definition lobbyrt.h:866
void SetTransferBuffer(char *pValue)
Definition lobbyrt.h:876
const String & GetServerAddress() const
Definition lobbyrt.h:751
void SetSessionKey(const char *pszSessionKey)
Definition lobbyrt.h:711
void DeleteAccount(MsgSink *pSink) override
Vtable slot 9.
void SetMuted(int nAccount, bool bMuted) override
Vtable slot 14.
void SetMediusConnected(int nValue)
Definition lobbyrt.h:701
~LobbyRT() override
Release the service.
void CreateAccount(MsgSink *pSink, const char *pszPassword) override
Vtable slot 8.
static int ApplicationId()
Report the identifier of the game on the lobby server.
Definition lobbyrt.h:49
static void EncodeGameName(String *pName, const NetGameParams *pParams, int nPlayers, int nConnectionType, int nAccountId)
Encode the settings of a game as the name the lobby server lists it by.
int GetLaunchpadsPageSize() const
Definition lobbyrt.h:791
TransferMode
Values of mTransferMode.
Definition lobbyrt.h:66
@ kTransferList
Definition lobbyrt.h:72
@ kTransferUploadDirectory
Definition lobbyrt.h:71
@ kTransferRemix
Definition lobbyrt.h:69
@ kTransferNone
Definition lobbyrt.h:67
@ kTransferDirectory
Definition lobbyrt.h:68
@ kTransferDelete
Definition lobbyrt.h:73
@ kTransferUploadRemix
Definition lobbyrt.h:70
static int ConnectionClassOf(int nType)
Convert a NetInet::GetConnectionType() value to a connection class of the lobby server.
int GetTransferSize() const
Definition lobbyrt.h:856
void SetProfile(Campaign *pProfile) override
Vtable slot 3.
void JoinChatroom(MsgSink *pSink, int nChatroomId) override
Vtable slot 18.
rtNetConnectionInfo & GetLobbyInfo()
Definition lobbyrt.h:891
void RequestLobbyPlayers(MsgSink *pSink) override
Vtable slot 11.
static void EncodePlayer(String *pText, const LobbyPlayer *pPlayer)
Encode the rating, the record, and the Freq of a player as the statistics text of the lobby server.
String & GetPolicy()
Definition lobbyrt.h:946
int GetServerPort() const
Definition lobbyrt.h:741
std::vector< RTFilter > & GetActiveFilters()
Definition lobbyrt.h:831
void UploadDirectory(MsgSink *pSink, std::list< NetRepoRemix > *pRemixes) override
Vtable slot 25.
void SetDisconnected(int nValue)
Definition lobbyrt.h:661
std::list< LobbyPlayer > & GetRankedPlayers()
Definition lobbyrt.h:916
static void EncodeRules(int *pnValue, int *pnComparison, int nRuleSet, int nSkillLevel)
Encode a game mode and a skill level as a value of the rules field and its comparison.
static bool ReadNumber(int *pnValue, const char **ppszText, int *pnRemaining, int nDigits)
Read a number of a fixed count of digits from encoded text.
void DeleteFile(MsgSink *pSink, const char *pszName) override
Vtable slot 26.
const String & GetAnnouncement() const
Definition lobbyrt.h:936
void SetLocationId(int nValue)
Definition lobbyrt.h:766
void ChangePassword(MsgSink *pSink, const char *pszOldPassword, const char *pszNewPassword) override
Vtable slot 10.
int GetRanksMode() const
Definition lobbyrt.h:851
int GetRtReady() const
Definition lobbyrt.h:686
static int ConnectionTypeOf(int nClass)
Convert a connection class of the lobby server to a LobbyPlayer::ConnectionType.
void SetServerPort(int nValue)
Definition lobbyrt.h:746
void SetRtReady(int nValue)
Definition lobbyrt.h:691
void RequestLaunchpads(MsgSink *pSink, int nStart, int nMode, const char *pszArena, int nRuleSet, int nSkillLevel) override
Vtable slot 15.
static void EncodeSong(int *pnLevel, const char *pszSong)
Encode a song as its number.
const std::vector< RTFilter > & GetFilters() const
Definition lobbyrt.h:826
void ReportProgress(float fProgress)
Send a RepoRemixStatusMsg with the progress to the running transfer.
void LogMediusError(int nLine, int nError)
Record the result of a call to the lobby client.
int GetLaunchpadId() const
Definition lobbyrt.h:801
Receiver of engine messages.
Definition msgsink.h:21
The settings of an online game that the host publishes with its session.
Definition netgameparams.h:13
NetLobby()
Construct a service with no receiver.
Definition netlobby.h:24
A request to the online library, as the NetTask steps that run one after another.
Definition netmultitask.h:14
A task that runs again a fixed time after each run ends.
Definition periodictask.h:12
Growable text buffer that is also a PrnStream.
Definition string.h:19
Tasks that run side by side until each one ends.
Definition tasklist.h:13
std::unique_ptr< LobbyRT > TheLobbyRT
The lobby service.
The description of one chat room of the online lobby.
Definition netchatroominfo.h:11