All interface versions from sdk 1.0 and up are now supported.
parent
d076d12c6e
commit
d3e8a701dd
@ -0,0 +1,82 @@
|
||||
|
||||
#ifndef ISTEAMFRIENDS003_H
|
||||
#define ISTEAMFRIENDS003_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
class ISteamFriends003
|
||||
{
|
||||
public:
|
||||
// returns the local players name - guaranteed to not be NULL.
|
||||
// this is the same name as on the users community profile page
|
||||
// this is stored in UTF-8 format
|
||||
// like all the other interface functions that return a char *, it's important that this pointer is not saved
|
||||
// off; it will eventually be free'd or re-allocated
|
||||
virtual const char *GetPersonaName() = 0;
|
||||
|
||||
// sets the player name, stores it on the server and publishes the changes to all friends who are online
|
||||
virtual void SetPersonaName_old( const char *pchPersonaName ) = 0;
|
||||
|
||||
// gets the status of the current user
|
||||
virtual EPersonaState GetPersonaState() = 0;
|
||||
|
||||
// friend iteration
|
||||
// takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria
|
||||
// then GetFriendByIndex() can then be used to return the id's of each of those users
|
||||
virtual int GetFriendCount( int iFriendFlags ) = 0;
|
||||
|
||||
// returns the steamID of a user
|
||||
// iFriend is a index of range [0, GetFriendCount())
|
||||
// iFriendsFlags must be the same value as used in GetFriendCount()
|
||||
// the returned CSteamID can then be used by all the functions below to access details about the user
|
||||
virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0;
|
||||
|
||||
// returns a relationship to a user
|
||||
virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// returns the current status of the specified user
|
||||
// this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user
|
||||
virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// returns the name another user - guaranteed to not be NULL.
|
||||
// same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user
|
||||
// note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously
|
||||
//
|
||||
virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// gets the avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
|
||||
virtual int GetFriendAvatar( CSteamID steamIDFriend ) = 0;
|
||||
// returns true if the friend is actually in a game
|
||||
virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort, uint16 *pusQueryPort ) = 0;
|
||||
// accesses old friends names - returns an empty string when their are no more items in the history
|
||||
virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0;
|
||||
|
||||
// returns true if the specified user meets any of the criteria specified in iFriendFlags
|
||||
// iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values
|
||||
virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0;
|
||||
|
||||
// clan (group) iteration and access functions
|
||||
virtual int GetClanCount() = 0;
|
||||
virtual CSteamID GetClanByIndex( int iClan ) = 0;
|
||||
virtual const char *GetClanName( CSteamID steamIDClan ) = 0;
|
||||
|
||||
// iterators for getting users in a chat room, lobby, game server or clan
|
||||
// note that large clans that cannot be iterated by the local user
|
||||
// steamIDSource can be the steamID of a group, game server, lobby or chat room
|
||||
virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0;
|
||||
virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0;
|
||||
|
||||
// returns true if the local user can see that steamIDUser is a member or in steamIDSource
|
||||
virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0;
|
||||
|
||||
// User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI)
|
||||
virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0;
|
||||
|
||||
// activates the game overlay, with an optional dialog to open ("Friends", "Community", "Players", "Settings")
|
||||
virtual void ActivateGameOverlay( const char *pchDialog ) = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMFRIENDS003_H
|
@ -0,0 +1,84 @@
|
||||
|
||||
#ifndef ISTEAMGAMESERVER004_H
|
||||
#define ISTEAMGAMESERVER004_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
class ISteamGameServer004
|
||||
{
|
||||
public:
|
||||
// connection functions
|
||||
virtual void LogOn() = 0;
|
||||
virtual void LogOff() = 0;
|
||||
|
||||
// status functions
|
||||
virtual bool BLoggedOn() = 0;
|
||||
virtual bool BSecure() = 0;
|
||||
virtual CSteamID GetSteamID() = 0;
|
||||
|
||||
// Handles receiving a new connection from a Steam user. This call will ask the Steam
|
||||
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
|
||||
// are off-line, then it will validate the cached ticket itself which will validate app ownership
|
||||
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
|
||||
// and must then be sent up to the game server for authentication.
|
||||
//
|
||||
// Return Value: true/false depending on whether the call succeeds. If the call succeeds then you
|
||||
// should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
|
||||
// for the user has succeeded or failed.
|
||||
virtual void SendUserConnectAndAuthenticate( CSteamID steamIDUser, uint32 unIPClient, void *pvAuthBlob, uint32 cubAuthBlobSize ) = 0;
|
||||
|
||||
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
|
||||
//
|
||||
// Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect()
|
||||
// when this user leaves the server just like you would for a real user.
|
||||
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
|
||||
|
||||
// Should be called whenever a user leaves our game server, this lets Steam internally
|
||||
// track which users are currently on which servers for the purposes of preventing a single
|
||||
// account being logged into multiple servers, showing who is currently on a server, etc.
|
||||
virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
|
||||
// currently connected to the server. For regular users you must call this after you receive a
|
||||
// GSUserValidationSuccess callback.
|
||||
//
|
||||
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
|
||||
virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0;
|
||||
|
||||
// You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once.
|
||||
//
|
||||
// To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below.
|
||||
//
|
||||
// Input: nGameAppID - The Steam assigned AppID for the game
|
||||
// unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below)
|
||||
// unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY)
|
||||
// unGamePort - The port which the server is listening for client connections on
|
||||
// unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported
|
||||
// usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests
|
||||
// pchGameDir - A unique string identifier for your game
|
||||
// pchVersion - The current version of the server as a string like 1.0.0.0
|
||||
// bLanMode - Is this a LAN only server?
|
||||
//
|
||||
// bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used,
|
||||
// and stop calling it in SteamGameServer_Init()?
|
||||
virtual bool BSetServerType( int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort,
|
||||
uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0;
|
||||
|
||||
// Updates server status values which shows up in the server browser and matchmaking APIs
|
||||
virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers,
|
||||
const char *pchServerName, const char *pSpectatorServerName,
|
||||
const char *pchMapName ) = 0;
|
||||
|
||||
// This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now).
|
||||
virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0;
|
||||
|
||||
// Sets a string defining the "gametype" for this server, this is optional, but if it is set
|
||||
// it allows users to filter in the matchmaking/server-browser interfaces based on the value
|
||||
virtual void SetGameType( const char *pchGameType ) = 0;
|
||||
|
||||
// Ask if a user has a specific achievement for this game, will get a callback on reply
|
||||
virtual bool BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0;
|
||||
};
|
||||
|
||||
#endif // ISTEAMGAMESERVER004_H
|
@ -0,0 +1,126 @@
|
||||
|
||||
#ifndef ISTEAMMATCHMAKING002_H
|
||||
#define ISTEAMMATCHMAKING002_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmaking002
|
||||
{
|
||||
public:
|
||||
// game server favorites storage
|
||||
// saves basic details about a multiplayer game server locally
|
||||
|
||||
// returns the number of favorites servers the user has stored
|
||||
virtual int GetFavoriteGameCount() = 0;
|
||||
|
||||
// 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
|
||||
virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0;
|
||||
|
||||
// adds the game server to the local list; updates the time played of the server if it already exists in the list
|
||||
virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0;
|
||||
|
||||
// removes the game server from the local storage; returns true if one was removed
|
||||
virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0;
|
||||
|
||||
///////
|
||||
// Game lobby functions
|
||||
|
||||
// Get a list of relevant lobbies
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyMatchList_t callback, with the number of servers requested
|
||||
// if the user is not currently connected to Steam (i.e. SteamUser()->BLoggedOn() returns false) then
|
||||
// a LobbyMatchList_t callback will be posted immediately with no servers
|
||||
virtual void RequestLobbyList_OLD() = 0;
|
||||
|
||||
// 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
|
||||
virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;
|
||||
|
||||
// Create a lobby on the Steam servers.
|
||||
// If bPrivate is true, 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 when the lobby has been created;
|
||||
// local user will the join the lobby, resulting in an additional LobbyEnter_t callback being sent
|
||||
// operations on the chat room can only proceed once the LobbyEnter_t has been received
|
||||
virtual void CreateLobby( bool bPrivate ) = 0;
|
||||
|
||||
// Joins an existing lobby
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyEnter_t callback when the lobby has been joined
|
||||
virtual void JoinLobby_OLD( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual void LeaveLobby( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0;
|
||||
|
||||
// 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
|
||||
virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0;
|
||||
// returns the CSteamID of a user in the lobby
|
||||
// iMember is of range [0,GetNumLobbyMembers())
|
||||
virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;
|
||||
|
||||
// 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
|
||||
virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0;
|
||||
// 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
|
||||
virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// As above, but gets per-user data for someone in this lobby
|
||||
virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0;
|
||||
// Sets per-user metadata (for the local user implicitly)
|
||||
virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0;
|
||||
// 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
|
||||
virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
|
||||
|
||||
// Fetch metadata for a lobby you're not necessarily in right now
|
||||
// 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
|
||||
virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// sets the game server associated with the lobby
|
||||
// usually at this point, the users will leave the lobby and 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
|
||||
virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0;
|
||||
};
|
||||
|
||||
#endif // ISTEAMMATCHMAKING002_H
|
@ -0,0 +1,151 @@
|
||||
|
||||
#ifndef ISTEAMMATCHMAKING003_H
|
||||
#define ISTEAMMATCHMAKING003_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmaking003
|
||||
{
|
||||
public:
|
||||
// game server favorites storage
|
||||
// saves basic details about a multiplayer game server locally
|
||||
|
||||
// returns the number of favorites servers the user has stored
|
||||
virtual int GetFavoriteGameCount() = 0;
|
||||
|
||||
// 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
|
||||
virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0;
|
||||
|
||||
// adds the game server to the local list; updates the time played of the server if it already exists in the list
|
||||
virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0;
|
||||
|
||||
// removes the game server from the local storage; returns true if one was removed
|
||||
virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0;
|
||||
|
||||
///////
|
||||
// Game lobby functions
|
||||
|
||||
// Get a list of relevant lobbies
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyMatchList_t callback, with the number of servers requested
|
||||
// if the user is not currently connected to Steam (i.e. SteamUser()->BLoggedOn() returns false) then
|
||||
// a LobbyMatchList_t callback will be posted immediately with no servers
|
||||
virtual void RequestLobbyList_OLD() = 0;
|
||||
|
||||
// filters for lobbies
|
||||
// this needs to be called before RequestLobbyList() to take effect
|
||||
// these are cleared on each call to RequestLobbyList()
|
||||
virtual void AddRequestLobbyListFilter( const char *pchKeyToMatch, const char *pchValueToMatch ) = 0;
|
||||
// numerical comparison - 0 is equal, -1 is the lobby value is less than nValueToMatch, 1 is the lobby value is greater than nValueToMatch
|
||||
virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, int nComparisonType /* 0 is equal, -1 is less than, 1 is greater than */ ) = 0;
|
||||
// sets RequestLobbyList() to only returns lobbies which aren't yet full - needs SetLobbyMemberLimit() called on the lobby to set an initial limit
|
||||
virtual void AddRequestLobbyListSlotsAvailableFilter() = 0;
|
||||
|
||||
// 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
|
||||
virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;
|
||||
|
||||
// Create a lobby on the Steam servers.
|
||||
// If bPrivate is true, 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 when the lobby has been created;
|
||||
// local user will the join the lobby, resulting in an additional LobbyEnter_t callback being sent
|
||||
// operations on the chat room can only proceed once the LobbyEnter_t has been received
|
||||
virtual void CreateLobby( bool bPrivate ) = 0;
|
||||
|
||||
// Joins an existing lobby
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyEnter_t callback when the lobby has been joined
|
||||
// users already in the lobby will receive LobbyChatUpdate_t callback after this user has successfully joined
|
||||
virtual void JoinLobby_OLD( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual void LeaveLobby( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0;
|
||||
|
||||
// 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
|
||||
virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0;
|
||||
// returns the CSteamID of a user in the lobby
|
||||
// iMember is of range [0,GetNumLobbyMembers())
|
||||
virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;
|
||||
|
||||
// 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
|
||||
virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0;
|
||||
// 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
|
||||
virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// As above, but gets per-user data for someone in this lobby
|
||||
virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0;
|
||||
// Sets per-user metadata (for the local user implicitly)
|
||||
virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0;
|
||||
// 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
|
||||
virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
|
||||
|
||||
// Fetch metadata for a lobby you're not necessarily in right now
|
||||
// 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
|
||||
virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// sets the game server associated with the lobby
|
||||
// usually at this point, the users will leave the lobby and 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
|
||||
virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0;
|
||||
// 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
|
||||
virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0;
|
||||
|
||||
// set the limit on the # of users who can join the lobby
|
||||
virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0;
|
||||
// returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined
|
||||
virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
virtual void SetLobbyVoiceEnabled( CSteamID steamIDLobby, bool bVoiceEnabled ) = 0;
|
||||
|
||||
// asks the Steam servers for a list of lobbies that friends are in
|
||||
// returns results by posting one RequestFriendsLobbiesResponse_t callback per friend/lobby pair
|
||||
// if no friends are in lobbies, RequestFriendsLobbiesResponse_t will be posted but with 0 results
|
||||
// filters don't apply to lobbies (currently)
|
||||
virtual bool RequestFriendsLobbies() = 0;
|
||||
};
|
||||
|
||||
#endif // ISTEAMMATCHMAKING003_H
|
@ -0,0 +1,149 @@
|
||||
|
||||
#ifndef ISTEAMMATCHMAKING004_H
|
||||
#define ISTEAMMATCHMAKING004_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmaking004
|
||||
{
|
||||
public:
|
||||
// game server favorites storage
|
||||
// saves basic details about a multiplayer game server locally
|
||||
|
||||
// returns the number of favorites servers the user has stored
|
||||
virtual int GetFavoriteGameCount() = 0;
|
||||
|
||||
// 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
|
||||
virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0;
|
||||
|
||||
// adds the game server to the local list; updates the time played of the server if it already exists in the list
|
||||
virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0;
|
||||
|
||||
// removes the game server from the local storage; returns true if one was removed
|
||||
virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0;
|
||||
|
||||
///////
|
||||
// Game lobby functions
|
||||
|
||||
// Get a list of relevant lobbies
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyMatchList_t callback, with the number of servers requested
|
||||
// if the user is not currently connected to Steam (i.e. SteamUser()->BLoggedOn() returns false) then
|
||||
// a LobbyMatchList_t callback will be posted immediately with no servers
|
||||
virtual void RequestLobbyList_OLD() = 0;
|
||||
|
||||
// filters for lobbies
|
||||
// this needs to be called before RequestLobbyList() to take effect
|
||||
// these are cleared on each call to RequestLobbyList()
|
||||
virtual void AddRequestLobbyListFilter( const char *pchKeyToMatch, const char *pchValueToMatch ) = 0;
|
||||
// numerical comparison - 0 is equal, -1 is the lobby value is less than nValueToMatch, 1 is the lobby value is greater than nValueToMatch
|
||||
virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, int nComparisonType /* 0 is equal, -1 is less than, 1 is greater than */ ) = 0;
|
||||
// sets RequestLobbyList() to only returns lobbies which aren't yet full - needs SetLobbyMemberLimit() called on the lobby to set an initial limit
|
||||
virtual void AddRequestLobbyListSlotsAvailableFilter() = 0;
|
||||
|
||||
// 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
|
||||
virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;
|
||||
|
||||
// Create a lobby on the Steam servers.
|
||||
// If bPrivate is true, 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 when the lobby has been created;
|
||||
// local user will the join the lobby, resulting in an additional LobbyEnter_t callback being sent
|
||||
// operations on the chat room can only proceed once the LobbyEnter_t has been received
|
||||
virtual void CreateLobby( bool bPrivate ) = 0;
|
||||
|
||||
// Joins an existing lobby
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyEnter_t callback when the lobby has been joined
|
||||
// users already in the lobby will receive LobbyChatUpdate_t callback after this user has successfully joined
|
||||
virtual void JoinLobby_OLD( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual void LeaveLobby( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0;
|
||||
|
||||
// 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
|
||||
virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0;
|
||||
// returns the CSteamID of a user in the lobby
|
||||
// iMember is of range [0,GetNumLobbyMembers())
|
||||
virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;
|
||||
|
||||
// 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
|
||||
virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0;
|
||||
// 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
|
||||
virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// As above, but gets per-user data for someone in this lobby
|
||||
virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0;
|
||||
// Sets per-user metadata (for the local user implicitly)
|
||||
virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0;
|
||||
// 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
|
||||
virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
|
||||
|
||||
// Fetch metadata for a lobby you're not necessarily in right now
|
||||
// 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
|
||||
virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// sets the game server associated with the lobby
|
||||
// usually at this point, the users will leave the lobby and 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
|
||||
virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0;
|
||||
// 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
|
||||
virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0;
|
||||
|
||||
// set the limit on the # of users who can join the lobby
|
||||
virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0;
|
||||
// returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined
|
||||
virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// asks the Steam servers for a list of lobbies that friends are in
|
||||
// returns results by posting one RequestFriendsLobbiesResponse_t callback per friend/lobby pair
|
||||
// if no friends are in lobbies, RequestFriendsLobbiesResponse_t will be posted but with 0 results
|
||||
// filters don't apply to lobbies (currently)
|
||||
virtual bool RequestFriendsLobbies() = 0;
|
||||
};
|
||||
|
||||
#endif // ISTEAMMATCHMAKING004_H
|
@ -0,0 +1,177 @@
|
||||
|
||||
#ifndef ISTEAMMATCHMAKING005_H
|
||||
#define ISTEAMMATCHMAKING005_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmaking005
|
||||
{
|
||||
public:
|
||||
// game server favorites storage
|
||||
// saves basic details about a multiplayer game server locally
|
||||
|
||||
// returns the number of favorites servers the user has stored
|
||||
virtual int GetFavoriteGameCount() = 0;
|
||||
|
||||
// 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
|
||||
virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0;
|
||||
|
||||
// adds the game server to the local list; updates the time played of the server if it already exists in the list
|
||||
virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0;
|
||||
|
||||
// removes the game server from the local storage; returns true if one was removed
|
||||
virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0;
|
||||
|
||||
///////
|
||||
// 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
|
||||
}
|
||||
}
|
||||
*/
|
||||
//
|
||||
virtual void RequestLobbyList_OLD() = 0;
|
||||
// filters for lobbies
|
||||
// this needs to be called before RequestLobbyList() to take effect
|
||||
// these are cleared on each call to RequestLobbyList()
|
||||
virtual void AddRequestLobbyListFilter( const char *pchKeyToMatch, const char *pchValueToMatch ) = 0;
|
||||
// numerical comparison
|
||||
virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, int nComparisonType ) = 0;
|
||||
virtual void AddRequestLobbyListSlotsAvailableFilter() = 0;
|
||||
// returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence
|
||||
virtual void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueToBeCloseTo ) = 0;
|
||||
|
||||
// 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
|
||||
virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;
|
||||
|
||||
// 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 pointer
|
||||
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
||||
virtual void CreateLobby_OLD( ELobbyType eLobbyType ) = 0;
|
||||
|
||||
// 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
|
||||
virtual void JoinLobby_OLD( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual void LeaveLobby( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0;
|
||||
|
||||
// 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
|
||||
virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0;
|
||||
// returns the CSteamID of a user in the lobby
|
||||
// iMember is of range [0,GetNumLobbyMembers())
|
||||
virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;
|
||||
|
||||
// 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
|
||||
virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0;
|
||||
// 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
|
||||
virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// As above, but gets per-user data for someone in this lobby
|
||||
virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0;
|
||||
// Sets per-user metadata (for the local user implicitly)
|
||||
virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
|
||||
|
||||
// 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
|
||||
virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0;
|
||||
// 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
|
||||
virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
|
||||
|
||||
// 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
|
||||
// restart are returned by a LobbyDataUpdate_t callback
|
||||
virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// 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
|
||||
virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0;
|
||||
// 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
|
||||
virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0;
|
||||
|
||||
// set the limit on the # of users who can join the lobby
|
||||
virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0;
|
||||
// returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined
|
||||
virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
virtual bool RequestFriendsLobbies() = 0;
|
||||
|
||||
// updates which type of lobby it is
|
||||
// only lobbies that are k_ELobbyTypePublic will be returned by RequestLobbyList() calls
|
||||
virtual bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) = 0;
|
||||
|
||||
// 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
|
||||
virtual CSteamID GetLobbyOwner( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
virtual float GetLobbyDistance( CSteamID steamIDLobby ) = 0;
|
||||
};
|
||||
|
||||
#endif // ISTEAMMATCHMAKING005_H
|
Loading…
Reference in New Issue