# RakNet::Lobby2Message Struct Reference

`#include <Lobby2Message.h>`

Inheritance diagram for RakNet::Lobby2Message:

List of all members.

## Public Member Functions

virtual Lobby2MessageID | GetID (void) const =0
| Every message has an ID identifying it across the network.
virtual bool | RequiresAdmin (void) const =0
virtual bool | RequiresRankingPermission (void) const =0
virtual bool | CancelOnDisconnect (void) const =0
virtual bool | RequiresLogin (void) const =0
virtual void | Serialize (bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream)
| Overridable serialization of the contents of this message. Defaults to SerializeBase().
virtual bool | PrevalidateInput (void)
virtual bool | ClientImpl (Lobby2Client *client)
virtual void | CallCallback (Lobby2Callbacks *cb)=0
virtual bool | ServerMemoryImpl (Lobby2Server *server, SystemAddress systemAddress)
virtual bool | ServerDBImpl (Lobby2ServerCommand *command, void *databaseInterface)
bool | ValidateHandle (RakNet::RakString *handle)
bool | ValidateBinary (BinaryDataBlock *binaryDataBlock)
| Binary data cannot be longer than L2_MAX_BINARY_DATA_LENGTH.
bool | ValidateRequiredText (RakNet::RakString *text)
| Required text cannot be empty.
bool | ValidatePassword (RakNet::RakString *text)
| Passwords must contain at least 5 characters.
bool | ValidateEmailAddress (RakNet::RakString *text)
| Check email address format.
virtual const char * | GetName (void) const =0
| Convert the enumeration representing this message to a string, and return it. Done automatically by macros.
virtual void | DebugMsg (RakNet::RakString &out) const =0
| Write the result of this message to out(). Done automatically by macros.
virtual void | DebugPrintf (void) const
| Print the result of DebugMsg.

## Public Attributes

RakNet::Lobby2ResultCode | resultCode
| Result of the operation. L2RC_SUCCESS means the result completed. Anything else means an error.
uint64_t | requestId
unsigned char | callbackId
int | extendedResultCode
| Used for consoles.
int | refCount
| Reference count.

## Detailed Description

A Lobby2Message encapsulates a networked function call from the client. The client should fill in the input parameters, call Lobby2Client::SendMsg(), and wait for the reply in the callback passed to Lobby2Client::SetCallbackInterface() The input parameters are always serialized back from the server. See resultCode for the result of the operation. L2RC_SUCCESS means success. Anything else means failure. Any message may return between L2RC_NOT_LOGGED_IN and L2RC_EMAIL_ADDRESS_IS_INVALID, which indices formatting errors in the input. All other return codes have the name of the message in the enumeration. The system can be extended by deriving from Lobby2Message, adding your own input and output parameters, and deriving from Lobby2MessageFactory register your own class factory with RakNet::Lobby2Plugin::SetMessageFactory()

## Member Function Documentation

virtual void RakNet::Lobby2Message::CallCallback | ( | Lobby2Callbacks * | cb | ) | `[pure virtual]`

This message has been processed by the server and has arrived back on the client. Call the client informing the user of this event.

virtual bool RakNet::Lobby2Message::CancelOnDisconnect | ( | void |  | ) | const`[pure virtual]`

Should this message not be processed on the server if the requesting user disconnects before it completes? This should be true for functions that only return data. False for functions that affect other users, or change the database

