|
wavelength 1.0.0
|
The online lobby service on the SCE-RT lobby server. More...
#include <lobbyrt.h>


Public Types | |
| enum | DisconnectReason { kReasonDisconnect = 0 , kReasonConnect = 1 , kReasonLogin = 2 , kReasonLost = 3 } |
| Values of mDisconnectReason, the result Poll() reports once mDisconnectTask finishes. More... | |
| enum | TransferMode { kTransferNone = 0 , kTransferDirectory = 1 , kTransferRemix = 2 , kTransferUploadRemix = 3 , kTransferUploadDirectory = 4 , kTransferList = 5 , kTransferDelete = 6 } |
| Values of mTransferMode. More... | |
| enum | PageDirection { kPageFirst = 0 , kPageNext = 1 , kPageCurrent = 2 , kPagePrevious = 3 , kPageFirstAll = 4 } |
| Values of the direction of Page(). More... | |
Public Member Functions | |
| LobbyRT () | |
| Construct the service, read server.cfg, and build the chain of each request. | |
| ~LobbyRT () override | |
| Release the service. | |
| void | SetProfile (Campaign *pProfile) override |
| Vtable slot 3. | |
| void | Connect (MsgSink *pSink) override |
| Vtable slot 4. | |
| void | Login (MsgSink *pSink, int nLocation, const char *pszPassword) override |
| Vtable slot 5. | |
| void | Disconnect (MsgSink *pSink) override |
| Vtable slot 6. | |
| int | GetAccountId () override |
| Vtable slot 7. | |
| void | CreateAccount (MsgSink *pSink, const char *pszPassword) override |
| Vtable slot 8. | |
| void | DeleteAccount (MsgSink *pSink) override |
| Vtable slot 9. | |
| void | ChangePassword (MsgSink *pSink, const char *pszOldPassword, const char *pszNewPassword) override |
| Vtable slot 10. | |
| void | RequestLobbyPlayers (MsgSink *pSink) override |
| Vtable slot 11. | |
| void | RequestLaunchpadPlayers (MsgSink *pSink, int nLaunchpad) override |
| Vtable slot 12. | |
| void | AddLadderListener (MsgSink *pSink, int nAccount) override |
| Vtable slot 13. | |
| void | SetMuted (int nAccount, bool bMuted) override |
| Vtable slot 14. | |
| void | RequestLaunchpads (MsgSink *pSink, int nStart, int nMode, const char *pszArena, int nRuleSet, int nSkillLevel) override |
| Vtable slot 15. | |
| void | FindPlayer (MsgSink *pSink, const char *pszName) override |
| Vtable slot 16. | |
| void | RequestChatrooms (MsgSink *pSink) override |
| Vtable slot 17. | |
| void | JoinChatroom (MsgSink *pSink, int nChatroomId) override |
| Vtable slot 18. | |
| void | CreateChatroom (MsgSink *pSink, const String &name) override |
| Vtable slot 19. | |
| void | RequestRanks (MsgSink *pSink, int nCount, int nDirection, int nMode) override |
| Vtable slot 20. | |
| void | UploadRemix (MsgSink *pSink, const char *pszNote) override |
| Vtable slot 21. | |
| void | RequestRemixes (MsgSink *pSink) override |
| Vtable slot 22. | |
| void | DownloadRemix (MsgSink *pSink, const char *pszName) override |
| Vtable slot 23. | |
| void | RequestFiles (MsgSink *pSink, int nRemixes) override |
| Vtable slot 24. | |
| void | UploadDirectory (MsgSink *pSink, std::list< NetRepoRemix > *pRemixes) override |
| Vtable slot 25. | |
| void | DeleteFile (MsgSink *pSink, const char *pszName) override |
| Vtable slot 26. | |
| void | Poll () |
| Service the library and every request, and report the finished chains. | |
| void | Fail (MsgSink *pSink, int nResult, int nReason) |
| Stop every request, forget the filters and the muted players, and start the chain of mDisconnectTask, which reports nResult as nReason requires. | |
| 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 char * | GetName () |
| Report the name of the local player. | |
| const char * | GetPassword () |
| Report the password of the local player. | |
| const char * | GetPlayerStats () |
| Encode the record of the local player into mStatsText. | |
| void | UpdateStats (const LobbyPlayer *pPlayer) |
| Take the rating, the games, the record, and the rank of the local player after a game, and add an AccountUpdateStatsTask to mTasks when any of them changed. | |
| bool | IsMuted (int nAccount) |
| Report whether an account is in mMuted. | |
| void | LogNetError (int nLine, int nError) |
| Record the result of a call to the peer-to-peer layer. | |
| void | LogMediusError (int nLine, int nError) |
| Record the result of a call to the lobby client. | |
| void | ReportProgress (float fProgress) |
| Send a RepoRemixStatusMsg with the progress to the running transfer. | |
| int | GetDisconnectReason () const |
| void | SetDisconnectReason (int nValue) |
| int | GetDisconnected () const |
| void | SetDisconnected (int nValue) |
| NetMultiTask & | GetConnectTask () |
| NetMultiTask & | GetDisconnectTask () |
| NetMultiTask & | GetLoginTask () |
| TaskList & | GetTasks () |
| int | GetRtReady () const |
| void | SetRtReady (int nValue) |
| int | GetMediusConnected () const |
| void | SetMediusConnected (int nValue) |
| const String & | GetSessionKey () const |
| void | SetSessionKey (const char *pszSessionKey) |
| rtNetKeyPair & | GetKeyPair () |
| int | GetSecure () const |
| void | SetSecure (int nValue) |
| const char * | GetServerName () const |
| void | SetServerName (const char *pszValue) |
| int | GetServerPort () const |
| void | SetServerPort (int nValue) |
| const String & | GetServerAddress () const |
| void | SetServerAddress (const char *pszAddress) |
| int | GetLocationId () const |
| void | SetLocationId (int nValue) |
| int | GetJoinChatroomId () const |
| void | SetJoinChatroomId (int nValue) |
| String & | GetNewChatroomName () |
| const String & | GetNewChatroomName () const |
| int | GetLaunchpadsPageSize () const |
| int | GetLaunchpadsPage () const |
| int | GetLaunchpadId () const |
| void | SetLaunchpadId (int nValue) |
| String & | GetNewPassword () |
| const String & | GetNewPassword () const |
| std::vector< RTFilter > & | GetFilters () |
| const std::vector< RTFilter > & | GetFilters () const |
| std::vector< RTFilter > & | GetActiveFilters () |
| const std::vector< RTFilter > & | GetActiveFilters () const |
| int | GetRanksPage () const |
| int | GetRanksPageSize () const |
| int | GetRanksMode () const |
| int | GetTransferSize () const |
| void | SetTransferSize (int nValue) |
| String & | GetTransferName () |
| char * | GetTransferBuffer () const |
| void | SetTransferBuffer (char *pValue) |
| LobbyPlayer & | GetLocalPlayer () |
| const LobbyPlayer & | GetLocalPlayer () const |
| rtNetConnectionInfo & | GetLobbyInfo () |
| NetChatroomInfo & | GetChatroom () |
| const NetChatroomInfo & | GetChatroom () const |
| std::list< LobbyPlayer > & | GetLobbyPlayers () |
| std::list< LobbyPlayer > & | GetLaunchpadPlayers () |
| std::list< LobbyPlayer > & | GetRankedPlayers () |
| std::list< NetLaunchpadInfo > & | GetLaunchpads () |
| std::list< NetChatroomInfo > & | GetChatrooms () |
| LobbyPlayer & | GetFoundPlayer () |
| const String & | GetAnnouncement () const |
| void | SetAnnouncement (const char *pszAnnouncement) |
| String & | GetPolicy () |
| const String & | GetPolicy () const |
| void | SetPolicy (const char *pszPolicy) |
| Public Member Functions inherited from NetLobby | |
| NetLobby () | |
| Construct a service with no receiver. | |
| virtual | ~NetLobby () |
| Release the service. | |
| virtual void | SetSink (MsgSink *pSink) |
| Make a sink the receiver of the lobby's result messages. | |
| MsgSink * | GetSink () const |
Static Public Member Functions | |
| static int | ApplicationId () |
| Report the identifier of the game on the lobby server. | |
| static void | ReportNetError (int nLine, int nError) |
| Pass the result of a call to the peer-to-peer layer to LogNetError() of TheLobbyRT. | |
| static void | ReportMediusError (int nLine, int nError) |
| Pass the result of a call to the lobby client to LogMediusError() of TheLobbyRT. | |
| static void | AllowUnlimitedUpload (DataArray *pCommand, void *pUserData) |
| The unlimited_upload script command, which lifts the limit of one upload a day. | |
| static bool | ReadNumber (int *pnValue, const char **ppszText, int *pnRemaining, int nDigits) |
| Read a number of a fixed count of digits from encoded text. | |
| static int | ConnectionTypeOf (int nClass) |
| Convert a connection class of the lobby server to a LobbyPlayer::ConnectionType. | |
| static int | ConnectionClassOf (int nType) |
| Convert a NetInet::GetConnectionType() value to a connection class of the lobby server. | |
| 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. | |
| static void | DecodeGameName (NetGameParams *pParams, int *pnPlayers, int *pnConnectionType, int *pnAccountId, const char *pszName) |
| Decode the name EncodeGameName() writes. | |
| 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. | |
| static void | DecodePlayer (LobbyPlayer *pPlayer, const char *pszText) |
| Decode the text EncodePlayer() writes. | |
| 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 void | EncodeSong (int *pnLevel, const char *pszSong) |
| Encode a song as its number. | |
| static void | DecodeSong (NetGameParams *pParams, int nLevel) |
| Set the song of the settings from its number, or clear it for an unknown number. | |
| static int | LaunchpadStatusOf (int nWorldStatus) |
| Convert a state of a game on the lobby server to a NetLaunchpadInfo::Status. | |
| static void | Page (int *pnPage, int *pnPageSize, int nDirection, int nPageSize, int nLargePageSize, int nCount) |
| Move a page of a list. | |
Static Public Attributes | |
| static constexpr int | kApplicationId = 10164 |
| The identifier of the game on the lobby server. | |
| static int | sUnlimitedUpload |
| Non-zero once the unlimited_upload script command ran. | |
The online lobby service on the SCE-RT lobby server.
The RTTI includes the name and records NetLobby as the base. The vtable is at 0x003d4e78 and the object is 0x690 bytes. Each request of NetLobby runs as a chain of steps in a NetMultiTask, and Poll() reports each finished chain to its receiver. The names of the members are inferred.
Values of mDisconnectReason, the result Poll() reports once mDisconnectTask finishes.
| Enumerator | |
|---|---|
| kReasonDisconnect | |
| kReasonConnect | A failed LobbyConnectResultMsg. |
| kReasonLogin | A failed LoginResultMsg. |
| kReasonLost | |
Values of mTransferMode.
Values of the direction of Page().
| LobbyRT::LobbyRT | ( | ) |
Construct the service, read server.cfg, and build the chain of each request.
|
override |
Release the service.
|
inlinestatic |
Report the identifier of the game on the lobby server.
Inline at each use.
|
overridevirtual |
Vtable slot 3.
Take the name and the Freq of the local player, and forget the password.
| pProfile | The profile of the player. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 4.
Start the chain of mConnectTask.
| pSink | The receiver of the LobbyConnectResultMsg. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 5.
Reset the record of the local player and start the chain of mLoginTask.
| pSink | The receiver of the LoginResultMsg. |
| nLocation | The identifier of the lobby location. |
| pszPassword | The password. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 6.
Stop every request and start the chain of mDisconnectTask.
| pSink | The receiver of the LobbyDisconnectResultMsg. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 7.
Report the account of the local player.
Implements NetLobby.
|
overridevirtual |
Vtable slot 8.
Start the chain of mCreateAccountTask.
| pSink | The receiver of the CreateAccountResultMsg. |
| pszPassword | The password of the account. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 9.
Start the chain of mDeleteAccountTask.
| pSink | The receiver of the DeleteAccountResultMsg. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 10.
Start the chain of mChangePasswordTask.
| pSink | The receiver of the ChangePasswordResultMsg. |
| pszOldPassword | The current password. |
| pszNewPassword | The new password. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 11.
Start the chain of mLobbyPlayersTask.
| pSink | The receiver of the LobbyPlayersMsg. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 12.
Start the chain of mLaunchpadPlayersTask unless it is running.
| pSink | The receiver of the LobbyPlayersMsg. |
| nLaunchpad | The identifier of the launchpad. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 13.
Add a LadderPosition2Task to mTasks.
| pSink | The receiver of the PlayerRankMsg. |
| nAccount | The account of the player. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 14.
Add an account to mMuted or remove it.
| nAccount | The account of the player. |
| bMuted | Whether the player is muted. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 15.
Build mFilters and start the chain of mLaunchpadsTask.
| pSink | The receiver of the LobbyLaunchpadsMsg. |
| nStart | One of PageDirection. |
| nMode | Non-zero to list the launchpads of the current chat room only. |
| pszArena | The song of the search, or an empty string for any. |
| nRuleSet | The game mode of the search, or 0 for any. |
| nSkillLevel | The skill level of the search, or -1 for any. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 16.
Start the chain of mFindPlayerTask.
| pSink | The receiver of the FindPlayerMsg. |
| pszName | The name of the player. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 17.
Start the chain of mChatroomsTask.
| pSink | The receiver of the LobbyChatroomsMsg. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 18.
Start the chain of mJoinChatroomTask.
| pSink | The receiver of the JoinChatroomResultMsg. |
| nChatroomId | The identifier of the room. |
Implements NetLobby.
Vtable slot 19.
Start the chain of mCreateChatroomTask.
| pSink | The receiver of the JoinChatroomResultMsg. |
| name | The name of the chat room. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 20.
Start the chain of mRanksTask unless it is running.
| pSink | The receiver of the LobbyPlayersMsg. |
| nCount | The players of a page. |
| nDirection | One of PageDirection. |
| nMode | Non-zero to list the ranking without the details of the players. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 21.
Upload the current remix with a note, once a day.
| pSink | The receiver of the RepoRemixStatusMsg. |
| pszNote | The note of the remix. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 22.
Start downloading the remix directory.
| pSink | The receiver of the RepoRemixesMsg. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 23.
Start downloading a remix.
| pSink | The receiver of the RepoRemixStatusMsg and the RemixDownloadMsg. |
| pszName | The file of the remix. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 24.
Start the chain of mFileListTask.
| pSink | The receiver of the FileListMsg. |
| nRemixes | Non-zero to list only the files whose names begin with r_. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 25.
Write the remix directory to a buffer and start uploading it.
| pSink | The receiver of the RepoRemixStatusMsg. |
| pRemixes | The remixes of the directory. |
Implements NetLobby.
|
overridevirtual |
Vtable slot 26.
Start the chain of mDeleteFileTask.
| pSink | The receiver of the result. |
| pszName | The file. |
Implements NetLobby.
| void LobbyRT::Poll | ( | ) |
Service the library and every request, and report the finished chains.
| void LobbyRT::Fail | ( | MsgSink * | pSink, |
| int | nResult, | ||
| int | nReason ) |
Stop every request, forget the filters and the muted players, and start the chain of mDisconnectTask, which reports nResult as nReason requires.
| pSink | The receiver of the report. |
| nResult | The error reported. |
| nReason | One of DisconnectReason. |
| void LobbyRT::SetAccount | ( | int | nAccount, |
| int | nChannel, | ||
| const rtNetConnectionInfo * | pInfo ) |
Take the account, the chat channel, and the connection a login or a join reports.
| nAccount | The account of the local player. |
| nChannel | The chat channel. |
| pInfo | The connection to the lobby server. |
| const char * LobbyRT::GetName | ( | ) |
Report the name of the local player.
| const char * LobbyRT::GetPassword | ( | ) |
Report the password of the local player.
| const char * LobbyRT::GetPlayerStats | ( | ) |
Encode the record of the local player into mStatsText.
| void LobbyRT::UpdateStats | ( | const LobbyPlayer * | pPlayer | ) |
Take the rating, the games, the record, and the rank of the local player after a game, and add an AccountUpdateStatsTask to mTasks when any of them changed.
| pPlayer | The player after the game. |
| bool LobbyRT::IsMuted | ( | int | nAccount | ) |
Report whether an account is in mMuted.
| nAccount | The account. |
| void LobbyRT::LogNetError | ( | int | nLine, |
| int | nError ) |
Record the result of a call to the peer-to-peer layer.
The body is empty.
| nLine | The line of the original source that made the call. |
| nError | The result. |
| void LobbyRT::LogMediusError | ( | int | nLine, |
| int | nError ) |
Record the result of a call to the lobby client.
The body is empty.
| nLine | The line of the original source that made the call. |
| nError | The result. |
|
inlinestatic |
Pass the result of a call to the peer-to-peer layer to LogNetError() of TheLobbyRT.
Inline at each call.
| nLine | The line of the call. |
| nError | The result. |
|
inlinestatic |
Pass the result of a call to the lobby client to LogMediusError() of TheLobbyRT.
Inline at each call.
| nLine | The line of the call. |
| nError | The result. |
| void LobbyRT::ReportProgress | ( | float | fProgress | ) |
Send a RepoRemixStatusMsg with the progress to the running transfer.
| fProgress | The part transferred, from 0 to 1. |
|
static |
The unlimited_upload script command, which lifts the limit of one upload a day.
| pCommand | The command. |
| pUserData | Not read. |
|
static |
Read a number of a fixed count of digits from encoded text.
| pnValue | Receives the number. |
| ppszText | The text, advanced past the digits. |
| pnRemaining | The characters left, reduced by the digits. |
| nDigits | The count of digits. |
|
static |
Convert a connection class of the lobby server to a LobbyPlayer::ConnectionType.
| nClass | The connection class. |
|
static |
Convert a NetInet::GetConnectionType() value to a connection class of the lobby server.
| nType | The kind of connection. |
|
static |
Encode the settings of a game as the name the lobby server lists it by.
| pName | Receives the name. |
| pParams | The settings. |
| nPlayers | The players in the game. |
| nConnectionType | The kind of connection of the host. |
| nAccountId | The account of the host. |
|
static |
Decode the name EncodeGameName() writes.
Each output starts at its default, and decoding stops at the first field missing.
| pParams | Receives the settings. |
| pnPlayers | Receives the players in the game. |
| pnConnectionType | Receives the kind of connection of the host. |
| pnAccountId | Receives the account of the host. |
| pszName | The name. |
|
static |
Encode the rating, the record, and the Freq of a player as the statistics text of the lobby server.
| pText | Receives the text. |
| pPlayer | The player. |
|
static |
Decode the text EncodePlayer() writes.
| pPlayer | Receives the rating, the record, and the Freq. |
| pszText | The text. |
|
static |
Encode a game mode and a skill level as a value of the rules field and its comparison.
Another game mode writes nothing.
| pnValue | Receives the value. |
| pnComparison | Receives one of RTFilter::Comparison. |
| nRuleSet | The game mode. |
| nSkillLevel | The skill level, or a negative value for any. |
|
static |
Encode a song as its number.
| pnLevel | Receives the number. |
| pszSong | The song. |
|
static |
Set the song of the settings from its number, or clear it for an unknown number.
| pParams | The settings. |
| nLevel | The number. |
|
static |
Convert a state of a game on the lobby server to a NetLaunchpadInfo::Status.
| nWorldStatus | The state. |
|
static |
Move a page of a list.
| pnPage | The page, from 0. |
| pnPageSize | Receives the entries of a page. |
| nDirection | One of PageDirection. Another value changes nothing. |
| nPageSize | The entries of a page. |
| nLargePageSize | The entries of a page for kPageFirstAll. |
| nCount | The entries of the current page. |
|
inline |
|
inline |
| nValue | One of DisconnectReason. |
|
inline |
|
inline |
| nValue | Non-zero once the connection failed. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| nValue | Non-zero while the library is started. |
|
inline |
|
inline |
| nValue | Non-zero while the lobby server is connected. |
|
inline |
|
inline |
| pszSessionKey | The key of the lobby session. |
|
inline |
|
inline |
|
inline |
| nValue | Non-zero when the connection is encrypted. |
|
inline |
|
inline |
| pszValue | The host name of the lobby server. Borrowed. |
|
inline |
|
inline |
| nValue | The port of the lobby server. |
|
inline |
|
inline |
| pszAddress | The address the name of the server resolves to. |
|
inline |
|
inline |
| nValue | The location of the login. |
|
inline |
|
inline |
| nValue | The room JoinChatroom() joins. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| nValue | The launchpad RequestLaunchpadPlayers() lists. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| nValue | The size of the transfer buffer in bytes. |
|
inline |
|
inline |
|
inline |
| pValue | The bytes of the transfer, or null. Freed with PoolMemFree(). |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| pszAnnouncement | The news of the lobby server. |
|
inline |
|
inline |
|
inline |
| pszPolicy | The licence agreement of the lobby server. |
|
staticconstexpr |
The identifier of the game on the lobby server.
|
static |
Non-zero once the unlimited_upload script command ran.