GOG GALAXY SDK Documentation
|
The interface for managing game lobbies. More...
#include <IMatchmaking.h>
Public Member Functions | |
virtual void | CreateLobby (LobbyType lobbyType, uint32_t maxMembers, bool joinable, LobbyTopologyType lobbyTopologyType, ILobbyCreatedListener *const lobbyCreatedListener=NULL, ILobbyEnteredListener *const lobbyEnteredListener=NULL)=0 |
Creates a lobby. More... | |
virtual void | RequestLobbyList (bool allowFullLobbies=false, ILobbyListListener *const listener=NULL)=0 |
Performs a request for a list of relevant lobbies. More... | |
virtual void | AddRequestLobbyListResultCountFilter (uint32_t limit)=0 |
Sets the maximum number of lobbies to be returned next time you call RequestLobbyList(). More... | |
virtual void | AddRequestLobbyListStringFilter (const char *keyToMatch, const char *valueToMatch, LobbyComparisonType comparisonType)=0 |
Adds a string filter to be applied next time you call RequestLobbyList(). More... | |
virtual void | AddRequestLobbyListNumericalFilter (const char *keyToMatch, int32_t valueToMatch, LobbyComparisonType comparisonType)=0 |
Adds a numerical filter to be applied next time you call RequestLobbyList(). More... | |
virtual void | AddRequestLobbyListNearValueFilter (const char *keyToMatch, int32_t valueToBeCloseTo)=0 |
Adds a near value filter to be applied next time you call RequestLobbyList(). More... | |
virtual GalaxyID | GetLobbyByIndex (uint32_t index)=0 |
Returns GalaxyID of a retrieved lobby by index. More... | |
virtual void | JoinLobby (GalaxyID lobbyID, ILobbyEnteredListener *const listener=NULL)=0 |
Joins a specified existing lobby. More... | |
virtual void | LeaveLobby (GalaxyID lobbyID, ILobbyLeftListener *const listener=NULL)=0 |
Leaves a specified lobby. More... | |
virtual void | SetMaxNumLobbyMembers (GalaxyID lobbyID, uint32_t maxNumLobbyMembers, ILobbyDataUpdateListener *const listener=NULL)=0 |
Sets the maximum number of users that can be in a specified lobby. More... | |
virtual uint32_t | GetMaxNumLobbyMembers (GalaxyID lobbyID)=0 |
Returns the maximum number of users that can be in a specified lobby. More... | |
virtual uint32_t | GetNumLobbyMembers (GalaxyID lobbyID)=0 |
Returns the number of users in a specified lobby. More... | |
virtual GalaxyID | GetLobbyMemberByIndex (GalaxyID lobbyID, uint32_t index)=0 |
Returns the GalaxyID of a user in a specified lobby. More... | |
virtual void | SetLobbyType (GalaxyID lobbyID, LobbyType lobbyType, ILobbyDataUpdateListener *const listener=NULL)=0 |
Sets the type of a specified lobby. More... | |
virtual LobbyType | GetLobbyType (GalaxyID lobbyID)=0 |
Returns the type of a specified lobby. More... | |
virtual void | SetLobbyJoinable (GalaxyID lobbyID, bool joinable, ILobbyDataUpdateListener *const listener=NULL)=0 |
Sets if a specified lobby is joinable. More... | |
virtual bool | IsLobbyJoinable (GalaxyID lobbyID)=0 |
Checks if a specified lobby is joinable. More... | |
virtual void | RequestLobbyData (GalaxyID lobbyID, ILobbyDataRetrieveListener *const listener=NULL)=0 |
Refreshes info about a specified lobby. More... | |
virtual const char * | GetLobbyData (GalaxyID lobbyID, const char *key)=0 |
Returns an entry from the properties of a specified lobby. More... | |
virtual void | GetLobbyDataCopy (GalaxyID lobbyID, const char *key, char *buffer, uint32_t bufferLength)=0 |
Copies an entry from the properties of a specified lobby. More... | |
virtual void | SetLobbyData (GalaxyID lobbyID, const char *key, const char *value, ILobbyDataUpdateListener *const listener=NULL)=0 |
Creates or updates an entry in the properties of a specified lobby. More... | |
virtual uint32_t | GetLobbyDataCount (GalaxyID lobbyID)=0 |
Returns the number of entries in the properties of a specified lobby. More... | |
virtual bool | GetLobbyDataByIndex (GalaxyID lobbyID, uint32_t index, char *key, uint32_t keyLength, char *value, uint32_t valueLength)=0 |
Returns a property of a specified lobby by index. More... | |
virtual void | DeleteLobbyData (GalaxyID lobbyID, const char *key, ILobbyDataUpdateListener *const listener=NULL)=0 |
Clears a property of a specified lobby by its name. More... | |
virtual const char * | GetLobbyMemberData (GalaxyID lobbyID, GalaxyID memberID, const char *key)=0 |
Returns an entry from the properties of a specified member of a specified lobby. More... | |
virtual void | GetLobbyMemberDataCopy (GalaxyID lobbyID, GalaxyID memberID, const char *key, char *buffer, uint32_t bufferLength)=0 |
Copies an entry from the properties of a specified member of a specified lobby. More... | |
virtual void | SetLobbyMemberData (GalaxyID lobbyID, const char *key, const char *value, ILobbyMemberDataUpdateListener *const listener=NULL)=0 |
Creates or updates an entry in the user's properties (as a lobby member) in a specified lobby. More... | |
virtual uint32_t | GetLobbyMemberDataCount (GalaxyID lobbyID, GalaxyID memberID)=0 |
Returns the number of entries in the properties of a specified member of a specified lobby. More... | |
virtual bool | GetLobbyMemberDataByIndex (GalaxyID lobbyID, GalaxyID memberID, uint32_t index, char *key, uint32_t keyLength, char *value, uint32_t valueLength)=0 |
Returns a property of a specified lobby member by index. More... | |
virtual void | DeleteLobbyMemberData (GalaxyID lobbyID, const char *key, ILobbyMemberDataUpdateListener *const listener=NULL)=0 |
Clears a property of a specified lobby member by its name. More... | |
virtual GalaxyID | GetLobbyOwner (GalaxyID lobbyID)=0 |
Returns the owner of a specified lobby. More... | |
virtual bool | SendLobbyMessage (GalaxyID lobbyID, const void *data, uint32_t dataSize)=0 |
Sends a message to all lobby members, including the sender. More... | |
virtual uint32_t | GetLobbyMessage (GalaxyID lobbyID, uint32_t messageID, GalaxyID &senderID, char *msg, uint32_t msgLength)=0 |
Receives a specified message from one of the members of a specified lobby. More... | |
The interface for managing game lobbies.
|
pure virtual |
Adds a near value filter to be applied next time you call RequestLobbyList().
You can add multiple filters. All filters operate on lobby properties.
[in] | keyToMatch | The key to match. |
[in] | valueToBeCloseTo | The value to be close to. |
|
pure virtual |
Adds a numerical filter to be applied next time you call RequestLobbyList().
You can add multiple filters. All filters operate on lobby properties.
[in] | keyToMatch | The key to match. |
[in] | valueToMatch | The value to match. |
[in] | comparisonType | The type of comparison. |
|
pure virtual |
Sets the maximum number of lobbies to be returned next time you call RequestLobbyList().
You can add multiple filters. All filters operate on lobby properties.
[in] | limit | The maximum non-zero number of lobbies to retrieve. |
|
pure virtual |
Adds a string filter to be applied next time you call RequestLobbyList().
You can add multiple filters. All filters operate on lobby properties.
[in] | keyToMatch | The key to match. |
[in] | valueToMatch | The value to match. |
[in] | comparisonType | The type of comparison. |
|
pure virtual |
Creates a lobby.
Depending on the lobby type specified, the lobby will be visible for other users and joinable either for everyone or just specific users.
This call is asynchronous. Responses come to the ILobbyCreatedListener, as well as ILobbyEnteredListener, provided that the lobby was created successfully, in which case the owning user enters it automatically.
[in] | lobbyType | The type of the lobby. |
[in] | maxMembers | The maximum number of members allowed for the lobby with the limit of 250 members. |
[in] | joinable | Is the lobby joinable. |
[in] | lobbyTopologyType | The type of the lobby topology. |
[in] | lobbyCreatedListener | The lobby creation listener for specific operation call. |
[in] | lobbyEnteredListener | The lobby entering listener for specific operation call. |
|
pure virtual |
Clears a property of a specified lobby by its name.
This is the same as calling SetLobbyData() and providing an empty string as the value of the property that is to be altered.
Each user that is a member of the lobby will receive a notification when the properties of the lobby are changed. The notifications come to ILobbyDataListener.
[in] | lobbyID | The ID of the lobby. |
[in] | key | The name of the property of the lobby. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Clears a property of a specified lobby member by its name.
This is the same as calling SetLobbyMemberData() and providing an empty string as the value of the property that is to be altered.
Each user that is a member of the lobby will receive a notification when the lobby member properties are changed. The notifications come to ILobbyDataListener.
[in] | lobbyID | The ID of the lobby. |
[in] | key | The name of the property of the lobby member. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Returns GalaxyID of a retrieved lobby by index.
Use this call to iterate over last retrieved lobbies, indexed from 0.
[in] | index | Index as an integer in the range of [0, number of lobbies fetched). |
|
pure virtual |
Returns an entry from the properties of a specified lobby.
It returns an empty string if there is no such property of the lobby, or if the ID of the lobby is invalid.
[in] | lobbyID | The ID of the lobby. |
[in] | key | The name of the property of the lobby. |
|
pure virtual |
Returns a property of a specified lobby by index.
[in] | lobbyID | The ID of the lobby. |
[in] | index | Index as an integer in the range of [0, number of entries). |
[in,out] | key | The name of the property of the lobby. |
[in] | keyLength | The length of the name of the property of the lobby. |
[in,out] | value | The value of the property of the lobby. |
[in] | valueLength | The length of the value of the property of the lobby. |
|
pure virtual |
Copies an entry from the properties of a specified lobby.
It copies an empty string if there is no such property of the lobby, or if the ID of the lobby is invalid.
[in] | lobbyID | The ID of the lobby. |
[in] | key | The name of the property of the lobby. |
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
|
pure virtual |
Returns the number of entries in the properties of a specified lobby.
[in] | lobbyID | The ID of the lobby. |
Returns the GalaxyID of a user in a specified lobby.
[in] | lobbyID | The ID of the lobby. |
[in] | index | Index as an integer in the range of [0, number of lobby members). |
|
pure virtual |
Returns an entry from the properties of a specified member of a specified lobby.
It returns an empty string if there is no such property of the member of the lobby, or if any of the specified IDs are invalid (including false membership).
[in] | lobbyID | The ID of the lobby. |
[in] | memberID | The ID of the lobby member. |
[in] | key | The name of the property of the lobby member. |
|
pure virtual |
Returns a property of a specified lobby member by index.
[in] | lobbyID | The ID of the lobby. |
[in] | memberID | The ID of the lobby member. |
[in] | index | Index as an integer in the range of [0, number of entries). |
[in,out] | key | The name of the property of the lobby member. |
[in] | keyLength | The length of the name of the property of the lobby member. |
[in,out] | value | The value of the property of the lobby member. |
[in] | valueLength | The length of the value of the property of the lobby member. |
|
pure virtual |
Copies an entry from the properties of a specified member of a specified lobby.
It copies an empty string if there is no such property of the member of the lobby, or if any of the specified IDs are invalid (including false membership).
[in] | lobbyID | The ID of the lobby. |
[in] | memberID | The ID of the lobby member. |
[in] | key | The name of the property of the lobby member. |
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
Returns the number of entries in the properties of a specified member of a specified lobby.
[in] | lobbyID | The ID of the lobby. |
[in] | memberID | The ID of the lobby member. |
|
pure virtual |
Receives a specified message from one of the members of a specified lobby.
[in] | lobbyID | The ID of the lobby. |
[in] | messageID | The ID of the message. |
[out] | senderID | The ID of the sender. |
[in,out] | msg | The buffer to pass the data to. |
[in] | msgLength | The size of the buffer. |
Returns the owner of a specified lobby.
[in] | lobbyID | The ID of the lobby. |
Returns the type of a specified lobby.
[in] | lobbyID | The ID of the lobby. |
|
pure virtual |
Returns the maximum number of users that can be in a specified lobby.
[in] | lobbyID | The ID of the lobby to check. |
|
pure virtual |
Returns the number of users in a specified lobby.
[in] | lobbyID | The ID of the lobby to check. |
|
pure virtual |
Checks if a specified lobby is joinable.
[in] | lobbyID | The ID of the lobby. |
|
pure virtual |
Joins a specified existing lobby.
This call is asynchronous. Responses come to the ILobbyEnteredListener.
For other lobby members notifications come to the ILobbyMemberStateListener.
[in] | lobbyID | The ID of the lobby to join. |
[in] | listener | The listener for specific operation call. |
|
pure virtual |
Leaves a specified lobby.
ILobbyLeftListener will be called when lobby is left. For other lobby members notifications come to the ILobbyMemberStateListener.
Lobby data and lobby messages will not be reachable for lobby that we left.
[in] | lobbyID | The ID of the lobby to leave. |
[in] | listener | The listener for specific operation call. |
|
pure virtual |
Refreshes info about a specified lobby.
This is needed only for the lobbies that the user is not currently in, since for entered lobbies any info is updated automatically.
This call is asynchronous. Responses come to the ILobbyDataListener and ILobbyDataRetrieveListener.
[in] | lobbyID | The ID of the lobby. |
[in] | listener | The listener for specific operation call. |
|
pure virtual |
Performs a request for a list of relevant lobbies.
This call is asynchronous. When the list is received, a notification will come to the ILobbyListListener. The notification contains only the number of lobbies that were found and are available for reading.
In order to read subsequent lobbies, call GetLobbyByIndex().
[in] | allowFullLobbies | Are full lobbies allowed. |
[in] | listener | The listener for specific operation call. |
|
pure virtual |
Sends a message to all lobby members, including the sender.
For all the lobby members there comes a notification to the ILobbyMessageListener. Since that moment it is possible to retrieve the message by ID using GetLobbyMessage().
[in] | lobbyID | The ID of the lobby. |
[in] | data | The data to send. |
[in] | dataSize | The length of the data. |
|
pure virtual |
Creates or updates an entry in the properties of a specified lobby.
The properties can be used for matchmaking or broadcasting any lobby data (e.g. the name of the lobby) to other Galaxy Peers.
The properties are assigned to the lobby and available for matchmaking. Each user that is a member of the lobby will receive a notification when the properties of the lobby are changed. The notifications come to ILobbyDataListener.
Any user that joins the lobby will be able to read the data.
[in] | lobbyID | The ID of the lobby. |
[in] | key | The name of the property of the lobby with the limit of 1023 bytes. |
[in] | value | The value of the property to set with the limit of 4095 bytes. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Sets if a specified lobby is joinable.
[in] | lobbyID | The ID of the lobby. |
[in] | joinable | Is the lobby joinable. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Creates or updates an entry in the user's properties (as a lobby member) in a specified lobby.
The properties can be used for broadcasting any data as the lobby member data (e.g. the name of the user in the lobby) to other lobby members.
The properties are assigned to the user as a lobby member in the lobby. Each user that is a member of the lobby will receive a notification when the lobby member properties are changed. The notifications come to ILobbyDataListener.
Any user that joins the lobby will be able to read the data.
[in] | lobbyID | The ID of the lobby. |
[in] | key | The name of the property of the lobby member with the limit of 1023 bytes. |
[in] | value | The value of the property to set with the limit of 4095 bytes. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Sets the type of a specified lobby.
[in] | lobbyID | The ID of the lobby. |
[in] | lobbyType | The type of the lobby. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Sets the maximum number of users that can be in a specified lobby.
[in] | lobbyID | The ID of the lobby to check. |
[in] | maxNumLobbyMembers | The maximum number of members allowed for the lobby with the limit of 250 members. |
[in] | listener | The listener for specific operation. |