Implemented in RakNet::System_CreateDatabase, RakNet::System_DestroyDatabase, RakNet::System_CreateTitle, RakNet::System_RegisterProfanity, RakNet::System_BanUser, RakNet::CDKey_Add, RakNet::CDKey_GetStatus, RakNet::CDKey_Use, RakNet::CDKey_FlagStolen, RakNet::Client_Login, RakNet::Client_RegisterAccount, RakNet::System_SetEmailAddressValidated, RakNet::Client_ValidateHandle, RakNet::System_DeleteAccount, RakNet::System_PruneAccounts, RakNet::Client_GetEmailAddress, RakNet::Client_GetPasswordRecoveryQuestionByHandle, RakNet::Client_GetPasswordByPasswordRecoveryAnswer, RakNet::Client_ChangeHandle, RakNet::Client_UpdateAccount, RakNet::Client_StartIgnore, RakNet::Client_StopIgnore, RakNet::Client_GetIgnoreList, RakNet::Friends_SendInvite, RakNet::Friends_AcceptInvite, RakNet::Friends_RejectInvite, RakNet::Friends_GetInvites, RakNet::Friends_GetFriends, RakNet::Friends_Remove, RakNet::BookmarkedUsers_Add, RakNet::BookmarkedUsers_Get, RakNet::Emails_Send, RakNet::Emails_Get, RakNet::Emails_Delete, RakNet::Emails_SetStatus, RakNet::Ranking_SubmitMatch, RakNet::Ranking_GetMatches, RakNet::Ranking_GetMatchBinaryData, RakNet::Ranking_GetTotalScore, RakNet::Ranking_WipeScoresForPlayer, RakNet::Ranking_WipeMatches, RakNet::Ranking_PruneMatches, RakNet::Ranking_WipeRatings, RakNet::Ranking_GetRating, RakNet::Clans_Create, RakNet::Clans_SetProperties, RakNet::Clans_GetProperties, RakNet::Clans_SetMyMemberProperties, RakNet::Clans_GrantLeader, RakNet::Clans_SetSubleaderStatus, RakNet::Clans_SetMemberRank, RakNet::Clans_GetMemberProperties, RakNet::Clans_ChangeHandle, RakNet::Clans_Leave, RakNet::Clans_Get, RakNet::Clans_SendJoinInvitation, RakNet::Clans_WithdrawJoinInvitation, RakNet::Clans_AcceptJoinInvitation, RakNet::Clans_RejectJoinInvitation, RakNet::Clans_DownloadInvitationList, RakNet::Clans_SendJoinRequest, RakNet::Clans_WithdrawJoinRequest, RakNet::Clans_AcceptJoinRequest, RakNet::Clans_RejectJoinRequest, RakNet::Clans_DownloadRequestList, RakNet::Clans_KickAndBlacklistUser, RakNet::Clans_UnblacklistUser, RakNet::Clans_GetBlacklist, RakNet::Clans_GetMembers, RakNet::Clans_CreateBoard, RakNet::Clans_DestroyBoard, RakNet::Clans_CreateNewTopic, RakNet::Clans_ReplyToTopic, RakNet::Clans_RemovePost, RakNet::Clans_GetBoards, RakNet::Clans_GetTopics, and RakNet::Clans_GetPosts.

bool Lobby2Message::ClientImpl | ( | Lobby2Client * | client | ) | `[virtual]`

Override to do any Lobby2Client functionality when the message is returned from the server (usually nothing).

Returns:
  True to call CallCallback immediately. False to defer for some reason (always true on the PC)

Reimplemented in RakNet::Client_StartIgnore, RakNet::Client_StopIgnore, and RakNet::Client_GetIgnoreList.

bool Lobby2Message::PrevalidateInput | ( | void |  | ) | `[virtual]`

If data members can be validated for correctness in the server's main thread, override this function and do those checks here.

Returns:
  True for input OK. False if the input is bad and does not need to be further processed in the database threads.

Reimplemented in RakNet::System_CreateDatabase, RakNet::System_DestroyDatabase, RakNet::System_CreateTitle, RakNet::System_RegisterProfanity, RakNet::System_BanUser, RakNet::CDKey_Add, RakNet::CDKey_GetStatus, RakNet::CDKey_Use, RakNet::CDKey_FlagStolen, RakNet::Client_Login, RakNet::Client_RegisterAccount, RakNet::System_SetEmailAddressValidated, RakNet::Client_ValidateHandle, RakNet::System_DeleteAccount, RakNet::System_PruneAccounts, RakNet::Client_GetEmailAddress, RakNet::Client_GetPasswordRecoveryQuestionByHandle, RakNet::Client_GetPasswordByPasswordRecoveryAnswer, RakNet::Client_ChangeHandle, RakNet::Client_UpdateAccount, RakNet::Client_StartIgnore, RakNet::Client_StopIgnore, RakNet::Friends_SendInvite, RakNet::Friends_AcceptInvite, RakNet::Friends_RejectInvite, RakNet::Friends_Remove, RakNet::BookmarkedUsers_Add, RakNet::Emails_Send, RakNet::Emails_SetStatus, RakNet::Ranking_SubmitMatch, RakNet::Ranking_GetMatches, RakNet::Ranking_GetTotalScore, RakNet::Ranking_WipeScoresForPlayer, RakNet::Ranking_WipeMatches, RakNet::Ranking_WipeRatings, RakNet::Ranking_GetRating, RakNet::Clans_Create, RakNet::Clans_SetProperties, RakNet::Clans_GetProperties, RakNet::Clans_SetMyMemberProperties, RakNet::Clans_GrantLeader, RakNet::Clans_SetSubleaderStatus, RakNet::Clans_SetMemberRank, RakNet::Clans_GetMemberProperties, RakNet::Clans_ChangeHandle, RakNet::Clans_Leave, RakNet::Clans_SendJoinInvitation, RakNet::Clans_WithdrawJoinInvitation, RakNet::Clans_AcceptJoinInvitation, RakNet::Clans_RejectJoinInvitation, RakNet::Clans_SendJoinRequest, RakNet::Clans_WithdrawJoinRequest, RakNet::Clans_AcceptJoinRequest, RakNet::Clans_RejectJoinRequest, RakNet::Clans_KickAndBlacklistUser, RakNet::Clans_UnblacklistUser, RakNet::Clans_GetBlacklist, RakNet::Clans_GetMembers, RakNet::Clans_CreateBoard, RakNet::Clans_DestroyBoard, RakNet::Clans_CreateNewTopic, RakNet::Clans_ReplyToTopic, RakNet::Clans_GetBoards, RakNet::Clans_GetTopics, and RakNet::Clans_GetPosts.

