Method | Description | |
---|---|---|
AddFavoriteGame ( AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer ) : int |
adds the game server to the local list; updates the time played of the server if it already exists in the list
|
|
AddRequestLobbyListCompatibleMembersFilter ( CSteamID steamIDLobby ) : void | ||
AddRequestLobbyListDistanceFilter ( ELobbyDistanceFilter eLobbyDistanceFilter ) : void |
sets the distance for which we should search for lobbies (based on users IP address to location map on the Steam backed)
|
|
AddRequestLobbyListFilterSlotsAvailable ( int nSlotsAvailable ) : void |
returns only lobbies with the specified number of slots available
|
|
AddRequestLobbyListNearValueFilter ( string pchKeyToMatch, int nValueToBeCloseTo ) : void |
returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence
|
|
AddRequestLobbyListNumericalFilter ( string pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType ) : void |
numerical comparison
|
|
AddRequestLobbyListResultCountFilter ( int cMaxResults ) : void |
sets how many results to return, the lower the count the faster it is to download the lobby results & details to the client
|
|
AddRequestLobbyListStringFilter ( string pchKeyToMatch, string pchValueToMatch, ELobbyComparison eComparisonType ) : void |
filters for lobbies this needs to be called before RequestLobbyList() to take effect these are cleared on each call to RequestLobbyList()
|
|
CheckForPSNGameBootInvite ( uint iGameBootAttributes ) : void |
changes who the lobby owner is you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby after completion, the local user will no longer be the owner
|
|
CreateLobby ( ELobbyType eLobbyType, int cMaxMembers ) : SteamAPICall_t |
Create a lobby on the Steam servers. If private, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID of the lobby will need to be communicated via game channels or via InviteUserToLobby() this is an asynchronous request results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this point a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
|
DeleteLobbyData ( CSteamID steamIDLobby, string pchKey ) : bool |
removes a metadata key from the lobby
|
|
GetFavoriteGame ( int iGame, AppId_t &pnAppID, uint &pnIP, ushort &pnConnPort, ushort &pnQueryPort, uint &punFlags, uint &pRTime32LastPlayedOnServer ) : bool |
returns the details of the game server iGame is of range [0,GetFavoriteGameCount()) *pnIP, *pnConnPort are filled in the with IP:port of the game server *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added
|
|
GetFavoriteGameCount ( ) : int |
game server favorites storage saves basic details about a multiplayer game server locally returns the number of favorites servers the user has stored
|
|
GetLobbyByIndex ( int iLobby ) : CSteamID |
returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call should only be called after a LobbyMatchList_t callback is received iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) the returned CSteamID::IsValid() will be false if iLobby is out of range
|
|
GetLobbyChatEntry ( CSteamID steamIDLobby, int iChatID, CSteamID &pSteamIDUser, byte pvData, int cubData, EChatEntryType &peChatEntryType ) : int |
Get a chat message as specified in a LobbyChatMsg_t callback iChatID is the LobbyChatMsg_t::m_iChatID value in the callback *pSteamIDUser is filled in with the CSteamID of the member *pvData is filled in with the message itself return value is the number of bytes written into the buffer
|
|
GetLobbyData ( CSteamID steamIDLobby, string pchKey ) : string |
Get data associated with this lobby takes a simple key, and returns the string associated with it "" will be returned if no value is set, or if steamIDLobby is invalid
|
|
GetLobbyDataByIndex ( CSteamID steamIDLobby, int iLobbyData, string &pchKey, int cchKeyBufferSize, string &pchValue, int cchValueBufferSize ) : bool |
returns a lobby metadata key/values pair by index, of range [0, GetLobbyDataCount())
|
|
GetLobbyDataCount ( CSteamID steamIDLobby ) : int |
returns the number of metadata keys set on the specified lobby
|
|
GetLobbyGameServer ( CSteamID steamIDLobby, uint &punGameServerIP, ushort &punGameServerPort, CSteamID &psteamIDGameServer ) : bool |
returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist
|
|
GetLobbyMemberByIndex ( CSteamID steamIDLobby, int iMember ) : CSteamID |
returns the CSteamID of a user in the lobby iMember is of range [0,GetNumLobbyMembers()) note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby
|
|
GetLobbyMemberData ( CSteamID steamIDLobby, CSteamID steamIDUser, string pchKey ) : string |
Gets per-user metadata for someone in this lobby
|
|
GetLobbyMemberLimit ( CSteamID steamIDLobby ) : int |
returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined
|
|
GetLobbyOwner ( CSteamID steamIDLobby ) : CSteamID |
returns the current lobby owner you must be a member of the lobby to access this there always one lobby owner - if the current owner leaves, another user will become the owner it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner
|
|
GetNumLobbyMembers ( CSteamID steamIDLobby ) : int |
Lobby iteration, for viewing details of users in a lobby only accessible if the lobby user is a member of the specified lobby persona information for other lobby members (name, avatar, etc.) will be asynchronously received and accessible via ISteamFriends interface returns the number of users in the specified lobby
|
|
InviteUserToLobby ( CSteamID steamIDLobby, CSteamID steamIDInvitee ) : bool |
Invite another user to the lobby the target user will receive a LobbyInvite_t callback will return true if the invite is successfully sent, whether or not the target responds returns false if the local user is not connected to the Steam servers if the other user clicks the join link, a GameLobbyJoinRequested_t will be posted if the user is in-game, or if the game isn't running yet the game will be launched with the parameter +connect_lobby <64-bit lobby id>
|
|
JoinLobby ( CSteamID steamIDLobby ) : SteamAPICall_t |
Joins an existing lobby this is an asynchronous request results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful lobby metadata is available to use immediately on this call completing
|
|
LeaveLobby ( CSteamID steamIDLobby ) : void |
Leave a lobby; this will take effect immediately on the client side other users in the lobby will be notified by a LobbyChatUpdate_t callback
|
|
RemoveFavoriteGame ( AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags ) : bool |
removes the game server from the local storage; returns true if one was removed
|
|
RequestLobbyData ( CSteamID steamIDLobby ) : bool |
Refreshes metadata for a lobby you're not necessarily in right now you never do this for lobbies you're a member of, only if your this will send down all the metadata associated with a lobby this is an asynchronous call returns false if the local user is not connected to the Steam servers results will be returned by a LobbyDataUpdate_t callback if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false
|
|
RequestLobbyList ( ) : SteamAPICall_t |
///// Game lobby functions Get a list of relevant lobbies this is an asynchronous request results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found this will never return lobbies that are full to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g. class CMyLobbyListManager { CCallResult<CMyLobbyListManager, LobbyMatchList_t> m_CallResultLobbyMatchList; void FindLobbies() { // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList() SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList(); m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList ); } void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure ) { // lobby list has be retrieved from Steam back-end, use results } }
|
|
SendLobbyChatMsg ( CSteamID steamIDLobby, byte pvMsgBody, int cubMsgBody ) : bool |
Broadcasts a chat message to the all the users in the lobby users in the lobby (including the local user) will receive a LobbyChatMsg_t callback returns true if the message is successfully sent pvMsgBody can be binary or text data, up to 4k if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator
|
|
SetLinkedLobby ( CSteamID steamIDLobby, CSteamID steamIDLobbyDependent ) : bool |
link two lobbies for the purposes of checking player compatibility you must be the lobby owner of both lobbies
|
|
SetLobbyData ( CSteamID steamIDLobby, string pchKey, string pchValue ) : bool |
Sets a key/value pair in the lobby metadata each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data this can be used to set lobby names, map, etc. to reset a key, just set it to "" other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback
|
|
SetLobbyGameServer ( CSteamID steamIDLobby, uint unGameServerIP, ushort unGameServerPort, CSteamID steamIDGameServer ) : void |
sets the game server associated with the lobby usually at this point, the users will join the specified game server either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect
|
|
SetLobbyJoinable ( CSteamID steamIDLobby, bool bLobbyJoinable ) : bool |
sets whether or not a lobby is joinable - defaults to true for a new lobby if set to false, no user can join, even if they are a friend or have been invited
|
|
SetLobbyMemberData ( CSteamID steamIDLobby, string pchKey, string pchValue ) : void |
Sets per-user metadata (for the local user implicitly)
|
|
SetLobbyMemberLimit ( CSteamID steamIDLobby, int cMaxMembers ) : bool |
set the limit on the # of users who can join the lobby
|
|
SetLobbyOwner ( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) : bool |
changes who the lobby owner is you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby after completion, the local user will no longer be the owner
|
|
SetLobbyType ( CSteamID steamIDLobby, ELobbyType eLobbyType ) : bool |
updates which type of lobby it is only lobbies that are k_ELobbyTypePublic or k_ELobbyTypeInvisible, and are set to joinable, will be returned by RequestLobbyList() calls
|
public static AddFavoriteGame ( AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer ) : int | ||
nAppID | AppId_t | |
nIP | uint | |
nConnPort | ushort | |
nQueryPort | ushort | |
unFlags | uint | |
rTime32LastPlayedOnServer | uint | |
return | int |
public static AddRequestLobbyListCompatibleMembersFilter ( CSteamID steamIDLobby ) : void | ||
steamIDLobby | CSteamID | |
return | void |
public static AddRequestLobbyListDistanceFilter ( ELobbyDistanceFilter eLobbyDistanceFilter ) : void | ||
eLobbyDistanceFilter | ELobbyDistanceFilter | |
return | void |
public static AddRequestLobbyListFilterSlotsAvailable ( int nSlotsAvailable ) : void | ||
nSlotsAvailable | int | |
return | void |
public static AddRequestLobbyListNearValueFilter ( string pchKeyToMatch, int nValueToBeCloseTo ) : void | ||
pchKeyToMatch | string | |
nValueToBeCloseTo | int | |
return | void |
public static AddRequestLobbyListNumericalFilter ( string pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType ) : void | ||
pchKeyToMatch | string | |
nValueToMatch | int | |
eComparisonType | ELobbyComparison | |
return | void |
public static AddRequestLobbyListResultCountFilter ( int cMaxResults ) : void | ||
cMaxResults | int | |
return | void |
public static AddRequestLobbyListStringFilter ( string pchKeyToMatch, string pchValueToMatch, ELobbyComparison eComparisonType ) : void | ||
pchKeyToMatch | string | |
pchValueToMatch | string | |
eComparisonType | ELobbyComparison | |
return | void |
public static CheckForPSNGameBootInvite ( uint iGameBootAttributes ) : void | ||
iGameBootAttributes | uint | |
return | void |
public static CreateLobby ( ELobbyType eLobbyType, int cMaxMembers ) : SteamAPICall_t | ||
eLobbyType | ELobbyType | |
cMaxMembers | int | |
return | SteamAPICall_t |
public static DeleteLobbyData ( CSteamID steamIDLobby, string pchKey ) : bool | ||
steamIDLobby | CSteamID | |
pchKey | string | |
return | bool |
public static GetFavoriteGame ( int iGame, AppId_t &pnAppID, uint &pnIP, ushort &pnConnPort, ushort &pnQueryPort, uint &punFlags, uint &pRTime32LastPlayedOnServer ) : bool | ||
iGame | int | |
pnAppID | AppId_t | |
pnIP | uint | |
pnConnPort | ushort | |
pnQueryPort | ushort | |
punFlags | uint | |
pRTime32LastPlayedOnServer | uint | |
return | bool |
public static GetLobbyByIndex ( int iLobby ) : CSteamID | ||
iLobby | int | |
return | CSteamID |
public static GetLobbyChatEntry ( CSteamID steamIDLobby, int iChatID, CSteamID &pSteamIDUser, byte pvData, int cubData, EChatEntryType &peChatEntryType ) : int | ||
steamIDLobby | CSteamID | |
iChatID | int | |
pSteamIDUser | CSteamID | |
pvData | byte | |
cubData | int | |
peChatEntryType | EChatEntryType | |
return | int |
public static GetLobbyData ( CSteamID steamIDLobby, string pchKey ) : string | ||
steamIDLobby | CSteamID | |
pchKey | string | |
return | string |
public static GetLobbyDataByIndex ( CSteamID steamIDLobby, int iLobbyData, string &pchKey, int cchKeyBufferSize, string &pchValue, int cchValueBufferSize ) : bool | ||
steamIDLobby | CSteamID | |
iLobbyData | int | |
pchKey | string | |
cchKeyBufferSize | int | |
pchValue | string | |
cchValueBufferSize | int | |
return | bool |
public static GetLobbyDataCount ( CSteamID steamIDLobby ) : int | ||
steamIDLobby | CSteamID | |
return | int |
public static GetLobbyGameServer ( CSteamID steamIDLobby, uint &punGameServerIP, ushort &punGameServerPort, CSteamID &psteamIDGameServer ) : bool | ||
steamIDLobby | CSteamID | |
punGameServerIP | uint | |
punGameServerPort | ushort | |
psteamIDGameServer | CSteamID | |
return | bool |
public static GetLobbyMemberByIndex ( CSteamID steamIDLobby, int iMember ) : CSteamID | ||
steamIDLobby | CSteamID | |
iMember | int | |
return | CSteamID |
public static GetLobbyMemberData ( CSteamID steamIDLobby, CSteamID steamIDUser, string pchKey ) : string | ||
steamIDLobby | CSteamID | |
steamIDUser | CSteamID | |
pchKey | string | |
return | string |
public static GetLobbyMemberLimit ( CSteamID steamIDLobby ) : int | ||
steamIDLobby | CSteamID | |
return | int |
public static GetLobbyOwner ( CSteamID steamIDLobby ) : CSteamID | ||
steamIDLobby | CSteamID | |
return | CSteamID |
public static GetNumLobbyMembers ( CSteamID steamIDLobby ) : int | ||
steamIDLobby | CSteamID | |
return | int |
public static InviteUserToLobby ( CSteamID steamIDLobby, CSteamID steamIDInvitee ) : bool | ||
steamIDLobby | CSteamID | |
steamIDInvitee | CSteamID | |
return | bool |
public static JoinLobby ( CSteamID steamIDLobby ) : SteamAPICall_t | ||
steamIDLobby | CSteamID | |
return | SteamAPICall_t |
public static LeaveLobby ( CSteamID steamIDLobby ) : void | ||
steamIDLobby | CSteamID | |
return | void |
public static RemoveFavoriteGame ( AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags ) : bool | ||
nAppID | AppId_t | |
nIP | uint | |
nConnPort | ushort | |
nQueryPort | ushort | |
unFlags | uint | |
return | bool |
public static RequestLobbyData ( CSteamID steamIDLobby ) : bool | ||
steamIDLobby | CSteamID | |
return | bool |
public static RequestLobbyList ( ) : SteamAPICall_t | ||
return | SteamAPICall_t |
public static SendLobbyChatMsg ( CSteamID steamIDLobby, byte pvMsgBody, int cubMsgBody ) : bool | ||
steamIDLobby | CSteamID | |
pvMsgBody | byte | |
cubMsgBody | int | |
return | bool |
public static SetLinkedLobby ( CSteamID steamIDLobby, CSteamID steamIDLobbyDependent ) : bool | ||
steamIDLobby | CSteamID | |
steamIDLobbyDependent | CSteamID | |
return | bool |
public static SetLobbyData ( CSteamID steamIDLobby, string pchKey, string pchValue ) : bool | ||
steamIDLobby | CSteamID | |
pchKey | string | |
pchValue | string | |
return | bool |
public static SetLobbyGameServer ( CSteamID steamIDLobby, uint unGameServerIP, ushort unGameServerPort, CSteamID steamIDGameServer ) : void | ||
steamIDLobby | CSteamID | |
unGameServerIP | uint | |
unGameServerPort | ushort | |
steamIDGameServer | CSteamID | |
return | void |
public static SetLobbyJoinable ( CSteamID steamIDLobby, bool bLobbyJoinable ) : bool | ||
steamIDLobby | CSteamID | |
bLobbyJoinable | bool | |
return | bool |
public static SetLobbyMemberData ( CSteamID steamIDLobby, string pchKey, string pchValue ) : void | ||
steamIDLobby | CSteamID | |
pchKey | string | |
pchValue | string | |
return | void |
public static SetLobbyMemberLimit ( CSteamID steamIDLobby, int cMaxMembers ) : bool | ||
steamIDLobby | CSteamID | |
cMaxMembers | int | |
return | bool |
public static SetLobbyOwner ( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) : bool | ||
steamIDLobby | CSteamID | |
steamIDNewOwner | CSteamID | |
return | bool |
public static SetLobbyType ( CSteamID steamIDLobby, ELobbyType eLobbyType ) : bool | ||
steamIDLobby | CSteamID | |
eLobbyType | ELobbyType | |
return | bool |