#include <LobbyClientPC.h>
Public Member Functions | |
virtual void | Login (const char *userHandle, const char *userPassword, SystemAddress lobbyServerAddr) |
virtual void | SetTitleLoginId (const char *_titleIdStr, const char *_titleLoginPW, int _titleLoginPWLength) |
virtual void | Logoff (void) |
virtual bool | IsConnected (void) const |
virtual void | RegisterAccount (LobbyDBSpec::CreateUser_Data *input, SystemAddress lobbyServerAddr) |
virtual void | UpdateAccount (LobbyDBSpec::UpdateUser_Data *input) |
virtual void | ChangeHandle (const char *newHandle) |
virtual LobbyUserStatus | GetLobbyUserStatus (void) const |
virtual void | RetrievePasswordRecoveryQuestion (const char *userHandle, SystemAddress lobbyServerAddr) |
virtual void | RetrievePassword (const char *userHandle, const char *passwordRecoveryAnswer, SystemAddress lobbyServerAddr) |
virtual void | DownloadFriends (bool ascendingSortByDate) |
virtual void | SendAddFriendInvite (const char *friendHandle, LobbyClientUserId *friendId, const char *messageBody, unsigned char language) |
virtual void | AcceptAddFriendInvite (LobbyClientUserId *friendId, const char *messageBody, unsigned char language) |
virtual void | DeclineAddFriendInvite (LobbyClientUserId *friendId, const char *messageBody, unsigned char language) |
virtual const DataStructures::List < LC_Friend * > & | GetFriendsList (void) const |
virtual void | DownloadIgnoreList (bool ascendingSort) |
virtual void | AddToOrUpdateIgnoreList (const char *userHandle, LobbyClientUserId *userId, const char *actionsStr) |
virtual void | RemoveFromIgnoreList (LobbyClientUserId *userId) |
virtual const DataStructures::List < LC_Ignored * > & | GetIgnoreList (void) const |
virtual void | DownloadEmails (bool ascendingSort, bool inbox, unsigned char language) |
virtual void | SendEmail (LobbyDBSpec::SendEmail_Data *input, unsigned char language) |
virtual void | DeleteEmail (EmailId *emailId) |
virtual void | UpdateEmailStatus (EmailId *emailId, int newStatus, bool wasOpened) |
virtual const DataStructures::List < LobbyDBSpec::SendEmail_Data * > & | GetInboxEmailList (void) const |
virtual const DataStructures::List < LobbyDBSpec::SendEmail_Data * > & | GetSentEmailList (void) const |
virtual void | SendIM (const char *userHandle, LobbyClientUserId *userId, const char *chatMessage, unsigned char languageId, const char *chatBinaryData, int chatBinaryLength) |
bool | IsInRoom (void) const |
virtual void | CreateRoom (const char *roomName, const char *roomPassword, bool roomIsHidden, int publicSlots, int privateSlots, bool allowSpectators, DataStructures::Table *customProperties) |
virtual void | DownloadRooms (DataStructures::Table::FilterQuery *inclusionFilters, unsigned numInclusionFilters) |
virtual DataStructures::Table * | GetAllRooms (void) |
virtual bool | IsDownloadingRoomList (void) |
virtual void | LeaveRoom (void) |
virtual const DataStructures::List < LobbyClientUserId * > & | GetAllRoomMembers (void) const |
virtual const DataStructures::List < LobbyClientUserId * > & | GetOpenSlotMembers (void) const |
virtual const DataStructures::List < LobbyClientUserId * > & | GetReservedSlotMembers (void) const |
virtual const DataStructures::List < LobbyClientUserId * > & | GetSpectators (void) const |
virtual LobbyClientUserId * | GetRoomModerator (void) |
virtual LobbyClientRoomId * | GetRoomId (void) |
virtual unsigned int | GetPublicSlotMaxCount (void) const |
virtual unsigned int | GetPrivateSlotMaxCount (void) const |
virtual LobbyClientTitleId * | GetTitleId (void) const |
virtual const char * | GetRoomName (void) const |
| |
virtual const char * | GetTitleName (void) const |
| |
virtual bool | RoomIsHidden (void) const |
| |
virtual DataStructures::Table::Row * | GetRoomTableRow (void) const |
virtual void | JoinRoom (LobbyClientRoomId *roomId, const char *roomPassword, bool joinAsSpectator) |
virtual void | JoinRoomByFilter (DataStructures::Table::FilterQuery *inclusionFilters, unsigned numInclusionFilters, bool joinAsSpectator) |
virtual void | RoomChat (const char *chatMessage, unsigned char languageId, const char *chatBinaryData, int chatBinaryLength) |
virtual bool | IsInReservedSlot (LobbyClientUserId *userId) |
| |
virtual bool | IsRoomModerator (LobbyClientUserId *userId) |
| |
virtual bool | IsUserInRoom (LobbyClientUserId *userId) const |
| |
virtual bool | RoomAllowsSpectators (void) const |
| |
virtual void | InviteToRoom (const char *userHandle, LobbyClientUserId *userId, const char *chatMessage, unsigned char languageId, const char *chatBinaryData, int chatBinaryLength, bool inviteToPrivateSlot) |
virtual void | SetReadyToPlayStatus (bool isReady) |
virtual void | KickRoomMember (LobbyClientUserId *userId) |
virtual void | SetRoomIsHidden (bool roomIsHidden) |
virtual void | SetRoomAllowSpectators (bool spectatorsOn) |
virtual void | ChangeNumSlots (int totalSlots, int privateSlots) |
virtual void | GrantModerator (LobbyClientUserId *userId) |
virtual void | StartGame (void) |
virtual void | SubmitMatch (RankingServerDBSpec::SubmitMatch_Data *input) |
virtual void | DownloadRating (RankingServerDBSpec::GetRatingForParticipant_Data *input) |
virtual RankingServerDBSpec::GetRatingForParticipant_Data * | GetRating (void) |
virtual bool | IsWaitingOnQuickMatch (void) |
| |
virtual void | QuickMatch (int requiredPlayers, int timeoutInSeconds) |
virtual void | CancelQuickMatch (void) |
virtual void | DownloadActionHistory (bool ascendingSort) |
virtual void | AddToActionHistory (LobbyDBSpec::AddToActionHistory_Data *input) |
virtual const DataStructures::List < LobbyDBSpec::AddToActionHistory_Data * > & | GetActionHistoryList (void) const |
virtual const DataStructures::List < LobbyUserClientDetails * > & | GetRecentlyMetUsersList (void) const |
Users recently played against. | |
virtual bool | GetUserDetails (LobbyClientUserId *userId, LobbyUserClientDetails *details) |
virtual LobbyClientUserId * | GerUserIdFromName (const char *name) |
virtual LobbyClientUserId * | GetMyId (void) |
Get my own ID. | |
virtual bool | EqualIDs (const LobbyClientUserId *userId1, const LobbyClientUserId *userId2) |
Are two IDs equal? For the PC this is not necessary to call, as LobbyClientUserId is an unsigned integer. | |
virtual void | SetCallbackInterface (LobbyClientInterfaceCB *cbi) |
Sets the class to get callbacks. | |
void | SetOrderingChannel (char oc) |
Ordering channel to use with RakPeer::Send(). | |
void | SetSendPriority (PacketPriority pp) |
Send priority to use with RakPeer::Send(). | |
Protected Member Functions | |
void | OnAttach (RakPeerInterface *peer) |
PluginReceiveResult | OnReceive (RakPeerInterface *peer, Packet *packet) |
void | OnCloseConnection (RakPeerInterface *peer, SystemAddress systemAddress) |
void | OnShutdown (RakPeerInterface *peer) |
LobbyClient plugin for the PC
void LobbyClientPC::Login | ( | const char * | userHandle, | |
const char * | userPassword, | |||
SystemAddress | lobbyServerAddr | |||
) | [virtual] |
Logs into the lobby server with a given handle and password. All operations other than registering an account or Retrieving passwords require that you first login.
[in] | userHandle | The handle used to register an account |
[in] | userPassword | The password used when registering the account |
[in] | lobbyServerAddr | SystemAddress of the lobby server. Must be currently connected. |
LobbyClientInterfaceCB::Login_Result()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SetTitleLoginId | ( | const char * | _titleIdStr, | |
const char * | _titleLoginPW, | |||
int | _titleLoginPWLength | |||
) | [virtual] |
Indicates to the system what title (game) you are playing. Games are identified by a unique key, specified in binary via _titleLoginPW and _titleLoginPWLength Games must have been already created on the server, or directly in the database. One way to add games is through the functor class AddTitle_PostgreSQLImpl . An example of this can be found in the LobbyServerTest project
[in] | _titleIdStr | Actual name of the game. Not used at present, but may be used in the future. |
[in] | _titleLoginPW | Secret binary identifer assigned with the game. This should be kept secret so that people cannot submit scores for the wrong game, etc. |
[in] | _titleLoginPWLength | Length of _titleLoginPW |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::Logoff | ( | void | ) | [virtual] |
Logs off the lobby system.
Implements RakNet::LobbyClientInterface.
bool LobbyClientPC::IsConnected | ( | void | ) | const [virtual] |
void LobbyClientPC::RegisterAccount | ( | LobbyDBSpec::CreateUser_Data * | input, | |
SystemAddress | lobbyServerAddr | |||
) | [virtual] |
Creates an account on the lobby server. Unlike most functions you do not have to be logged in to do this. LobbyDBSpec::CreateUser_Data::handle is required and must be unique in the database. It also cannot be in the disallowedHandles table LobbyDBSpec::CreateUser_Data::password is also required
[in] | input | Data describing the new account. All fields optional but handle and password |
[in] | lobbyServerAddr | System address of the lobby server |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::UpdateAccount | ( | LobbyDBSpec::UpdateUser_Data * | input | ) | [virtual] |
Updates details of a previously created account.
[in] | input | Details on the account. See LobbyDBSpec::UpdateUser_Data for more details. |
LobbyClientInterfaceCB::UpdateAccount_Result()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::ChangeHandle | ( | const char * | newHandle | ) | [virtual] |
Change the handle associated with your user. Handle must be unique and not in the disallowedHandles table
Implements RakNet::LobbyClientInterface.
LobbyUserStatus LobbyClientPC::GetLobbyUserStatus | ( | void | ) | const [virtual] |
Returns the current action you are performing, if any.
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::RetrievePasswordRecoveryQuestion | ( | const char * | userHandle, | |
SystemAddress | lobbyServerAddr | |||
) | [virtual] |
Gets the password recovery question entered when the account was last created or updated. The question should not ask what the password is, but should ask some specific question that only the user would know
[in] | userHandle | Current user's handle, specified when creating the account via RegisterAccount() or ChangeHandle() |
[in] | lobbyServerAddr | System address of the lobby server |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::RetrievePassword | ( | const char * | userHandle, | |
const char * | passwordRecoveryAnswer, | |||
SystemAddress | lobbyServerAddr | |||
) | [virtual] |
Recovers the user's password given the handle and password recovery answer
[in] | userHandle | Current user's handle, specified when creating the account via RegisterAccount() or ChangeHandle() |
[in] | passwordRecoveryAnswer | Specified when creating or last updating the account |
[in] | lobbyServerAddr | System address of the lobby server |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DownloadFriends | ( | bool | ascendingSortByDate | ) | [virtual] |
Downloads your friends from the database, and stores the list internally Results are contained in the LC_Friend structure. Friends do not have to be online, and you will get LobbyClientInterfaceCB::FriendStatus_Notify() indicating when your friends go online and offline.
[in] | ascendingSortByDate | Sort result by date, ascending or descending |
LobbyClientInterfaceCB::DownloadFriends_Result()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SendAddFriendInvite | ( | const char * | friendHandle, | |
LobbyClientUserId * | friendId, | |||
const char * | messageBody, | |||
unsigned char | language | |||
) | [virtual] |
Invites someone to be your friend. They must be online at the time of the invite They will get the callback FriendInvitation_Notify indicating who the request is from, and can accept or deny it (or ignore it) If accepted, you will get notifications via FriendStatus_Notify of when they go on and offline
[in] | friendHandle | Handle of the potential friend. If you know friendId leave this at 0. |
[in] | friendId | ID of the potential friend. Lookup is faster using ID. If you don't know it, specify friendHandle instead. |
[in] | messageBody | Optional message to send with the friend request. |
[in] | language | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
LobbyClientInterfaceCB::SendAddFriendInvite_Result()
LobbyClientInterfaceCB::FriendInvitation_Notify()
LobbyClientInterfaceCB::FriendStatus_Notify
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::AcceptAddFriendInvite | ( | LobbyClientUserId * | friendId, | |
const char * | messageBody, | |||
unsigned char | language | |||
) | [virtual] |
Accept a friend invite that you were notified of with LobbyClientInterfaceCB::FriendInvitation_Notify()
[in] | friendId | ID of the potential friend, found at FriendInvitation_Notification::invitor |
[in] | messageBody | Optional message to reply with. |
[in] | language | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
LobbyClientInterfaceCB::AcceptAddFriendInvite_Result()
LobbyClientInterfaceCB::FriendInvitation_Notify()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DeclineAddFriendInvite | ( | LobbyClientUserId * | friendId, | |
const char * | messageBody, | |||
unsigned char | language | |||
) | [virtual] |
Decline a friend invite that you were notified of with LobbyClientInterfaceCB::FriendInvitation_Notify()
[in] | friendId | ID of the guy asking to be a friend, found at FriendInvitation_Notification::invitor |
[in] | messageBody | Optional message to reply with. |
[in] | language | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
LobbyClientInterfaceCB::DeclineAddFriendInvite_Result()
LobbyClientInterfaceCB::FriendInvitation_Notify()
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LC_Friend * > & LobbyClientPC::GetFriendsList | ( | void | ) | const [virtual] |
Get the downloaded friends list. Pointers are guaranteed to remain valid until the next call to RakPeer::Receive()
Successful call to DownloadFriends
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DownloadIgnoreList | ( | bool | ascendingSort | ) | [virtual] |
Adds a user to the ignore list, stored in the database as well Will block room chat, room invites, and instant messages Does not currently block user from joining your room, but this may change depending on user requests
[in] | ascendingSort | Which direction to sort the ignore list, sorted on date |
GetIgnoreList()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::AddToOrUpdateIgnoreList | ( | const char * | userHandle, | |
LobbyClientUserId * | userId, | |||
const char * | actionsStr | |||
) | [virtual] |
Add / update a user on the ignore list. If this user is not currently on the ignore list, they will be added. If this user IS currently on the ignore list, LC_Ignored::actionString will be updated.
[in] | userHandle | Handle of the user on which to perform this action. If you know userId leave this at 0. |
[in] | userId | ID of the user on which to perform this action. Lookup is faster using ID. If you don't know it, specify userHandle instead. |
[in] | actionsStr | Arbitrary, user-defined string to store any extra data you wish (such as reason for the ignore) |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::RemoveFromIgnoreList | ( | LobbyClientUserId * | userId | ) | [virtual] |
Remove a user from the ignore list.
[in] | userId | ID of the user on which to perform this action. You can get this through GetIgnoreList() |
GetIgnoreList()
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LC_Ignored * > & LobbyClientPC::GetIgnoreList | ( | void | ) | const [virtual] |
Returns the internally stored list of ignored users. Pointers are guaranteed to remain valid until the next call to RakPeer::Receive()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DownloadEmails | ( | bool | ascendingSort, | |
bool | inbox, | |||
unsigned char | language | |||
) | [virtual] |
Downloads emails on the server. Currently (this may change) emails are purely intra-database, so the name is a bit misleading. A better name would be peristent database message.
[in] | ascendingSort | Which direction to sort the resulting downloaded list, by creation date |
[in] | inbox | true to download mails sent to you. false to download mails that you have sent. |
[in] | language | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
GetInboxEmailList()
GetSentEmailList()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SendEmail | ( | LobbyDBSpec::SendEmail_Data * | input, | |
unsigned char | language | |||
) | [virtual] |
Sends an email to one or more users For each recipient, two copies of the email are stored in the database. One is in your sent mailbox, one is in the recipient incoming mailbox.
[in] | input | Data corresponding to the email. See LobbyDBSpec.h for all parameters. |
[in] | language | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DeleteEmail | ( | EmailId * | emailId | ) | [virtual] |
Deletes an email, from either your inbox or sent emails list.
[in] | emailId | Found at LobbyDBSpec::SendEmail_Data::emailMessageID |
GetSentEmailList()
LobbyClientInterfaceCB::DeleteEmail_Result()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::UpdateEmailStatus | ( | EmailId * | emailId, | |
int | newStatus, | |||
bool | wasOpened | |||
) | [virtual] |
Update the status flags associated with an email.
[in] | emailId | Found at LobbyDBSpec::SendEmail_Data::emailMessageID |
[in] | newStatus | arbitrary integer stored alongside each email. Use to indicate user-defined fields (priority, etc). |
[in] | wasOpened | boolean field. Use to indicate if an email was opened. Sent emails take the field LobbyDBSpec::SendEmail_Data::wasOpened . Inbox has this always true until set off. |
GetSentEmailList()
LobbyClientInterfaceCB::UpdateEmailStatus_Result()
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LobbyDBSpec::SendEmail_Data * > & LobbyClientPC::GetInboxEmailList | ( | void | ) | const [virtual] |
Gets emails downloaded with DownloadEmails(), for the inbox. Pointers are guaranteed to remain valid until the next call to RakPeer::Receive()
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LobbyDBSpec::SendEmail_Data * > & LobbyClientPC::GetSentEmailList | ( | void | ) | const [virtual] |
Gets emails downloaded with DownloadEmails(), for sent emails. Pointers are guaranteed to remain valid until the next call to RakPeer::Receive()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SendIM | ( | const char * | userHandle, | |
LobbyClientUserId * | userId, | |||
const char * | chatMessage, | |||
unsigned char | languageId, | |||
const char * | chatBinaryData, | |||
int | chatBinaryLength | |||
) | [virtual] |
Sends a message to another user. Unlike emails, this is not stored in the database. The callback will indicate failure if the user is not online. If the user has ignored us, the callback will indicate this as well.
[in] | userHandle | Handle of the user on which to perform this action. If you know userId leave this at 0. |
[in] | userId | ID of the user on which to perform this action. Lookup is faster using ID. If you don't know it, specify userHandle instead. |
[in] | chatMessage | Body of the message to send |
[in] | languageId | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
[in] | chatBinaryData | Any binary data you wish to send with the message (custom encoding, images, etc) |
[in] | chatBinaryLength | Length in bytes of chatBinaryData |
Implements RakNet::LobbyClientInterface.
bool LobbyClientPC::IsInRoom | ( | void | ) | const [virtual] |
Returns if we are in a room or not.
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::CreateRoom | ( | const char * | roomName, | |
const char * | roomPassword, | |||
bool | roomIsHidden, | |||
int | publicSlots, | |||
int | privateSlots, | |||
bool | allowSpectators, | |||
DataStructures::Table * | customProperties | |||
) | [virtual] |
Creates a room
[in] | roomName | Name of the room (required) |
[in] | roomPassword | Password for the room (optional) |
[in] | roomIsHidden | Sets the DefaultTableColumns::TC_ROOM_HIDDEN column to true or false in the rooms table. |
[in] | publicSlots | Number of slots that anyone can join by calling DownloadRooms() to view your room, followed by JoinRoom() to join it. |
[in] | privateSlots | Number of slots that users can only join if they previously were invited by the current moderator with InviteToRoom(). Those users will join a public slot if all private slots are full when they join the room. |
[in] | allowSpectators | True to allow spectators. Spectators are normal room members, but there is (currently) no limit on the number of spectators. |
[in] | customProperties | A table with named columns and one row of properties to add to the server rooms table. Column names must not already be in defaultTableColumns in LobbyTypes.cpp |
At least one prior successful call to SetTitleLoginId() to indicate what game to start. SetTitleLoginId() can be called multiple times to change games if desired.
LobbyClientInterfaceCB::RoomDestroyed_Notify
LobbyClientInterfaceCB::RoomMemberDrop_Notify
LobbyClientInterfaceCB::RoomMemberJoin_Notify
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DownloadRooms | ( | DataStructures::Table::FilterQuery * | inclusionFilters, | |
unsigned | numInclusionFilters | |||
) | [virtual] |
Downloads rooms, possibly based on filters
[in] | inclusionFilters | Filters to apply to the search query. Use 0 to get all rooms. |
[in] | numInclusionFilters | Number of structures in the inclusionFilters array |
DataStructures::Table::FilterQuery inclusionFilters[1]; DataStructures::Table::Cell filterCells[1]; filterCells[0].Set(0); // 0 = integer value false inclusionFilters[0].cellValue=&filterCells[0]; inclusionFilters[0].columnIndex=DefaultTableColumnsTC_ROOM_HIDDEN; inclusionFilters[0].operation=DataStructuresTable::QF_EQUAL; lobbyClient.DownloadRooms(inclusionFilters, 1);
Implements RakNet::LobbyClientInterface.
DataStructures::Table * LobbyClientPC::GetAllRooms | ( | void | ) | [virtual] |
Returns a table of all downloaded rooms, since the last time DownloadRooms() was called. This list is reset to only your own room if you create a room. Pointers are guaranteed to remain valid until the next call to RakPeer::Receive()
Implements RakNet::LobbyClientInterface.
bool LobbyClientPC::IsDownloadingRoomList | ( | void | ) | [virtual] |
Are we currently waiting for DownloadRooms() to finish?
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::LeaveRoom | ( | void | ) | [virtual] |
Leave our current room. As with other asynchronous calls, this is not immediate, and you should wait for the callback for verification.
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LobbyClientUserId * > & LobbyClientPC::GetAllRoomMembers | ( | void | ) | const [virtual] |
Gets a list of pointers to room member identifiers. Use GetUserDetails() to get more information about each user. Pointers are valid until next call to this same function
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LobbyClientUserId * > & LobbyClientPC::GetOpenSlotMembers | ( | void | ) | const [virtual] |
Gets a list of pointers to room member identifiers. Use GetUserDetails() to get more information about each user. Pointers are valid until next call to this same function
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LobbyClientUserId * > & LobbyClientPC::GetReservedSlotMembers | ( | void | ) | const [virtual] |
Gets a list of pointers to room member identifiers. Use GetUserDetails() to get more information about each user. Pointers are valid until next call to this same function
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LobbyClientUserId * > & LobbyClientPC::GetSpectators | ( | void | ) | const [virtual] |
Gets a list of pointers to room member identifiers. Use GetUserDetails() to get more information about each user. Pointers are valid until next call to this same function
Implements RakNet::LobbyClientInterface.
LobbyClientUserId * LobbyClientPC::GetRoomModerator | ( | void | ) | [virtual] |
Get identifier of the moderator of this room The moderator will be one of the members in a public or priate slot Pointers are guaranteed to remain valid until the next call to RakPeer::Receive()
Implements RakNet::LobbyClientInterface.
LobbyClientRoomId * LobbyClientPC::GetRoomId | ( | void | ) | [virtual] |
Get ID of this room, used in some other functions Pointers are guaranteed to remain valid until the next call to RakPeer::Receive()
Implements RakNet::LobbyClientInterface.
unsigned int LobbyClientPC::GetPublicSlotMaxCount | ( | void | ) | const [virtual] |
Get number of public slots that can be filled.
Implements RakNet::LobbyClientInterface.
unsigned int LobbyClientPC::GetPrivateSlotMaxCount | ( | void | ) | const [virtual] |
Get number of private slots that can be filled.
Implements RakNet::LobbyClientInterface.
LobbyClientTitleId * LobbyClientPC::GetTitleId | ( | void | ) | const [virtual] |
Get unique identifier of the title (game). On the PC this corresponds to the database primary key.
Implements RakNet::LobbyClientInterface.
DataStructures::Table::Row * LobbyClientPC::GetRoomTableRow | ( | void | ) | const [virtual] |
Convenience function. Calls GetAllRooms(), returning the row of the room that we are currently in This is necessary to access customProperties passed to CreateRoom()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::JoinRoom | ( | LobbyClientRoomId * | roomId, | |
const char * | roomPassword, | |||
bool | joinAsSpectator | |||
) | [virtual] |
Join an existing room
[in] | roomId | Identifier of the room. Get this by calling DownloadRooms(). It is also specified with room invitation requests in the roomId member of LobbyClientInterfaceCB::RoomInvite_Notify |
[in] | roomPassword | Password used to enter the room. If the room does not have a password, this field is ignored. |
[in] | joinAsSpectator | Spectators do not typically play in the room. There is currently no limit on the number of spectators that can be in a room |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::JoinRoomByFilter | ( | DataStructures::Table::FilterQuery * | inclusionFilters, | |
unsigned | numInclusionFilters, | |||
bool | joinAsSpectator | |||
) | [virtual] |
Joins the first available room based on a search filter. The room must not have a password and if joinAsSpectator==false, must have an available open slot
[in] | inclusionFilters | Filters to apply to the search query. Use 0 to get all rooms. |
[in] | numInclusionFilters | Number of structures in the inclusionFilters array |
[in] | joinAsSpectator | Spectators do not typically play in the room. There is currently no limit on the number of spectators that can be in a room |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::RoomChat | ( | const char * | chatMessage, | |
unsigned char | languageId, | |||
const char * | chatBinaryData, | |||
int | chatBinaryLength | |||
) | [virtual] |
Chat to all other members in a room Members which have you on ignore will not get your messages. There is no notification of this.
[in] | chatMessage | Body of the message to send |
[in] | languageId | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
[in] | chatBinaryData | Any binary data you wish to send with the message (custom encoding, images, etc) |
[in] | chatBinaryLength | Length in bytes of chatBinaryData |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::InviteToRoom | ( | const char * | userHandle, | |
LobbyClientUserId * | userId, | |||
const char * | chatMessage, | |||
unsigned char | languageId, | |||
const char * | chatBinaryData, | |||
int | chatBinaryLength, | |||
bool | inviteToPrivateSlot | |||
) | [virtual] |
Invite someone to join your room Invited users will join private slots if they exist, public slots if they do not or if the private slots are full Invitations are linked to the current moderator, so if the moderator leaves or changes via GrantModerator(), those invites are cleared.
[in] | userHandle | Handle of the user on which to perform this action. If you know userId leave this at 0. |
[in] | userId | ID of the user on which to perform this action. Lookup is faster using ID. If you don't know it, specify userHandle instead. |
[in] | chatMessage | Body of the message to send |
[in] | languageId | Language to use for string encoding for the StringCompressor class. Use 0 if unsure. |
[in] | chatBinaryData | Any binary data you wish to send with the message (custom encoding, images, etc) |
[in] | chatBinaryLength | Length in bytes of chatBinaryData |
[in] | Invite | this member to an private slot. (If false, they will be under the same restrictions as normal members attempting to join the room). |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SetReadyToPlayStatus | ( | bool | isReady | ) | [virtual] |
Rooms cannot start until all members first call SetReadyToPlayStatus(true) New members to a room have this set to false by default
LobbyClientInterfaceCB::RoomMemberReadyStateChange_Notify()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::KickRoomMember | ( | LobbyClientUserId * | userId | ) | [virtual] |
Kick someone out of your room. Unfortunate recipient will get the callback KickedOutOfRoom_Notify()
LobbyClientInterfaceCB::KickedOutOfRoom_Notify
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SetRoomIsHidden | ( | bool | roomIsHidden | ) | [virtual] |
Sets the DefaultTableColumns::TC_ROOM_HIDDEN column to true or false in the rooms table. Other room members will get the callback RoomSetIsHidden_Notify()
LobbyClientInterfaceCB::RoomSetIsHidden_Notify()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SetRoomAllowSpectators | ( | bool | spectatorsOn | ) | [virtual] |
Sets if the room allows spectators Other room members will get the callback RoomSetAllowSpectators_Notify()
LobbyClientInterfaceCB::RoomSetAllowSpectators_Notify()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::ChangeNumSlots | ( | int | totalSlots, | |
int | privateSlots | |||
) | [virtual] |
Changes the number of total and private slots for the room Other room members will get the callback RoomChangeNumSlots_Notify()
RoomChangeNumSlots_Notify
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::GrantModerator | ( | LobbyClientUserId * | userId | ) | [virtual] |
Grants moderator to another room member. This room member cannot be a spectator. Changing moderators clears current private slot invitations Other room members will get the callback RoomNewModerator_Notify()
LobbyClientInterfaceCB::RoomNewModerator_Notify
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::StartGame | ( | void | ) | [virtual] |
Attempts to start the game. All members in the room must be ready, set by calling SetReadyToPlayStatus(true) All members, including spectators, will get the callback StartGame_Notify() if successful This callback contains a list of all members in the room, along with SystemAddresses and other pertinent information
LobbyClientInterfaceCB::StartGame_Notify()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::SubmitMatch | ( | RankingServerDBSpec::SubmitMatch_Data * | input | ) | [virtual] |
Submits the results of a match between two users This is typically a server command, not a user command For security, your IP must be in the trustedIpList table.
[in] | input | Data corresponding to the match. See RankingServerDBSpec.h for all parameters. |
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DownloadRating | ( | RankingServerDBSpec::GetRatingForParticipant_Data * | input | ) | [virtual] |
Downloads the rating for a particular user
[in] | input | Which user you are referring to. See RankingServerDBSpec.h for all parameters. |
Implements RakNet::LobbyClientInterface.
RankingServerDBSpec::GetRatingForParticipant_Data * LobbyClientPC::GetRating | ( | void | ) | [virtual] |
Returns the rating that was most recently downloaded
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::QuickMatch | ( | int | requiredPlayers, | |
int | timeoutInSeconds | |||
) | [virtual] |
A quick match automatically groups other users that have also called QuickMatch(). The only condition is that they are in the same game, and have at least the value of requiredPlayers When the game starts all members will get the callback StartGame_Notify() The moderator is chosen at random. If the timer elapses with not enough members to start the game, the callback QuickMatchTimeout_Notify() will be called.
LobbyClientInterfaceCB::StartGame_Notify()
LobbyClientInterfaceCB::QuickMatchTimeout_Notify()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::CancelQuickMatch | ( | void | ) | [virtual] |
Cancel a prior call to QuickMatch() assuming timeoutInSeconds did not yet elapse.
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::DownloadActionHistory | ( | bool | ascendingSort | ) | [virtual] |
Downloads the action history for yourself
[in] | ascendingSort | Sort order, by upload date |
GetActionHistoryList()
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::AddToActionHistory | ( | LobbyDBSpec::AddToActionHistory_Data * | input | ) | [virtual] |
Adds to the history of actions for yourself For security, defaultAllowClientsUploadActionHistory must be true in the titles table OR Your IP must be in the trustedIpList table
[in] | input | Data corresponding to the action. See LobbyDBSpec.h for all parameters. |
GetActionHistoryList()
Implements RakNet::LobbyClientInterface.
const DataStructures::List< LobbyDBSpec::AddToActionHistory_Data * > & LobbyClientPC::GetActionHistoryList | ( | void | ) | const [virtual] |
Returns the results of a previous successful call to AddToActionHistory where AddToActionHistory_Result() returned success
Implements RakNet::LobbyClientInterface.
bool LobbyClientPC::GetUserDetails | ( | LobbyClientUserId * | userId, | |
LobbyUserClientDetails * | details | |||
) | [virtual] |
Lookup extra details on a user specified by id Currently only users in your current room are downloaded.
Implements RakNet::LobbyClientInterface.
LobbyClientUserId * LobbyClientPC::GerUserIdFromName | ( | const char * | name | ) | [virtual] |
Given the name of a user, return the id
Implements RakNet::LobbyClientInterface.
void LobbyClientPC::OnAttach | ( | RakPeerInterface * | peer | ) | [protected, virtual] |
Called when the interface is attached
[in] | peer | the instance of RakPeer that is calling Receive |
Reimplemented from PluginInterface.
PluginReceiveResult LobbyClientPC::OnReceive | ( | RakPeerInterface * | peer, | |
Packet * | packet | |||
) | [protected, virtual] |
OnReceive is called for every packet.
[in] | peer | the instance of RakPeer that is calling Receive |
[in] | packet | the packet that is being returned to the user |
Reimplemented from PluginInterface.
void LobbyClientPC::OnCloseConnection | ( | RakPeerInterface * | peer, | |
SystemAddress | systemAddress | |||
) | [protected, virtual] |
Called when a connection is dropped because the user called RakPeer::CloseConnection() for a particular system
[in] | peer | the instance of RakPeer that is calling Receive |
[in] | systemAddress | The system whose connection was closed |
Reimplemented from PluginInterface.
void LobbyClientPC::OnShutdown | ( | RakPeerInterface * | peer | ) | [protected, virtual] |
Called when RakPeer is shutdown
[in] | peer | the instance of RakPeer that is calling Receive |
Reimplemented from PluginInterface.