virtual bool RakNet::Lobby2Message::RequiresAdmin | ( | void |  | ) | const`[pure virtual]`

Is this message something that should only be run by a system with admin privileges? Set admin privileges with Lobby2Server::AddAdminAddress()

Implemented in RakNet::System_CreateDatabase, RakNet::System_DestroyDatabase, RakNet::System_CreateTitle, RakNet::System_RegisterProfanity, RakNet::System_BanUser, RakNet::CDKey_Add, RakNet::CDKey_GetStatus, RakNet::CDKey_Use, RakNet::CDKey_FlagStolen, RakNet::Client_Login, RakNet::Client_RegisterAccount, RakNet::System_SetEmailAddressValidated, RakNet::Client_ValidateHandle, RakNet::System_DeleteAccount, RakNet::System_PruneAccounts, RakNet::Client_GetEmailAddress, RakNet::Client_GetPasswordRecoveryQuestionByHandle, RakNet::Client_GetPasswordByPasswordRecoveryAnswer, RakNet::Client_ChangeHandle, RakNet::Client_UpdateAccount, RakNet::Client_StartIgnore, RakNet::Client_StopIgnore, RakNet::Client_GetIgnoreList, RakNet::Friends_SendInvite, RakNet::Friends_AcceptInvite, RakNet::Friends_RejectInvite, RakNet::Friends_GetInvites, RakNet::Friends_GetFriends, RakNet::Friends_Remove, RakNet::BookmarkedUsers_Add, RakNet::BookmarkedUsers_Get, RakNet::Emails_Send, RakNet::Emails_Get, RakNet::Emails_Delete, RakNet::Emails_SetStatus, RakNet::Ranking_SubmitMatch, RakNet::Ranking_GetMatches, RakNet::Ranking_GetMatchBinaryData, RakNet::Ranking_GetTotalScore, RakNet::Ranking_WipeScoresForPlayer, RakNet::Ranking_WipeMatches, RakNet::Ranking_PruneMatches, RakNet::Ranking_WipeRatings, RakNet::Ranking_GetRating, RakNet::Clans_Create, RakNet::Clans_SetProperties, RakNet::Clans_GetProperties, RakNet::Clans_SetMyMemberProperties, RakNet::Clans_GrantLeader, RakNet::Clans_SetSubleaderStatus, RakNet::Clans_SetMemberRank, RakNet::Clans_GetMemberProperties, RakNet::Clans_ChangeHandle, RakNet::Clans_Leave, RakNet::Clans_Get, RakNet::Clans_SendJoinInvitation, RakNet::Clans_WithdrawJoinInvitation, RakNet::Clans_AcceptJoinInvitation, RakNet::Clans_RejectJoinInvitation, RakNet::Clans_DownloadInvitationList, RakNet::Clans_SendJoinRequest, RakNet::Clans_WithdrawJoinRequest, RakNet::Clans_AcceptJoinRequest, RakNet::Clans_RejectJoinRequest, RakNet::Clans_DownloadRequestList, RakNet::Clans_KickAndBlacklistUser, RakNet::Clans_UnblacklistUser, RakNet::Clans_GetBlacklist, RakNet::Clans_GetMembers, RakNet::Clans_CreateBoard, RakNet::Clans_DestroyBoard, RakNet::Clans_CreateNewTopic, RakNet::Clans_ReplyToTopic, RakNet::Clans_RemovePost, RakNet::Clans_GetBoards, RakNet::Clans_GetTopics, and RakNet::Clans_GetPosts.

virtual bool RakNet::Lobby2Message::RequiresLogin | ( | void |  | ) | const`[pure virtual]`

Does this function require logging into the server before it can be executed? If true, the user id and user handle will be automatically inferred by the last login by looking up the sender's system address. If false, the message should include the username so the database query can lookup which user is performing this operation.

Implemented in RakNet::System_CreateDatabase, RakNet::System_DestroyDatabase, RakNet::System_CreateTitle, RakNet::System_RegisterProfanity, RakNet::System_BanUser, RakNet::CDKey_Add, RakNet::CDKey_GetStatus, RakNet::CDKey_Use, RakNet::CDKey_FlagStolen, RakNet::Client_Login, RakNet::Client_RegisterAccount, RakNet::System_SetEmailAddressValidated, RakNet::Client_ValidateHandle, RakNet::System_DeleteAccount, RakNet::System_PruneAccounts, RakNet::Client_GetEmailAddress, RakNet::Client_GetPasswordRecoveryQuestionByHandle, RakNet::Client_GetPasswordByPasswordRecoveryAnswer, RakNet::Client_ChangeHandle, RakNet::Client_UpdateAccount, RakNet::Client_StartIgnore, RakNet::Client_StopIgnore, RakNet::Client_GetIgnoreList, RakNet::Friends_SendInvite, RakNet::Friends_AcceptInvite, RakNet::Friends_RejectInvite, RakNet::Friends_GetInvites, RakNet::Friends_GetFriends, RakNet::Friends_Remove, RakNet::BookmarkedUsers_Add, RakNet::BookmarkedUsers_Get, RakNet::Emails_Send, RakNet::Emails_Get, RakNet::Emails_Delete, RakNet::Emails_SetStatus, RakNet::Ranking_SubmitMatch, RakNet::Ranking_GetMatches, RakNet::Ranking_GetMatchBinaryData, RakNet::Ranking_GetTotalScore, RakNet::Ranking_WipeScoresForPlayer, RakNet::Ranking_WipeMatches, RakNet::Ranking_PruneMatches, RakNet::Ranking_WipeRatings, RakNet::Ranking_GetRating, RakNet::Clans_Create, RakNet::Clans_SetProperties, RakNet::Clans_GetProperties, RakNet::Clans_SetMyMemberProperties, RakNet::Clans_GrantLeader, RakNet::Clans_SetSubleaderStatus, RakNet::Clans_SetMemberRank, RakNet::Clans_GetMemberProperties, RakNet::Clans_ChangeHandle, RakNet::Clans_Leave, RakNet::Clans_Get, RakNet::Clans_SendJoinInvitation, RakNet::Clans_WithdrawJoinInvitation, RakNet::Clans_AcceptJoinInvitation, RakNet::Clans_RejectJoinInvitation, RakNet::Clans_DownloadInvitationList, RakNet::Clans_SendJoinRequest, RakNet::Clans_WithdrawJoinRequest, RakNet::Clans_AcceptJoinRequest, RakNet::Clans_RejectJoinRequest, RakNet::Clans_DownloadRequestList, RakNet::Clans_KickAndBlacklistUser, RakNet::Clans_UnblacklistUser, RakNet::Clans_GetBlacklist, RakNet::Clans_GetMembers, RakNet::Clans_CreateBoard, RakNet::Clans_DestroyBoard, RakNet::Clans_CreateNewTopic, RakNet::Clans_ReplyToTopic, RakNet::Clans_RemovePost, RakNet::Clans_GetBoards, RakNet::Clans_GetTopics, and RakNet::Clans_GetPosts.

virtual bool RakNet::Lobby2Message::RequiresRankingPermission | ( | void |  | ) | const`[pure virtual]`

Is this message something that should only be run by a system with ranking upload priviledges? Set ranking privileges with Lobby2Server::AddRankingAddress()

Implemented in RakNet::System_CreateDatabase, RakNet::System_DestroyDatabase, RakNet::System_CreateTitle, RakNet::System_RegisterProfanity, RakNet::System_BanUser, RakNet::CDKey_Add, RakNet::CDKey_GetStatus, RakNet::CDKey_Use, RakNet::CDKey_FlagStolen, RakNet::Client_Login, RakNet::Client_RegisterAccount, RakNet::System_SetEmailAddressValidated, RakNet::Client_ValidateHandle, RakNet::System_DeleteAccount, RakNet::System_PruneAccounts, RakNet::Client_GetEmailAddress, RakNet::Client_GetPasswordRecoveryQuestionByHandle, RakNet::Client_GetPasswordByPasswordRecoveryAnswer, RakNet::Client_ChangeHandle, RakNet::Client_UpdateAccount, RakNet::Client_StartIgnore, RakNet::Client_StopIgnore, RakNet::Client_GetIgnoreList, RakNet::Friends_SendInvite, RakNet::Friends_AcceptInvite, RakNet::Friends_RejectInvite, RakNet::Friends_GetInvites, RakNet::Friends_GetFriends, RakNet::Friends_Remove, RakNet::BookmarkedUsers_Add, RakNet::BookmarkedUsers_Get, RakNet::Emails_Send, RakNet::Emails_Get, RakNet::Emails_Delete, RakNet::Emails_SetStatus, RakNet::Ranking_SubmitMatch, RakNet::Ranking_GetMatches, RakNet::Ranking_GetMatchBinaryData, RakNet::Ranking_GetTotalScore, RakNet::Ranking_WipeScoresForPlayer, RakNet::Ranking_WipeMatches, RakNet::Ranking_PruneMatches, RakNet::Ranking_WipeRatings, RakNet::Ranking_GetRating, RakNet::Clans_Create, RakNet::Clans_SetProperties, RakNet::Clans_GetProperties, RakNet::Clans_SetMyMemberProperties, RakNet::Clans_GrantLeader, RakNet::Clans_SetSubleaderStatus, RakNet::Clans_SetMemberRank, RakNet::Clans_GetMemberProperties, RakNet::Clans_ChangeHandle, RakNet::Clans_Leave, RakNet::Clans_Get, RakNet::Clans_SendJoinInvitation, RakNet::Clans_WithdrawJoinInvitation, RakNet::Clans_AcceptJoinInvitation, RakNet::Clans_RejectJoinInvitation, RakNet::Clans_DownloadInvitationList, RakNet::Clans_SendJoinRequest, RakNet::Clans_WithdrawJoinRequest, RakNet::Clans_AcceptJoinRequest, RakNet::Clans_RejectJoinRequest, RakNet::Clans_DownloadRequestList, RakNet::Clans_KickAndBlacklistUser, RakNet::Clans_UnblacklistUser, RakNet::Clans_GetBlacklist, RakNet::Clans_GetMembers, RakNet::Clans_CreateBoard, RakNet::Clans_DestroyBoard, RakNet::Clans_CreateNewTopic, RakNet::Clans_ReplyToTopic, RakNet::Clans_RemovePost, RakNet::Clans_GetBoards, RakNet::Clans_GetTopics, and RakNet::Clans_GetPosts.

bool Lobby2Message::ServerDBImpl | ( | Lobby2ServerCommand * | command,
|  | void * | databaseInterface |
| ) |  |  | `[virtual]`

Do any Lobby2Server functionality when the message is processed in a database thread on the server. It is safe to do slow database calls in this function. If it returns true, the message has been handled, and the result is sent to the client If it returns false, that means ignore the message

bool Lobby2Message::ServerMemoryImpl | ( | Lobby2Server * | server,
|  | SystemAddress | systemAddress |
| ) |  |  | `[virtual]`

Do any Lobby2Server functionality when the message first arrives on the server, and after it has returned true from PrevalidateInput() If it returns true, the message has been handled, and the result is sent to the client If it returns false, the message continues to ServerDBImpl

bool Lobby2Message::ValidateHandle | ( | RakNet::RakString * | handle | ) |

The only non-printable character is space Cannot start with space Cannot end with space Cannot have two spaces in a row

## Member Data Documentation

unsigned char RakNet::Lobby2Message::callbackId

Just a number, representing which instance of Lobby2Callbacks should process the result of this operation -1 means all

uint64_t RakNet::Lobby2Message::requestId

Just a number, uniquely identifying each allocation of Lobby2Message. Use it if you need to lookup queries on the callback reply

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

- C:/RakNet/DependentExtensions/Lobby2/Lobby2Message.h
- C:/RakNet/DependentExtensions/Lobby2/Lobby2Message.cpp