mirror of
https://github.com/rlabrecque/SteamworksSDK.git
synced 2026-10-10 01:23:04 +08:00
v1.17
This commit is contained in:
+26
@@ -11,6 +11,32 @@ website at: http://partner.steamgames.com
|
||||
|
||||
Revision History:
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.17 2nd November 2011
|
||||
----------------------------------------------------------------
|
||||
Cloud
|
||||
* Added ISteamRemoteStorage::PublishFile(), PublishWorkshopFile(), UpdatePublishedFile(), DeletePublishedFile() which enables sharing, updating, and unsharing of cloud content with the Steam community
|
||||
* Added ISteamRemoteStorage::EnumerateUserPublishedFiles to enumerate content that a user has shared with the Steam community
|
||||
* Added ISteamRemoteStorage::GetPublishedFileDetails() which gets the metadata associated with a piece of community shared content
|
||||
* Added ISteamRemoteStorage::SubscribePublishedFile(), EnumerateUserSubscribedFiles(), and UnsubscribePublishedFiles() which allow for management of community content that a user is interested in and marked as a favorite
|
||||
|
||||
User
|
||||
* Updated ISteamUser::GetAuthSessionTicket(), When creating a ticket for use by the AuthenticateUserTicket Web API, the calling application should wait for the callback GetAuthSessionTicketResponse_t generated by the API call before attempting to use the ticket to ensure that the ticket has been communicated to the server. If this callback does not come in a timely fashion ( 10 - 20 seconds ), your client is not connected to Steam, and the AuthenticeUserTicket will fail because it can not authenticate the user.
|
||||
|
||||
Friends
|
||||
* Added ISteamFriends::RequestFriendRichPresence, which allows requesting rich presence keys for any Steam user playing the same game as you
|
||||
* Added a set of functions to ISteamFriends which allow games to integrate with Steam Chat. Games can both join group chats, as well as get friends chats and show them in-line in the game. This API isn’t currently used in a game, so there may be some rough edges around the user experience to work out, and some experimentation is required.
|
||||
|
||||
Game Servers
|
||||
* Removed the ISteamMasterServerUpdater interface. It has been merged into the ISteamGameServer interface, which is used to communicate all game server state changes.
|
||||
* Significant changes to the game server init sequence. (See the comments for SteamGameServer_Init and the ISteamGameServer interface.)
|
||||
* Removed interface to legacy master server mode
|
||||
* Groundwork for implementing named steam accounts for game servers
|
||||
* Old player auth system is deprecated. It may be removed in a future version of the SDK.
|
||||
|
||||
Tools
|
||||
* Added tool for automated DRM submissions in /sdk/tools/drm/
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.16 29th July 2011
|
||||
----------------------------------------------------------------
|
||||
|
||||
@@ -264,7 +264,7 @@ int main(int argc, const char **argv)
|
||||
{
|
||||
char szCmdLine[1024];
|
||||
char *pszStart = szCmdLine;
|
||||
char * const pszEnd = szCmdLine + ARRAYSIZE(szCmdLine);
|
||||
char * const pszEnd = szCmdLine + Q_ARRAYSIZE(szCmdLine);
|
||||
|
||||
*szCmdLine = '\0';
|
||||
|
||||
@@ -283,7 +283,7 @@ int main(int argc, const char **argv)
|
||||
*pszStart++ = ' ';
|
||||
}
|
||||
|
||||
szCmdLine[ARRAYSIZE(szCmdLine) - 1] = '\0';
|
||||
szCmdLine[Q_ARRAYSIZE(szCmdLine) - 1] = '\0';
|
||||
|
||||
return RealMain( szCmdLine, 0, 0 );
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ CMainMenu::CMainMenu( IGameEngine *pGameEngine ) : CBaseMenu<EClientGameState>(
|
||||
AddMenuItem( MenuItem_t( "Instructions", k_EClientGameInstructions ) );
|
||||
AddMenuItem( MenuItem_t( "Stats and Achievements", k_EClientStatsAchievements ) );
|
||||
AddMenuItem( MenuItem_t( "Leaderboards", k_EClientLeaderboards ) );
|
||||
AddMenuItem( MenuItem_t( "Group chat room", k_EClientClanChatRoom ) );
|
||||
AddMenuItem( MenuItem_t( "Remote Storage", k_EClientRemoteStorage ) );
|
||||
AddMenuItem( MenuItem_t( "Write Minidump", k_EClientMinidump ) );
|
||||
AddMenuItem( MenuItem_t( "Exit Game", k_EClientGameExiting ) );
|
||||
|
||||
@@ -182,6 +182,7 @@ enum EClientGameState
|
||||
k_EClientLinkSteamAccount,
|
||||
k_EClientAutoCreateAccount,
|
||||
k_EClientRetrySteamConnection,
|
||||
k_EClientClanChatRoom,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "time.h"
|
||||
#include "ServerBrowser.h"
|
||||
#include "Leaderboards.h"
|
||||
#include "clanchatroom.h"
|
||||
#include "Lobby.h"
|
||||
#include "p2pauth.h"
|
||||
#include "voicechat.h"
|
||||
@@ -128,6 +129,7 @@ void CSpaceWarClient::Init( IGameEngine *pGameEngine )
|
||||
// Init stats
|
||||
m_pStatsAndAchievements = new CStatsAndAchievements( pGameEngine );
|
||||
m_pLeaderboards = new CLeaderboards( pGameEngine );
|
||||
m_pClanChatRoom = new CClanChatRoom( pGameEngine );
|
||||
|
||||
// Remote Storage page
|
||||
m_pRemoteStorage = new CRemoteStorage( pGameEngine );
|
||||
@@ -199,7 +201,13 @@ void CSpaceWarClient::DisconnectFromServer()
|
||||
{
|
||||
if ( m_eConnectedStatus != k_EClientNotConnected )
|
||||
{
|
||||
SteamUser()->TerminateGameConnection( m_unServerIP, m_usServerPort );
|
||||
#ifdef USE_GS_AUTH_API
|
||||
if ( m_hAuthTicket != k_HAuthTicketInvalid )
|
||||
SteamUser()->CancelAuthTicket( m_hAuthTicket );
|
||||
m_hAuthTicket = k_HAuthTicketInvalid;
|
||||
#else
|
||||
SteamUser()->AdvertiseGame( k_steamIDNil, 0, 0 );
|
||||
#endif
|
||||
|
||||
MsgClientLeavingServer_t msg;
|
||||
BSendServerData( &msg, sizeof(msg) );
|
||||
@@ -246,19 +254,21 @@ void CSpaceWarClient::OnReceiveServerInfo( CSteamID steamIDGameServer, bool bVAC
|
||||
MsgClientBeginAuthentication_t msg;
|
||||
#ifdef USE_GS_AUTH_API
|
||||
char rgchToken[1024];
|
||||
uint32 unTokenLen = SteamUser()->InitiateGameConnection( (void*)&rgchToken, ARRAYSIZE( rgchToken ), steamIDGameServer, m_unServerIP, m_usServerPort, bVACSecure );
|
||||
uint32 unTokenLen = 0;
|
||||
m_hAuthTicket = SteamUser()->GetAuthSessionTicket( rgchToken, sizeof( rgchToken ), &unTokenLen );
|
||||
msg.SetToken( rgchToken, unTokenLen );
|
||||
|
||||
#else
|
||||
// When you aren't using Steam auth you still call InitiateGameConnection() so you can communicate presence data to the friends
|
||||
// system. Make sure to pass k_steamIDNonSteamGS so Steam won't try to authenticate your user.
|
||||
uint32 unTokenLen = SteamUser()->InitiateGameConnection( NULL, 0, k_steamIDNonSteamGS, m_unServerIP, m_usServerPort, false );
|
||||
// When you aren't using Steam auth you can still call AdvertiseGame() so you can communicate presence data to the friends
|
||||
// system. Make sure to pass k_steamIDNonSteamGS
|
||||
uint32 unTokenLen = SteamUser()->AdvertiseGame( k_steamIDNonSteamGS, m_unServerIP, m_usServerPort );
|
||||
msg.SetSteamID( SteamUser()->GetSteamID().ConvertToUint64() );
|
||||
#endif
|
||||
|
||||
Steamworks_TestSecret();
|
||||
|
||||
if ( msg.GetTokenLen() < 1 )
|
||||
OutputDebugString( "Warning: Looks like InitiateGameConnection didn't give us a good token\n" );
|
||||
OutputDebugString( "Warning: Looks like GetAuthSessionTicket didn't give us a good ticket\n" );
|
||||
|
||||
BSendServerData( &msg, sizeof(msg) );
|
||||
}
|
||||
@@ -712,14 +722,19 @@ void CSpaceWarClient::OnReceiveServerExiting()
|
||||
{
|
||||
if ( m_pP2PAuthedGame )
|
||||
m_pP2PAuthedGame->EndGame();
|
||||
|
||||
#ifdef USE_GS_AUTH_API
|
||||
if ( m_hAuthTicket != k_HAuthTicketInvalid )
|
||||
{
|
||||
SteamUser()->CancelAuthTicket( m_hAuthTicket );
|
||||
}
|
||||
m_hAuthTicket = k_HAuthTicketInvalid;
|
||||
#else
|
||||
SteamUser()->AdvertiseGame( k_steamIDNil, 0, 0 );
|
||||
#endif
|
||||
|
||||
if ( m_eGameState != k_EClientGameActive )
|
||||
return;
|
||||
|
||||
if ( m_eConnectedStatus == k_EClientConnectedAndAuthenticated )
|
||||
{
|
||||
SteamUser()->TerminateGameConnection( m_unServerIP, m_usServerPort );
|
||||
}
|
||||
|
||||
m_eConnectedStatus = k_EClientNotConnected;
|
||||
|
||||
SetConnectionFailureText( "Game server has exited." );
|
||||
@@ -945,6 +960,12 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew )
|
||||
m_pLeaderboards->Show();
|
||||
SteamFriends()->SetRichPresence( "status", "Viewing leaderboards" );
|
||||
}
|
||||
else if ( m_eGameState == k_EClientClanChatRoom )
|
||||
{
|
||||
// we've switched to the leaderboard menu
|
||||
m_pClanChatRoom->Show();
|
||||
SteamFriends()->SetRichPresence( "status", "Chatting" );
|
||||
}
|
||||
else if ( m_eGameState == k_EClientGameActive )
|
||||
{
|
||||
// start voice chat
|
||||
@@ -1240,6 +1261,14 @@ void CSpaceWarClient::RunFrame()
|
||||
SetGameState( k_EClientGameMenu );
|
||||
break;
|
||||
|
||||
case k_EClientClanChatRoom:
|
||||
m_pStarField->Render();
|
||||
m_pClanChatRoom->RunFrame();
|
||||
|
||||
if ( bEscapePressed )
|
||||
SetGameState( k_EClientGameMenu );
|
||||
break;
|
||||
|
||||
case k_EClientRemoteStorage:
|
||||
m_pStarField->Render();
|
||||
m_pRemoteStorage->Render();
|
||||
|
||||
@@ -27,6 +27,7 @@ class CServerBrowser;
|
||||
class CLobbyBrowser;
|
||||
class CLobby;
|
||||
class CLeaderboards;
|
||||
class CClanChatRoom;
|
||||
class CP2PAuthPlayer;
|
||||
class CP2PAuthedGame;
|
||||
class CVoiceChat;
|
||||
@@ -264,6 +265,7 @@ private:
|
||||
CSteamID m_steamIDGameServer;
|
||||
uint32 m_unServerIP;
|
||||
uint16 m_usServerPort;
|
||||
HAuthTicket m_hAuthTicket;
|
||||
|
||||
// simple class to marshal callbacks from pinging a game server
|
||||
class CGameServerPing : public ISteamMatchmakingPingResponse
|
||||
@@ -337,7 +339,7 @@ private:
|
||||
CStatsAndAchievements *m_pStatsAndAchievements;
|
||||
|
||||
CLeaderboards *m_pLeaderboards;
|
||||
|
||||
CClanChatRoom *m_pClanChatRoom;
|
||||
CServerBrowser *m_pServerBrowser;
|
||||
|
||||
CRemoteStorage *m_pRemoteStorage;
|
||||
|
||||
@@ -26,9 +26,7 @@ CSpaceWarServer::CSpaceWarServer( IGameEngine *pGameEngine )
|
||||
m_CallbackSteamServersDisconnected( this, &CSpaceWarServer::OnSteamServersDisconnected ),
|
||||
m_CallbackSteamServersConnectFailure( this, &CSpaceWarServer::OnSteamServersConnectFailure ),
|
||||
m_CallbackPolicyResponse( this, &CSpaceWarServer::OnPolicyResponse ),
|
||||
m_CallbackGSClientApprove( this, &CSpaceWarServer::OnGSClientApprove ),
|
||||
m_CallbackGSClientDeny( this, &CSpaceWarServer::OnGSClientDeny ),
|
||||
m_CallbackGSClientKick( this, &CSpaceWarServer::OnGSClientKick ),
|
||||
m_CallbackGSAuthTicketResponse( this, &CSpaceWarServer::OnValidateAuthTicketResponse ),
|
||||
m_CallbackP2PSessionConnectFail( this, &CSpaceWarServer::OnP2PSessionConnectFail ),
|
||||
m_CallbackP2PSessionRequest( this, &CSpaceWarServer::OnP2PSessionRequest )
|
||||
{
|
||||
@@ -37,7 +35,6 @@ CSpaceWarServer::CSpaceWarServer( IGameEngine *pGameEngine )
|
||||
|
||||
char *pchGameDir = "spacewar";
|
||||
uint32 unIP = INADDR_ANY;
|
||||
uint16 usSpectatorPort = 0; // We don't support specators in our game
|
||||
uint16 usMasterServerUpdaterPort = SPACEWAR_MASTER_SERVER_UPDATER_PORT;
|
||||
|
||||
#ifdef USE_GS_AUTH_API
|
||||
@@ -49,37 +46,51 @@ CSpaceWarServer::CSpaceWarServer( IGameEngine *pGameEngine )
|
||||
// Initialize the SteamGameServer interface, we tell it some info about us, and we request support
|
||||
// for both Authentication (making sure users own games) and secure mode, VAC running in our game
|
||||
// and kicking users who are VAC banned
|
||||
|
||||
// !FIXME! We need a way to pass the dedicated server flag here!
|
||||
|
||||
#ifdef _PS3
|
||||
if ( !SteamGameServer_Init( &g_SteamPS3Params, unIP, SPACEWAR_AUTHENTICATION_PORT, SPACEWAR_SERVER_PORT, usSpectatorPort, usMasterServerUpdaterPort, eMode, pchGameDir, SPACEWAR_SERVER_VERSION ) )
|
||||
if ( !SteamGameServer_Init( &g_SteamPS3Params, unIP, SPACEWAR_AUTHENTICATION_PORT, SPACEWAR_SERVER_PORT, usMasterServerUpdaterPort, eMode, SPACEWAR_SERVER_VERSION ) )
|
||||
#else
|
||||
if ( !SteamGameServer_Init( unIP, SPACEWAR_AUTHENTICATION_PORT, SPACEWAR_SERVER_PORT, usSpectatorPort, usMasterServerUpdaterPort, eMode, pchGameDir, SPACEWAR_SERVER_VERSION ) )
|
||||
if ( !SteamGameServer_Init( unIP, SPACEWAR_AUTHENTICATION_PORT, SPACEWAR_SERVER_PORT, usMasterServerUpdaterPort, eMode, SPACEWAR_SERVER_VERSION ) )
|
||||
#endif
|
||||
{
|
||||
OutputDebugString( "SteamGameServer_Init call failed\n" );
|
||||
}
|
||||
|
||||
#ifdef USE_GS_AUTH_API
|
||||
// We want to actively update the master server with our presence so players can
|
||||
// find us via the steam matchmaking/server browser interfaces
|
||||
if ( SteamMasterServerUpdater() )
|
||||
if ( SteamGameServer() )
|
||||
{
|
||||
/*
|
||||
// hack to force local master server use for debugging
|
||||
while( SteamMasterServerUpdater()->GetNumMasterServers() > 0 )
|
||||
{
|
||||
char address[256];
|
||||
SteamMasterServerUpdater()->GetMasterServerAddress( 0, address, 256 );
|
||||
}
|
||||
SteamMasterServerUpdater()->AddMasterServer( "127.0.0.1:27011" );
|
||||
*/
|
||||
|
||||
SteamMasterServerUpdater()->SetActive( true );
|
||||
// Set the "game dir".
|
||||
// This is currently required for all games. However, soon we will be
|
||||
// using the AppID for most purposes, and this string will only be needed
|
||||
// for mods. it may not be changed after the server has logged on
|
||||
SteamGameServer()->SetModDir( pchGameDir );
|
||||
|
||||
// These fields are currently required, but will go away soon.
|
||||
// See their documentation for more info
|
||||
SteamGameServer()->SetProduct( "SteamworksExample" );
|
||||
SteamGameServer()->SetGameDescription( "Steamworks Example" );
|
||||
|
||||
// We don't support specators in our game.
|
||||
// .... but if we did:
|
||||
//SteamGameServer()->SetSpectatorPort( ... );
|
||||
//SteamGameServer()->SetSpectatorServerName( ... );
|
||||
|
||||
// Initiate Anonymous logon.
|
||||
// Coming soon: Logging into authenticated, persistent game server account
|
||||
SteamGameServer()->LogOnAnonymous();
|
||||
|
||||
// We want to actively update the master server with our presence so players can
|
||||
// find us via the steam matchmaking/server browser interfaces
|
||||
#ifdef USE_GS_AUTH_API
|
||||
SteamGameServer()->EnableHeartbeats( true );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
OutputDebugString( "SteamMasterServerUpdater() interface is invalid\n" );
|
||||
OutputDebugString( "SteamGameServer() interface is invalid\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
m_uPlayerCount = 0;
|
||||
m_pGameEngine = pGameEngine;
|
||||
@@ -118,7 +129,7 @@ CSpaceWarServer::~CSpaceWarServer()
|
||||
{
|
||||
#ifdef USE_GS_AUTH_API
|
||||
// Notify Steam master server we are going offline
|
||||
SteamMasterServerUpdater()->SetActive( false );
|
||||
SteamGameServer()->EnableHeartbeats( false );
|
||||
#endif
|
||||
|
||||
delete m_pSun;
|
||||
@@ -136,10 +147,8 @@ CSpaceWarServer::~CSpaceWarServer()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_GS_AUTH_API
|
||||
// Disconnect from the steam servers
|
||||
SteamGameServer()->LogOff();
|
||||
#endif
|
||||
|
||||
// release our reference to the steam client library
|
||||
SteamGameServer_Shutdown();
|
||||
@@ -255,17 +264,15 @@ void CSpaceWarServer::OnClientBeginAuthentication( CSteamID steamIDClient, void
|
||||
m_rgPendingClientData[i].m_ulTickCountLastData = m_pGameEngine->GetGameTickCount();
|
||||
#ifdef USE_GS_AUTH_API
|
||||
// authenticate the user with the Steam back-end servers
|
||||
|
||||
// we use the server-seen IP address of the client as an extra bit of data for the authentication
|
||||
P2PSessionState_t p2pSessionState;
|
||||
SteamNetworking()->GetP2PSessionState( m_rgPendingClientData[i].m_SteamIDUser, &p2pSessionState );
|
||||
|
||||
m_rgPendingClientData[i].m_bActive = SteamGameServer()->SendUserConnectAndAuthenticate( p2pSessionState.m_nRemoteIP, pToken, uTokenLen, &m_rgPendingClientData[i].m_SteamIDUser );
|
||||
if ( !m_rgPendingClientData[i].m_bActive )
|
||||
if ( k_EBeginAuthSessionResultOK != SteamGameServer()->BeginAuthSession( pToken, uTokenLen, steamIDClient ) )
|
||||
{
|
||||
MsgServerFailAuthentication_t msg;
|
||||
SteamGameServerNetworking()->SendP2PPacket( m_rgPendingClientData[i].m_SteamIDUser, &msg, sizeof( msg ), k_EP2PSendReliable );
|
||||
SteamGameServerNetworking()->SendP2PPacket( steamIDClient, &msg, sizeof( msg ), k_EP2PSendReliable );
|
||||
break;
|
||||
}
|
||||
|
||||
m_rgPendingClientData[i].m_SteamIDUser = steamIDClient;
|
||||
m_rgPendingClientData[i].m_bActive = true;
|
||||
break;
|
||||
#else
|
||||
m_rgPendingClientData[i].m_bActive = true;
|
||||
@@ -295,7 +302,7 @@ void CSpaceWarServer::OnAuthCompleted( bool bAuthSuccessful, uint32 iPendingAuth
|
||||
{
|
||||
#ifdef USE_GS_AUTH_API
|
||||
// Tell the GS the user is leaving the server
|
||||
SteamGameServer()->SendUserDisconnect( m_rgPendingClientData[iPendingAuthIndex].m_SteamIDUser );
|
||||
SteamGameServer()->EndAuthSession( m_rgPendingClientData[iPendingAuthIndex].m_SteamIDUser );
|
||||
#endif
|
||||
// Send a deny for the client, and zero out the pending data
|
||||
MsgServerFailAuthentication_t msg;
|
||||
@@ -443,7 +450,7 @@ void CSpaceWarServer::RemovePlayerFromServer( uint32 uShipPosition )
|
||||
|
||||
#ifdef USE_GS_AUTH_API
|
||||
// Tell the GS the user is leaving the server
|
||||
SteamGameServer()->SendUserDisconnect( m_rgClientData[uShipPosition].m_SteamIDUser );
|
||||
SteamGameServer()->EndAuthSession( m_rgClientData[uShipPosition].m_SteamIDUser );
|
||||
#endif
|
||||
memset( &m_rgClientData[uShipPosition], 0, sizeof( ClientConnectionData_t ) );
|
||||
}
|
||||
@@ -911,19 +918,6 @@ void CSpaceWarServer::OnSteamServersConnectFailure( SteamServerConnectFailure_t
|
||||
void CSpaceWarServer::SendUpdatedServerDetailsToSteam()
|
||||
{
|
||||
|
||||
#ifdef USE_GS_AUTH_API
|
||||
// Tell the Steam Master Server about our game
|
||||
SteamMasterServerUpdater()->SetBasicServerData(
|
||||
7, // Protocol version to talk to the master server with, use the magic number 7
|
||||
true, // Are we a dedicated server? Lie and say yes for our game since we don't have dedicated servers.
|
||||
"255", // Region name is unused, use the magic value "255" always
|
||||
"SteamworksExample", // Our game name
|
||||
4, // Maximum number of players for our server
|
||||
false, // Does our server require a password?
|
||||
"Steamworks Example" // Description of our game
|
||||
);
|
||||
#endif
|
||||
|
||||
// Tell the Steam authentication servers about our game
|
||||
char rgchServerName[128];
|
||||
if ( SpaceWarClient() )
|
||||
@@ -938,15 +932,20 @@ void CSpaceWarServer::SendUpdatedServerDetailsToSteam()
|
||||
}
|
||||
m_sServerName = rgchServerName;
|
||||
|
||||
//
|
||||
// Set state variables, relevant to any master server updates or client pings
|
||||
//
|
||||
|
||||
// These server state variables may be changed at any time. Note that there is no lnoger a mechanism
|
||||
// to send the player count. The player count is maintained by steam and you should use the player
|
||||
// creation/authentication functions to maintain your player count.
|
||||
SteamGameServer()->SetMaxPlayerCount( 4 );
|
||||
SteamGameServer()->SetPasswordProtected( false );
|
||||
SteamGameServer()->SetServerName( m_sServerName.c_str() );
|
||||
SteamGameServer()->SetBotPlayerCount( 0 ); // optional, defaults to zero
|
||||
SteamGameServer()->SetMapName( "MilkyWay" );
|
||||
|
||||
#ifdef USE_GS_AUTH_API
|
||||
SteamGameServer()->UpdateServerStatus(
|
||||
m_uPlayerCount, // Current player count
|
||||
4, // Maximum number of players
|
||||
0, // Number of AI/Bot players
|
||||
m_sServerName.c_str(), // Server name
|
||||
"", // Spectator server name, unused for us
|
||||
"MilkyWay" // Map name
|
||||
);
|
||||
|
||||
// Update all the players names/scores
|
||||
for( uint32 i=0; i < MAX_PLAYERS_PER_SERVER; ++i )
|
||||
@@ -972,67 +971,41 @@ void CSpaceWarServer::SendUpdatedServerDetailsToSteam()
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Tells us Steam3 (VAC and newer license checking) has accepted the user connection
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSpaceWarServer::OnGSClientApprove( GSClientApprove_t *pGSClientApprove )
|
||||
void CSpaceWarServer::OnValidateAuthTicketResponse( ValidateAuthTicketResponse_t *pResponse )
|
||||
{
|
||||
// This is the final approval, and means we should let the client play (find the pending auth by steamid)
|
||||
for ( uint32 i = 0; i<MAX_PLAYERS_PER_SERVER; ++i )
|
||||
if ( pResponse->m_eAuthSessionResponse == k_EAuthSessionResponseOK )
|
||||
{
|
||||
if ( !m_rgPendingClientData[i].m_bActive )
|
||||
continue;
|
||||
else if ( m_rgPendingClientData[i].m_SteamIDUser == pGSClientApprove->m_SteamID )
|
||||
// This is the final approval, and means we should let the client play (find the pending auth by steamid)
|
||||
for ( uint32 i = 0; i<MAX_PLAYERS_PER_SERVER; ++i )
|
||||
{
|
||||
OutputDebugString( "Auth completed for a client\n" );
|
||||
OnAuthCompleted( true, i );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that Steam has told us to deny a user connection
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSpaceWarServer::OnGSClientDeny( GSClientDeny_t *pGSClientDeny )
|
||||
{
|
||||
// Looks like we shouldn't let this user play, kick them
|
||||
for ( uint32 i = 0; i<MAX_PLAYERS_PER_SERVER; ++i )
|
||||
{
|
||||
if ( !m_rgPendingClientData[i].m_bActive )
|
||||
continue;
|
||||
else if ( m_rgPendingClientData[i].m_SteamIDUser == pGSClientDeny->m_SteamID )
|
||||
{
|
||||
switch( pGSClientDeny->m_eDenyReason )
|
||||
if ( !m_rgPendingClientData[i].m_bActive )
|
||||
continue;
|
||||
else if ( m_rgPendingClientData[i].m_SteamIDUser == pResponse->m_SteamID )
|
||||
{
|
||||
case k_EDenySteamValidationStalled:
|
||||
// k_EDenySteamValidationStalled means we couldn't get a timely response from Steam
|
||||
// as to whether this client should really be allowed to play, but we did at least validate
|
||||
// that they are who they say they are... As such, we'll decide that we should let them play
|
||||
// as this may just mean the Steam auth servers are down.
|
||||
OutputDebugString( "Auth stalled for a client, let them play anyway\n" );
|
||||
OutputDebugString( "Auth completed for a client\n" );
|
||||
OnAuthCompleted( true, i );
|
||||
break;
|
||||
default:
|
||||
OnAuthCompleted( false, i );
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Looks like we shouldn't let this user play, kick them
|
||||
for ( uint32 i = 0; i<MAX_PLAYERS_PER_SERVER; ++i )
|
||||
{
|
||||
if ( !m_rgPendingClientData[i].m_bActive )
|
||||
continue;
|
||||
else if ( m_rgPendingClientData[i].m_SteamIDUser == pResponse->m_SteamID )
|
||||
{
|
||||
OutputDebugString( "Auth failed for a client\n" );
|
||||
OnAuthCompleted( false, i );
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam is telling us to kick a client (they probably lost connection to
|
||||
// Steam and now VAC can't verify them...)
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSpaceWarServer::OnGSClientKick( GSClientKick_t *pGSClientKick )
|
||||
{
|
||||
char buffer[128];
|
||||
_snprintf( buffer, 128, "Steam told us to kick: %u - %u\n", CSteamID( pGSClientKick->m_SteamID ).GetAccountID(), pGSClientKick->m_eDenyReason );
|
||||
OutputDebugString( buffer );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Returns the SteamID of the game server
|
||||
|
||||
@@ -82,14 +82,7 @@ private:
|
||||
//
|
||||
|
||||
// Tells us a client has been authenticated and approved to play by Steam (passes auth, license check, VAC status, etc...)
|
||||
STEAM_GAMESERVER_CALLBACK( CSpaceWarServer, OnGSClientApprove, GSClientApprove_t, m_CallbackGSClientApprove );
|
||||
|
||||
// Tells us we should deny a player from accessing the server
|
||||
STEAM_GAMESERVER_CALLBACK( CSpaceWarServer, OnGSClientDeny, GSClientDeny_t, m_CallbackGSClientDeny );
|
||||
|
||||
// Tells us we should kick a player who was previously allowed to play (maybe they are no longer connected
|
||||
// to steam so their VAC status cannot be verified)
|
||||
STEAM_GAMESERVER_CALLBACK( CSpaceWarServer, OnGSClientKick, GSClientKick_t, m_CallbackGSClientKick );
|
||||
STEAM_GAMESERVER_CALLBACK( CSpaceWarServer, OnValidateAuthTicketResponse, ValidateAuthTicketResponse_t, m_CallbackGSAuthTicketResponse );
|
||||
|
||||
// client connection state
|
||||
STEAM_GAMESERVER_CALLBACK( CSpaceWarServer, OnP2PSessionRequest, P2PSessionRequest_t, m_CallbackP2PSessionRequest );
|
||||
|
||||
@@ -385,6 +385,10 @@
|
||||
RelativePath=".\BaseMenu.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\clanchatroom.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\connectingmenu.cpp"
|
||||
>
|
||||
@@ -487,6 +491,10 @@
|
||||
RelativePath=".\BaseMenu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\clanchatroom.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\connectingmenu.h"
|
||||
>
|
||||
|
||||
@@ -90,6 +90,7 @@ typedef unsigned __int64 uint64;
|
||||
|
||||
#endif
|
||||
|
||||
#define ARRAYSIZE(A) ( sizeof(A)/sizeof(A[0]) )
|
||||
// Need to define some types on POSIX
|
||||
typedef short int16;
|
||||
typedef unsigned short uint16;
|
||||
@@ -187,7 +188,7 @@ extern const char *GetUserSaveDataPath();
|
||||
#define _snprintf snprintf
|
||||
#endif
|
||||
|
||||
#define ARRAYSIZE(a) sizeof(a)/sizeof(a[0])
|
||||
#define Q_ARRAYSIZE(a) sizeof(a)/sizeof(a[0])
|
||||
|
||||
#endif // POSIX
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ enum ERegisterActivactionCodeResult
|
||||
k_ERegisterActivactionCodeResultFail = 1,
|
||||
k_ERegisterActivactionCodeResultAlreadyRegistered = 2,
|
||||
k_ERegisterActivactionCodeResultTimeout = 3,
|
||||
k_ERegisterActivactionCodeAlreadyOwned = 4
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ class ISteamFriends;
|
||||
class ISteamUtils;
|
||||
class ISteamMatchmaking;
|
||||
class ISteamContentServer;
|
||||
class ISteamMasterServerUpdater;
|
||||
class ISteamMatchmakingServers;
|
||||
class ISteamUserStats;
|
||||
class ISteamApps;
|
||||
@@ -93,9 +92,6 @@ public:
|
||||
// returns the ISteamMatchmaking interface
|
||||
virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamMasterServerUpdater interface
|
||||
virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamMatchmakingServers interface
|
||||
virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
@@ -150,7 +146,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient011"
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient012"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Base values for callback identifiers, each callback must
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//====== Copyright (C) 1996-2008, Valve Corporation, All rights reserved. =====
|
||||
//
|
||||
// Purpose: interface to both friends list data and general information about users
|
||||
//
|
||||
@@ -27,13 +27,16 @@ enum EFriendRelationship
|
||||
k_EFriendRelationshipIgnored = 5,
|
||||
k_EFriendRelationshipIgnoredFriend = 6,
|
||||
k_EFriendRelationshipSuggested = 7,
|
||||
|
||||
// keep this updated
|
||||
k_EFriendRelationshipMax = 8,
|
||||
};
|
||||
|
||||
// maximum length of friend group name (not including terminating nul!)
|
||||
const int k_cchMaxFriendGroupName = 64;
|
||||
const int k_cchMaxFriendsGroupName = 64;
|
||||
|
||||
// maximum number of groups a single user is allowed
|
||||
const int k_cFriendGroupLimit = 100;
|
||||
const int k_cFriendsGroupLimit = 100;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -46,6 +49,8 @@ enum EPersonaState
|
||||
k_EPersonaStateBusy = 2, // user is on, but busy
|
||||
k_EPersonaStateAway = 3, // auto-away feature
|
||||
k_EPersonaStateSnooze = 4, // auto-away for a long time
|
||||
k_EPersonaStateLookingToTrade = 5, // Online, trading
|
||||
k_EPersonaStateLookingToPlay = 6, // Online, wanting to play
|
||||
k_EPersonaStateMax,
|
||||
};
|
||||
|
||||
@@ -176,6 +181,10 @@ public:
|
||||
virtual CSteamID GetClanByIndex( int iClan ) = 0;
|
||||
virtual const char *GetClanName( CSteamID steamIDClan ) = 0;
|
||||
virtual const char *GetClanTag( CSteamID steamIDClan ) = 0;
|
||||
// returns the most recent information we have about what's happening in a clan
|
||||
virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0;
|
||||
// for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest
|
||||
virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 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
|
||||
@@ -198,6 +207,7 @@ public:
|
||||
// valid options are
|
||||
// "steamid" - opens the overlay web browser to the specified user or groups profile
|
||||
// "chat" - opens a chat window to the specified user, or joins the group chat
|
||||
// "tradeinvite" - opens a chat window to the specified user and invites them to trade
|
||||
// "stats" - opens the overlay web browser to the specified user's stats
|
||||
// "achievements" - opens the overlay web browser to the specified user's achievements
|
||||
virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0;
|
||||
@@ -270,6 +280,8 @@ public:
|
||||
virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0;
|
||||
virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0;
|
||||
virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0;
|
||||
// Requests rich presence for a specific user.
|
||||
virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// rich invite support
|
||||
// if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game
|
||||
@@ -284,9 +296,32 @@ public:
|
||||
virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0;
|
||||
virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0;
|
||||
virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// chat interface for games
|
||||
// this allows in-game access to group (clan) chats from in the game
|
||||
// the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay
|
||||
// use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat
|
||||
virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0;
|
||||
virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0;
|
||||
virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0;
|
||||
virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0;
|
||||
virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0;
|
||||
virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *, CSteamID * ) = 0;
|
||||
virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0;
|
||||
|
||||
// interact with the Steam (game overlay / desktop)
|
||||
virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0;
|
||||
virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0;
|
||||
virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0;
|
||||
|
||||
// peer-to-peer chat interception
|
||||
// this is so you can show P2P chats inline in the game
|
||||
virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0;
|
||||
virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0;
|
||||
virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends009"
|
||||
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends011"
|
||||
|
||||
// callbacks
|
||||
#pragma pack( push, 8 )
|
||||
@@ -388,6 +423,7 @@ struct ClanOfficerListResponse_t
|
||||
uint8 m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating updated data about friends rich presence information
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -398,6 +434,7 @@ struct FriendRichPresenceUpdate_t
|
||||
AppId_t m_nAppID; // the appID of the game (should always be the current game)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a game from their friends list
|
||||
// rich presence will have been set with the "connect" key which is set here
|
||||
@@ -411,15 +448,72 @@ struct GameRichPresenceJoinRequested_t
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user requests the history of player names on a given account
|
||||
// Purpose: a chat message has been received for a clan chat the game has joined
|
||||
//-----------------------------------------------------------------------------
|
||||
struct NameHistoryResponse_t
|
||||
struct GameConnectedClanChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 38 };
|
||||
int m_cSuccessfulLookups; // number of lookups that were successful
|
||||
int m_cFailedLookups; // number of lookups that failed for one reason or another
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has joined a clan chat
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatJoin_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 39 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has left the chat we're in
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatLeave_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 40 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
bool m_bKicked; // true if admin kicked
|
||||
bool m_bDropped; // true if Steam connection dropped
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a DownloadClanActivityCounts() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DownloadClanActivityCountsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 41 };
|
||||
bool m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a JoinClanChatRoom() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct JoinClanChatRoomCompletionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 42 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
EChatRoomEnterResponse m_eChatRoomEnterResponse;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a chat message has been received from a user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedFriendChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 43 };
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMFRIENDS_H
|
||||
|
||||
+200
-60
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "isteamclient.h"
|
||||
|
||||
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||
@@ -19,8 +20,54 @@
|
||||
class ISteamGameServer
|
||||
{
|
||||
public:
|
||||
// connection functions
|
||||
virtual void LogOn() = 0;
|
||||
|
||||
//
|
||||
// Basic server data. These properties, if set, must be set before before calling LogOn. They
|
||||
// may not be changed after logged in.
|
||||
//
|
||||
|
||||
/// This is called by SteamGameServer_Init, and you will usually not need to call it directly
|
||||
virtual bool InitGameServer( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString ) = 0;
|
||||
|
||||
/// Game product identifier. This is currently used by the master server for version checking purposes.
|
||||
/// It's a required field, but will eventually will go away, and the AppID will be used for this purpose.
|
||||
virtual void SetProduct( const char *pszProduct ) = 0;
|
||||
|
||||
/// Description of the game. This is a required field and is displayed in the steam server browser....for now.
|
||||
/// This is a required field, but it will go away eventually, as the data should be determined from the AppID.
|
||||
virtual void SetGameDescription( const char *pszGameDescription ) = 0;
|
||||
|
||||
/// If your game is a "mod," pass the string that identifies it. The default is an empty string, meaning
|
||||
/// this application is the original game, not a mod.
|
||||
///
|
||||
/// @see k_cbMaxGameServerGameDir
|
||||
virtual void SetModDir( const char *pszModDir ) = 0;
|
||||
|
||||
/// Is this is a dedicated server? The default value is false.
|
||||
virtual void SetDedicatedServer( bool bDedicated ) = 0;
|
||||
|
||||
//
|
||||
// Login
|
||||
//
|
||||
|
||||
/// Begin process to login to a persistent game server account
|
||||
///
|
||||
/// You need to register for callbacks to determine the result of this operation.
|
||||
/// @see SteamServersConnected_t
|
||||
/// @see SteamServerConnectFailure_t
|
||||
/// @see SteamServersDisconnected_t
|
||||
virtual void LogOn(
|
||||
const char *pszAccountName,
|
||||
const char *pszPassword
|
||||
) = 0;
|
||||
|
||||
/// Login to a generic, anonymous account.
|
||||
///
|
||||
/// Note: in previous versions of the SDK, this was automatically called within SteamGameServer_Init,
|
||||
/// but this is no longer the case.
|
||||
virtual void LogOnAnonymous() = 0;
|
||||
|
||||
/// Begin process of logging game server out of steam
|
||||
virtual void LogOff() = 0;
|
||||
|
||||
// status functions
|
||||
@@ -28,6 +75,69 @@ public:
|
||||
virtual bool BSecure() = 0;
|
||||
virtual CSteamID GetSteamID() = 0;
|
||||
|
||||
/// Returns true if the master server has requested a restart.
|
||||
/// Only returns true once per request.
|
||||
virtual bool WasRestartRequested() = 0;
|
||||
|
||||
//
|
||||
// Server state. These properties may be changed at any time.
|
||||
//
|
||||
|
||||
/// Max player count that will be reported to server browser and client queries
|
||||
virtual void SetMaxPlayerCount( int cPlayersMax ) = 0;
|
||||
|
||||
/// Number of bots. Default value is zero
|
||||
virtual void SetBotPlayerCount( int cBotplayers ) = 0;
|
||||
|
||||
/// Set the name of server as it will appear in the server browser
|
||||
///
|
||||
/// @see k_cbMaxGameServerName
|
||||
virtual void SetServerName( const char *pszServerName ) = 0;
|
||||
|
||||
/// Set name of map to report in the server browser
|
||||
///
|
||||
/// @see k_cbMaxGameServerName
|
||||
virtual void SetMapName( const char *pszMapName ) = 0;
|
||||
|
||||
/// Let people know if your server will require a password
|
||||
virtual void SetPasswordProtected( bool bPasswordProtected ) = 0;
|
||||
|
||||
/// Spectator server. The default value is zero, meaning the service
|
||||
/// is not used.
|
||||
virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0;
|
||||
|
||||
/// Name of the spectator server. (Only used if spectator port is nonzero.)
|
||||
///
|
||||
/// @see k_cbMaxGameServerMapName
|
||||
virtual void SetSpectatorServerName( const char *pszSpectatorServerName ) = 0;
|
||||
|
||||
/// Call this to clear the whole list of key/values that are sent in rules queries.
|
||||
virtual void ClearAllKeyValues() = 0;
|
||||
|
||||
/// Call this to add/update a key/value pair.
|
||||
virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0;
|
||||
|
||||
/// Sets a string defining the "gametags" 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
|
||||
///
|
||||
/// @see k_cbMaxGameServerTags
|
||||
virtual void SetGameTags( const char *pchGameTags ) = 0;
|
||||
|
||||
/// Sets a string defining the "gamedata" 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
|
||||
/// don't set this unless it actually changes, its only uploaded to the master once (when
|
||||
/// acknowledged)
|
||||
///
|
||||
/// @see k_cbMaxGameServerGameData
|
||||
virtual void SetGameData( const char *pchGameData) = 0;
|
||||
|
||||
/// Region identifier. This is an optional field, the default value is empty, meaning the "world" region
|
||||
virtual void SetRegion( const char *pszRegion ) = 0;
|
||||
|
||||
//
|
||||
// Player list management / authentication
|
||||
//
|
||||
|
||||
// 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
|
||||
@@ -57,63 +167,6 @@ public:
|
||||
// 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( 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 "gametags" 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 SetGameTags( const char *pchGameTags ) = 0;
|
||||
|
||||
// Ask for the gameplay stats for the server. Results returned in a callback
|
||||
virtual void GetGameplayStats( ) = 0;
|
||||
|
||||
// Gets the reputation score for the game server. This API also checks if the server or some
|
||||
// other server on the same IP is banned from the Steam master servers.
|
||||
virtual SteamAPICall_t GetServerReputation( ) = 0;
|
||||
|
||||
// Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t
|
||||
// returns false if we're not connected to the steam servers and thus cannot ask
|
||||
virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0;
|
||||
|
||||
// Returns the public IP of the server according to Steam, useful when the server is
|
||||
// behind NAT and you want to advertise its IP in a lobby for other clients to directly
|
||||
// connect to
|
||||
virtual uint32 GetPublicIP() = 0;
|
||||
|
||||
// Sets a string defining the "gamedata" 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
|
||||
// don't set this unless it actually changes, its only uploaded to the master once (when
|
||||
// acknowledged)
|
||||
virtual void SetGameData( const char *pchGameData) = 0;
|
||||
|
||||
// After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function
|
||||
// to determine if the user owns downloadable content specified by the provided AppID.
|
||||
virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0;
|
||||
|
||||
// New auth system APIs - do not mix with the old auth system APIs.
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
@@ -131,9 +184,78 @@ public:
|
||||
// Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to
|
||||
virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0;
|
||||
|
||||
// After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function
|
||||
// to determine if the user owns downloadable content specified by the provided AppID.
|
||||
virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0;
|
||||
|
||||
// Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t
|
||||
// returns false if we're not connected to the steam servers and thus cannot ask
|
||||
virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0;
|
||||
|
||||
//
|
||||
// Query steam for server data
|
||||
//
|
||||
|
||||
// Ask for the gameplay stats for the server. Results returned in a callback
|
||||
virtual void GetGameplayStats( ) = 0;
|
||||
|
||||
// Gets the reputation score for the game server. This API also checks if the server or some
|
||||
// other server on the same IP is banned from the Steam master servers.
|
||||
virtual SteamAPICall_t GetServerReputation( ) = 0;
|
||||
|
||||
// Returns the public IP of the server according to Steam, useful when the server is
|
||||
// behind NAT and you want to advertise its IP in a lobby for other clients to directly
|
||||
// connect to
|
||||
virtual uint32 GetPublicIP() = 0;
|
||||
|
||||
// These are in GameSocketShare mode, where instead of ISteamGameServer creating its own
|
||||
// socket to talk to the master server on, it lets the game use its socket to forward messages
|
||||
// back and forth. This prevents us from requiring server ops to open up yet another port
|
||||
// in their firewalls.
|
||||
//
|
||||
// the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001
|
||||
|
||||
// These are used when you've elected to multiplex the game server's UDP socket
|
||||
// rather than having the master server updater use its own sockets.
|
||||
//
|
||||
// Source games use this to simplify the job of the server admins, so they
|
||||
// don't have to open up more ports on their firewalls.
|
||||
|
||||
// Call this when a packet that starts with 0xFFFFFFFF comes in. That means
|
||||
// it's for us.
|
||||
virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0;
|
||||
|
||||
// AFTER calling HandleIncomingPacket for any packets that came in that frame, call this.
|
||||
// This gets a packet that the master server updater needs to send out on UDP.
|
||||
// It returns the length of the packet it wants to send, or 0 if there are no more packets to send.
|
||||
// Call this each frame until it returns 0.
|
||||
virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0;
|
||||
|
||||
//
|
||||
// Control heartbeats / advertisement with master server
|
||||
//
|
||||
|
||||
// Call this as often as you like to tell the master server updater whether or not
|
||||
// you want it to be active (default: off).
|
||||
virtual void EnableHeartbeats( bool bActive ) = 0;
|
||||
|
||||
// You usually don't need to modify this.
|
||||
// Pass -1 to use the default value for iHeartbeatInterval.
|
||||
// Some mods change this.
|
||||
virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0;
|
||||
|
||||
// Force a heartbeat to steam at the next opportunity
|
||||
virtual void ForceHeartbeat() = 0;
|
||||
|
||||
// associate this game server with this clan for the purposes of computing player compat
|
||||
virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0;
|
||||
|
||||
// ask if any of the current players dont want to play with this new player - or vice versa
|
||||
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer010"
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer011"
|
||||
|
||||
// game server flags
|
||||
const uint32 k_unServerFlagNone = 0x00;
|
||||
@@ -239,6 +361,24 @@ struct GSReputation_t
|
||||
uint32 m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970)
|
||||
};
|
||||
|
||||
// Sent as a reply to AssociateWithClan()
|
||||
struct AssociateWithClanResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 10 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
};
|
||||
|
||||
// Sent as a reply to ComputeNewPlayerCompatibility()
|
||||
struct ComputeNewPlayerCompatibilityResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 11 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
int m_cPlayersThatDontLikeCandidate;
|
||||
int m_cPlayersThatCandidateDoesntLike;
|
||||
int m_cClanPlayersThatDontLikeCandidate;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMGAMESERVER_H
|
||||
|
||||
@@ -99,6 +99,8 @@ public:
|
||||
|
||||
#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION001"
|
||||
|
||||
// callbacks
|
||||
#pragma pack( push, 8 )
|
||||
|
||||
struct HTTPRequestCompleted_t
|
||||
{
|
||||
@@ -120,5 +122,6 @@ struct HTTPRequestCompleted_t
|
||||
EHTTPStatusCode m_eStatusCode;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMHTTP_H
|
||||
@@ -1,103 +1 @@
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to steam for retrieving list of game servers
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMMASTERSERVERUPDATER_H
|
||||
#define ISTEAMMASTERSERVERUPDATER_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamclient.h"
|
||||
|
||||
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Game engines use this to tell the Steam master servers
|
||||
// about their games so their games can show up in the server browser.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMasterServerUpdater
|
||||
{
|
||||
public:
|
||||
|
||||
// Call this as often as you like to tell the master server updater whether or not
|
||||
// you want it to be active (default: off).
|
||||
virtual void SetActive( bool bActive ) = 0;
|
||||
|
||||
// You usually don't need to modify this.
|
||||
// Pass -1 to use the default value for iHeartbeatInterval.
|
||||
// Some mods change this.
|
||||
virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0;
|
||||
|
||||
|
||||
// These are in GameSocketShare mode, where instead of ISteamMasterServerUpdater creating its own
|
||||
// socket to talk to the master server on, it lets the game use its socket to forward messages
|
||||
// back and forth. This prevents us from requiring server ops to open up yet another port
|
||||
// in their firewalls.
|
||||
//
|
||||
// the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001
|
||||
|
||||
// These are used when you've elected to multiplex the game server's UDP socket
|
||||
// rather than having the master server updater use its own sockets.
|
||||
//
|
||||
// Source games use this to simplify the job of the server admins, so they
|
||||
// don't have to open up more ports on their firewalls.
|
||||
|
||||
// Call this when a packet that starts with 0xFFFFFFFF comes in. That means
|
||||
// it's for us.
|
||||
virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0;
|
||||
|
||||
// AFTER calling HandleIncomingPacket for any packets that came in that frame, call this.
|
||||
// This gets a packet that the master server updater needs to send out on UDP.
|
||||
// It returns the length of the packet it wants to send, or 0 if there are no more packets to send.
|
||||
// Call this each frame until it returns 0.
|
||||
virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0;
|
||||
|
||||
|
||||
// Functions to set various fields that are used to respond to queries.
|
||||
|
||||
// Call this to set basic data that is passed to the server browser.
|
||||
virtual void SetBasicServerData(
|
||||
unsigned short nProtocolVersion,
|
||||
bool bDedicatedServer,
|
||||
const char *pRegionName,
|
||||
const char *pProductName,
|
||||
unsigned short nMaxReportedClients,
|
||||
bool bPasswordProtected,
|
||||
const char *pGameDescription ) = 0;
|
||||
|
||||
// Call this to clear the whole list of key/values that are sent in rules queries.
|
||||
virtual void ClearAllKeyValues() = 0;
|
||||
|
||||
// Call this to add/update a key/value pair.
|
||||
virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0;
|
||||
|
||||
|
||||
// You can call this upon shutdown to clear out data stored for this game server and
|
||||
// to tell the master servers that this server is going away.
|
||||
virtual void NotifyShutdown() = 0;
|
||||
|
||||
// Returns true if the master server has requested a restart.
|
||||
// Only returns true once per request.
|
||||
virtual bool WasRestartRequested() = 0;
|
||||
|
||||
// Force it to request a heartbeat from the master servers.
|
||||
virtual void ForceHeartbeat() = 0;
|
||||
|
||||
// Manually edit and query the master server list.
|
||||
// It will provide name resolution and use the default master server port if none is provided.
|
||||
virtual bool AddMasterServer( const char *pServerAddress ) = 0;
|
||||
virtual bool RemoveMasterServer( const char *pServerAddress ) = 0;
|
||||
|
||||
virtual int GetNumMasterServers() = 0;
|
||||
|
||||
// Returns the # of bytes written to pOut.
|
||||
virtual int GetMasterServerAddress( int iServer, char *pOut, int outBufferSize ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMMASTERSERVERUPDATER_INTERFACE_VERSION "SteamMasterServerUpdater001"
|
||||
|
||||
#endif // ISTEAMMASTERSERVERUPDATER_H
|
||||
#error "This file isn't used any more"
|
||||
|
||||
@@ -119,6 +119,8 @@ public:
|
||||
// sets how many results to return, the lower the count the faster it is to download the lobby results & details to the client
|
||||
virtual void AddRequestLobbyListResultCountFilter( int cMaxResults ) = 0;
|
||||
|
||||
virtual void AddRequestLobbyListCompatibleMembersFilter( CSteamID steamIDLobby ) = 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)
|
||||
@@ -129,7 +131,7 @@ public:
|
||||
// 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
|
||||
// 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)
|
||||
virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int cMaxMembers ) = 0;
|
||||
|
||||
@@ -241,6 +243,10 @@ public:
|
||||
// after completion, the local user will no longer be the owner
|
||||
virtual bool SetLobbyOwner( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) = 0;
|
||||
|
||||
// link two lobbies for the purposes of checking player compatibility
|
||||
// you must be the lobby owner of both lobbies
|
||||
virtual bool SetLinkedLobby( CSteamID steamIDLobby, CSteamID steamIDLobbyDependent ) = 0;
|
||||
|
||||
#ifdef _PS3
|
||||
// changes who the lobby owner is
|
||||
// you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby
|
||||
@@ -248,7 +254,7 @@ public:
|
||||
virtual void CheckForPSNGameBootInvite( unsigned int iGameBootAttributes ) = 0;
|
||||
#endif
|
||||
};
|
||||
#define STEAMMATCHMAKING_INTERFACE_VERSION "SteamMatchMaking008"
|
||||
#define STEAMMATCHMAKING_INTERFACE_VERSION "SteamMatchMaking009"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -444,7 +450,7 @@ public:
|
||||
// Request the list of players currently playing on a server
|
||||
virtual HServerQuery PlayerDetails( uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse *pRequestServersResponse ) = 0;
|
||||
|
||||
// Request the list of rules that the server is running (See ISteamMasterServerUpdater->SetKeyValue() to set the rules server side)
|
||||
// Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side)
|
||||
virtual HServerQuery ServerRules( uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse *pRequestServersResponse ) = 0;
|
||||
|
||||
// Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel
|
||||
@@ -621,8 +627,8 @@ struct LobbyKicked_t
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result of our request to create a Lobby
|
||||
// m_eResult == k_EResultOK on success
|
||||
// at this point, the local user may not have finishing joining this lobby;
|
||||
// game code should wait until the subsequent LobbyEnter_t callback is received
|
||||
// at this point, the lobby has been joined and is ready for use
|
||||
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyCreated_t
|
||||
{
|
||||
|
||||
@@ -12,10 +12,28 @@
|
||||
|
||||
#include "isteamclient.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Structure that contains an array of const char * strings and the number of those strings
|
||||
//-----------------------------------------------------------------------------
|
||||
#pragma pack( push, 8 )
|
||||
struct SteamParamStringArray_t
|
||||
{
|
||||
const char ** m_ppStrings;
|
||||
int32 m_nNumStrings;
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
// A handle to a piece of user generated content
|
||||
typedef uint64 UGCHandle_t;
|
||||
typedef uint64 PublishedFileId_t;
|
||||
const UGCHandle_t k_UGCHandleInvalid = 0xffffffffffffffffull;
|
||||
|
||||
const uint32 k_cchPublishedDocumentTitleMax = 128 + 1;
|
||||
const uint32 k_cchPublishedDocumentDescriptionMax = 256 + 1;
|
||||
const uint32 k_unEnumeratePublishedFilesMaxResults = 50;
|
||||
const uint32 k_cchTagListMax = 1024 + 1;
|
||||
const uint32 k_cchFilenameMax = 260;
|
||||
|
||||
// Ways to handle a synchronization conflict
|
||||
enum EResolveConflict
|
||||
{
|
||||
@@ -35,6 +53,124 @@ enum ERemoteStoragePlatform
|
||||
k_ERemoteStoragePlatformAll = 0xffffffff
|
||||
};
|
||||
|
||||
enum ERemoteStoragePublishedFileVisibility
|
||||
{
|
||||
k_ERemoteStoragePublishedFileVisibilityPublic = 0,
|
||||
k_ERemoteStoragePublishedFileVisibilityFriendsOnly = 1,
|
||||
k_ERemoteStoragePublishedFileVisibilityPrivate = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: helper structure for making updates to published files.
|
||||
// make sure to update serialization/deserialization in interfacemap.cpp if new properties are added
|
||||
//-----------------------------------------------------------------------------
|
||||
#pragma pack( push, 8 )
|
||||
struct RemoteStorageUpdatePublishedFileRequest_t
|
||||
{
|
||||
public:
|
||||
RemoteStorageUpdatePublishedFileRequest_t()
|
||||
{
|
||||
Initialize( k_GIDNil );
|
||||
}
|
||||
|
||||
RemoteStorageUpdatePublishedFileRequest_t( PublishedFileId_t unPublishedFileId )
|
||||
{
|
||||
Initialize( unPublishedFileId );
|
||||
}
|
||||
|
||||
PublishedFileId_t GetPublishedFileId() { return m_unPublishedFileId; }
|
||||
|
||||
void SetFile( const char *pchFile )
|
||||
{
|
||||
m_pchFile = pchFile;
|
||||
m_bUpdateFile = true;
|
||||
}
|
||||
|
||||
const char *GetFile() { return m_pchFile; }
|
||||
bool BUpdateFile() { return m_bUpdateFile; }
|
||||
|
||||
void SetPreviewFile( const char *pchPreviewFile )
|
||||
{
|
||||
m_pchPreviewFile = pchPreviewFile;
|
||||
m_bUpdatePreviewFile = true;
|
||||
}
|
||||
|
||||
const char *GetPreviewFile() { return m_pchPreviewFile; }
|
||||
bool BUpdatePreviewFile() { return m_bUpdatePreviewFile; }
|
||||
|
||||
void SetTitle( const char *pchTitle )
|
||||
{
|
||||
m_pchTitle = pchTitle;
|
||||
m_bUpdateTitle = true;
|
||||
}
|
||||
|
||||
const char *GetTitle() { return m_pchTitle; }
|
||||
bool BUpdateTitle() { return m_bUpdateTitle; }
|
||||
|
||||
void SetDescription( const char *pchDescription )
|
||||
{
|
||||
m_pchDescription = pchDescription;
|
||||
m_bUpdateDescription = true;
|
||||
}
|
||||
|
||||
const char *GetDescription() { return m_pchDescription; }
|
||||
bool BUpdateDescription() { return m_bUpdateDescription; }
|
||||
|
||||
void SetVisibility( ERemoteStoragePublishedFileVisibility eVisibility )
|
||||
{
|
||||
m_eVisibility = eVisibility;
|
||||
m_bUpdateVisibility = true;
|
||||
}
|
||||
|
||||
const ERemoteStoragePublishedFileVisibility GetVisibility() { return m_eVisibility; }
|
||||
bool BUpdateVisibility() { return m_bUpdateVisibility; }
|
||||
|
||||
void SetTags( SteamParamStringArray_t *pTags )
|
||||
{
|
||||
m_pTags = pTags;
|
||||
m_bUpdateTags = true;
|
||||
}
|
||||
|
||||
SteamParamStringArray_t *GetTags() { return m_pTags; }
|
||||
bool BUpdateTags() { return m_bUpdateTags; }
|
||||
SteamParamStringArray_t **GetTagsPointer() { return &m_pTags; }
|
||||
|
||||
void Initialize( PublishedFileId_t unPublishedFileId )
|
||||
{
|
||||
m_unPublishedFileId = unPublishedFileId;
|
||||
m_pchFile = 0;
|
||||
m_pchPreviewFile = 0;
|
||||
m_pchTitle = 0;
|
||||
m_pchDescription = 0;
|
||||
m_pTags = 0;
|
||||
|
||||
m_bUpdateFile = false;
|
||||
m_bUpdatePreviewFile = false;
|
||||
m_bUpdateTitle = false;
|
||||
m_bUpdateDescription = false;
|
||||
m_bUpdateTags = false;
|
||||
m_bUpdateVisibility = false;
|
||||
}
|
||||
|
||||
private:
|
||||
PublishedFileId_t m_unPublishedFileId;
|
||||
const char *m_pchFile;
|
||||
const char *m_pchPreviewFile;
|
||||
const char *m_pchTitle;
|
||||
const char *m_pchDescription;
|
||||
ERemoteStoragePublishedFileVisibility m_eVisibility;
|
||||
SteamParamStringArray_t *m_pTags;
|
||||
|
||||
bool m_bUpdateFile;
|
||||
bool m_bUpdatePreviewFile;
|
||||
bool m_bUpdateTitle;
|
||||
bool m_bUpdateDescription;
|
||||
bool m_bUpdateVisibility;
|
||||
bool m_bUpdateTags;
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing, reading and writing files stored remotely
|
||||
// and cached locally
|
||||
@@ -100,9 +236,20 @@ class ISteamRemoteStorage
|
||||
// Reset any fetch/persist/etc requests
|
||||
virtual bool ResetFileRequestState() = 0;
|
||||
#endif
|
||||
|
||||
// publishing UGC
|
||||
virtual SteamAPICall_t PublishFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0;
|
||||
virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, SteamParamStringArray_t *pTags ) = 0;
|
||||
virtual SteamAPICall_t UpdatePublishedFile( RemoteStorageUpdatePublishedFileRequest_t updatePublishedFileRequest ) = 0;
|
||||
virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0;
|
||||
virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0;
|
||||
virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION004"
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION005"
|
||||
|
||||
// callbacks
|
||||
#pragma pack( push, 8 )
|
||||
@@ -138,7 +285,7 @@ struct RemoteStorageAppSyncedServer_t
|
||||
struct RemoteStorageAppSyncProgress_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 3 };
|
||||
char m_rgchCurrentFile[260]; // Current file being transferred
|
||||
char m_rgchCurrentFile[k_cchFilenameMax]; // Current file being transferred
|
||||
AppId_t m_nAppID; // App this info relates to
|
||||
uint32 m_uBytesTransferredThisChunk; // Bytes transferred this chunk
|
||||
double m_dAppPercentComplete; // Percent complete that this app's transfers are
|
||||
@@ -181,21 +328,130 @@ struct RemoteStorageFileShareResult_t
|
||||
UGCHandle_t m_hFile; // The handle that can be shared with users and features
|
||||
};
|
||||
|
||||
|
||||
// k_iClientRemoteStorageCallbacks + 8 is deprecated! Do not reuse
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to PublishFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 9 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetPublishedFileDetails()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageGetPublishedFileDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 10 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
AppId_t m_nCreatorAppID; // ID of the app that created this file.
|
||||
AppId_t m_nConsumerAppID; // ID of the app that created this file.
|
||||
char m_rgchTitle[k_cchPublishedDocumentTitleMax]; // title of document
|
||||
char m_rgchDescription[k_cchPublishedDocumentDescriptionMax]; // description of document
|
||||
UGCHandle_t m_hFile; // The handle of the primary file
|
||||
UGCHandle_t m_hPreviewFile; // The handle of the preview file
|
||||
uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content.
|
||||
uint32 m_rtimeCreated; // time when the published file was created
|
||||
uint32 m_rtimeUpdated; // time when the published file was last updated
|
||||
ERemoteStoragePublishedFileVisibility m_eVisibility;
|
||||
bool m_bBanned;
|
||||
char m_rgchTags[k_cchTagListMax]; // comma separated list of all tags associated with this file
|
||||
bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer
|
||||
char m_pchFileName[k_cchFilenameMax]; // The name of the primary file
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to DeletePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageDeletePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 11 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to EnumerateUserPublishedFiles()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageEnumerateUserPublishedFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 12 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
int32 m_nTotalResultCount;
|
||||
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to SubscribePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageSubscribePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 13 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to EnumerateSubscribePublishedFiles()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageEnumerateUserSubscribedFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 14 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
int32 m_nTotalResultCount;
|
||||
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
uint32 m_rgRTimeSubscribed[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UnsubscribePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUnsubscribePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 15 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UpdatePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUpdatePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 16 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UGCDownload()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageDownloadUGCResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 8 };
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 17 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded.
|
||||
AppId_t m_nAppID; // ID of the app that created this file.
|
||||
int32 m_nSizeInBytes; // The size of the file that was downloaded, in bytes.
|
||||
char *m_pchFileName; // The name of the file that was downloaded. This pointer is
|
||||
// not guaranteed to be valid indefinitely.
|
||||
char m_pchFileName[k_cchFilenameMax]; // The name of the file that was downloaded.
|
||||
uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content.
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ public:
|
||||
// Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio
|
||||
// as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format.
|
||||
// The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
||||
virtual ScreenshotHandle AddScreenshotToLibrary( const char *pchJpegOrTGAFilename, const char *pchJpegOrTGAThumbFilename, int nWidth, int nHeight ) = 0;
|
||||
// JPEG, TGA, and PNG formats are supported.
|
||||
virtual ScreenshotHandle AddScreenshotToLibrary( const char *pchFilename, const char *pchThumbnailFilename, int nWidth, int nHeight ) = 0;
|
||||
|
||||
// Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead.
|
||||
virtual void TriggerScreenshot() = 0;
|
||||
|
||||
@@ -301,6 +301,16 @@ struct EncryptedAppTicketResponse_t
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for GetAuthSessionTicket
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetAuthSessionTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 63 };
|
||||
HAuthTicket m_hAuthTicket;
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMUSER_H
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,6 +21,17 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
//
|
||||
// Max size (in bytes of UTF-8 data, not in characters) of server fields, including null terminator.
|
||||
// WARNING: These cannot be changed easily, without breaking clients using old interfaces.
|
||||
//
|
||||
const int k_cbMaxGameServerGameDir = 32;
|
||||
const int k_cbMaxGameServerMapName = 32;
|
||||
const int k_cbMaxGameServerGameDescription = 64;
|
||||
const int k_cbMaxGameServerName = 64;
|
||||
const int k_cbMaxGameServerTags = 128;
|
||||
const int k_cbMaxGameServerGameData = 128;
|
||||
|
||||
struct MatchMakingKeyValuePair_t
|
||||
{
|
||||
MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; }
|
||||
@@ -51,8 +62,7 @@ public:
|
||||
|
||||
void Init( unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort );
|
||||
#ifdef NETADR_H
|
||||
void Init( const netadr_t &ipAndQueryPort, uint16 usConnectionPort );
|
||||
netadr_t& GetIPAndQueryPort();
|
||||
netadr_t GetIPAndQueryPort();
|
||||
#endif
|
||||
|
||||
// Access the query port.
|
||||
@@ -97,17 +107,9 @@ inline void servernetadr_t::Init( unsigned int ip, uint16 usQueryPort, uint16 us
|
||||
}
|
||||
|
||||
#ifdef NETADR_H
|
||||
inline void servernetadr_t::Init( const netadr_t &ipAndQueryPort, uint16 usConnectionPort )
|
||||
inline netadr_t servernetadr_t::GetIPAndQueryPort()
|
||||
{
|
||||
Init( ipAndQueryPort.GetIP(), ipAndQueryPort.GetPort(), usConnectionPort );
|
||||
}
|
||||
|
||||
inline netadr_t& servernetadr_t::GetIPAndQueryPort()
|
||||
{
|
||||
static netadr_t netAdr;
|
||||
netAdr.SetIP( m_unIP );
|
||||
netAdr.SetPort( m_usQueryPort );
|
||||
return netAdr;
|
||||
return netadr_t( m_unIP, m_usQueryPort );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -180,29 +182,34 @@ public:
|
||||
void SetName( const char *pName );
|
||||
|
||||
public:
|
||||
servernetadr_t m_NetAdr; // IP/Query Port/Connection Port for this server
|
||||
int m_nPing; // current ping time in milliseconds
|
||||
bool m_bHadSuccessfulResponse; // server has responded successfully in the past
|
||||
bool m_bDoNotRefresh; // server is marked as not responding and should no longer be refreshed
|
||||
char m_szGameDir[32]; // current game directory
|
||||
char m_szMap[32]; // current map
|
||||
char m_szGameDescription[64]; // game description
|
||||
uint32 m_nAppID; // Steam App ID of this server
|
||||
int m_nPlayers; // current number of players on the server
|
||||
int m_nMaxPlayers; // Maximum players that can join this server
|
||||
int m_nBotPlayers; // Number of bots (i.e simulated players) on this server
|
||||
bool m_bPassword; // true if this server needs a password to join
|
||||
bool m_bSecure; // Is this server protected by VAC
|
||||
uint32 m_ulTimeLastPlayed; // time (in unix time) when this server was last played on (for favorite/history servers)
|
||||
int m_nServerVersion; // server version as reported to Steam
|
||||
servernetadr_t m_NetAdr; ///< IP/Query Port/Connection Port for this server
|
||||
int m_nPing; ///< current ping time in milliseconds
|
||||
bool m_bHadSuccessfulResponse; ///< server has responded successfully in the past
|
||||
bool m_bDoNotRefresh; ///< server is marked as not responding and should no longer be refreshed
|
||||
char m_szGameDir[k_cbMaxGameServerGameDir]; ///< current game directory
|
||||
char m_szMap[k_cbMaxGameServerMapName]; ///< current map
|
||||
char m_szGameDescription[k_cbMaxGameServerGameDescription]; ///< game description
|
||||
uint32 m_nAppID; ///< Steam App ID of this server
|
||||
int m_nPlayers; ///< current number of players on the server
|
||||
int m_nMaxPlayers; ///< Maximum players that can join this server
|
||||
int m_nBotPlayers; ///< Number of bots (i.e simulated players) on this server
|
||||
bool m_bPassword; ///< true if this server needs a password to join
|
||||
bool m_bSecure; ///< Is this server protected by VAC
|
||||
uint32 m_ulTimeLastPlayed; ///< time (in unix time) when this server was last played on (for favorite/history servers)
|
||||
int m_nServerVersion; ///< server version as reported to Steam
|
||||
|
||||
private:
|
||||
char m_szServerName[64]; // Game server name
|
||||
|
||||
/// Game server name
|
||||
char m_szServerName[k_cbMaxGameServerName];
|
||||
|
||||
// For data added after SteamMatchMaking001 add it here
|
||||
public:
|
||||
char m_szGameTags[128]; // the tags this server exposes
|
||||
CSteamID m_steamID; // steamID of the game server - invalid if it's doesn't have one (old server, or not connected to Steam)
|
||||
/// the tags this server exposes
|
||||
char m_szGameTags[k_cbMaxGameServerTags];
|
||||
|
||||
/// steamID of the game server - invalid if it's doesn't have one (old server, or not connected to Steam)
|
||||
CSteamID m_steamID;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+14
-11
@@ -79,15 +79,6 @@ S_API bool SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
|
||||
S_API void SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
|
||||
S_API void SteamAPI_SetMiniDumpComment( const char *pchMsg );
|
||||
|
||||
// this should be called before the game initialized the steam APIs
|
||||
// pchDate should be of the format "Mmm dd yyyy" (such as from the __DATE__ macro )
|
||||
// pchTime should be of the format "hh:mm:ss" (such as from the __TIME__ macro )
|
||||
// bFullMemoryDumps (Win32 only) -- writes out a uuid-full.dmp in the client/dumps folder
|
||||
// pvContext-- can be NULL, will be the void * context passed into m_pfnPreMinidumpCallback
|
||||
// PFNPreMinidumpCallback m_pfnPreMinidumpCallback -- optional callback which occurs just before a .dmp file is written during a crash. Applications can hook this to allow adding additional information into the .dmp comment stream.
|
||||
S_API void SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback );
|
||||
S_API void SteamAPI_SetBreakpadAppID( uint32 unAppID );
|
||||
|
||||
// interface pointers, configured by SteamAPI_Init()
|
||||
S_API ISteamClient *SteamClient();
|
||||
|
||||
@@ -255,7 +246,7 @@ private:
|
||||
// template params: T = local class, P = parameter struct
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P, bool bGameServer >
|
||||
class CCallback : private CCallbackBase
|
||||
class CCallback : protected CCallbackBase
|
||||
{
|
||||
public:
|
||||
typedef void (T::*func_t)( P* );
|
||||
@@ -305,7 +296,7 @@ public:
|
||||
}
|
||||
|
||||
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
|
||||
private:
|
||||
protected:
|
||||
virtual void Run( void *pvParam )
|
||||
{
|
||||
(m_pObj->*m_Func)( (P *)pvParam );
|
||||
@@ -439,6 +430,7 @@ inline void CSteamAPIContext::Clear()
|
||||
m_pSteamMatchmakingServers = NULL;
|
||||
m_pSteamNetworking = NULL;
|
||||
m_pSteamRemoteStorage = NULL;
|
||||
m_pSteamHTTP = NULL;
|
||||
m_pSteamScreenshots = NULL;
|
||||
}
|
||||
|
||||
@@ -504,4 +496,15 @@ inline bool CSteamAPIContext::Init()
|
||||
|
||||
#endif // VERSION_SAFE_STEAM_API_INTERFACES
|
||||
|
||||
#if defined(USE_BREAKPAD_HANDLER) || defined(STEAM_API_EXPORTS)
|
||||
// this should be called before the game initialized the steam APIs
|
||||
// pchDate should be of the format "Mmm dd yyyy" (such as from the __DATE__ macro )
|
||||
// pchTime should be of the format "hh:mm:ss" (such as from the __TIME__ macro )
|
||||
// bFullMemoryDumps (Win32 only) -- writes out a uuid-full.dmp in the client/dumps folder
|
||||
// pvContext-- can be NULL, will be the void * context passed into m_pfnPreMinidumpCallback
|
||||
// PFNPreMinidumpCallback m_pfnPreMinidumpCallback -- optional callback which occurs just before a .dmp file is written during a crash. Applications can hook this to allow adding additional information into the .dmp comment stream.
|
||||
S_API void SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback );
|
||||
S_API void SteamAPI_SetBreakpadAppID( uint32 unAppID );
|
||||
#endif
|
||||
|
||||
#endif // STEAM_API_H
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "steam_api.h"
|
||||
#include "isteamgameserver.h"
|
||||
#include "isteammasterserverupdater.h"
|
||||
#include "isteamgameserverstats.h"
|
||||
|
||||
enum EServerMode
|
||||
@@ -23,26 +22,33 @@ enum EServerMode
|
||||
eServerModeAuthenticationAndSecure = 3, // Authenticate users, list on the server list and VAC protect clients
|
||||
};
|
||||
|
||||
// Note: if you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it will use "GameSocketShare" mode,
|
||||
// which means that the game is responsible for sending and receiving UDP packets for the master
|
||||
// server updater. See references to GameSocketShare in isteammasterserverupdater.h.
|
||||
// Initialize ISteamGameServer interface object, and set server properties which may not be changed.
|
||||
//
|
||||
// Pass 0 for usGamePort or usSpectatorPort if you're not using that. Then, the master server updater will report
|
||||
// what's running based on that.
|
||||
// After calling this function, you should set any additional server parameters, and then
|
||||
// call ISteamGameServer::LogOnAnonymous() or ISteamGameServer::LogOn()
|
||||
//
|
||||
// - usSteamPort is the local port used to communicate with the steam servers.
|
||||
// - usGamePort is the port that clients will connect to for gameplay.
|
||||
// - usQueryPort is the port that will manage server browser related duties and info
|
||||
// pings from clients. If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it
|
||||
// will use "GameSocketShare" mode, which means that the game is responsible for sending and receiving
|
||||
// UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h.
|
||||
// - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the
|
||||
// server is out of date. (Only servers with the latest version will be listed.)
|
||||
#ifndef _PS3
|
||||
|
||||
#ifdef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
S_API bool SteamGameServer_InitSafe( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString );
|
||||
S_API bool SteamGameServer_InitSafe( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
#else
|
||||
S_API bool SteamGameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString );
|
||||
S_API bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
S_API bool SteamGameServer_InitSafe( const SteamPS3Params_t *ps3Params, uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString );
|
||||
S_API bool SteamGameServer_InitSafe( const SteamPS3Params_t *ps3Params, uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
#else
|
||||
S_API bool SteamGameServer_Init( const SteamPS3Params_t *ps3Params, uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString );
|
||||
S_API bool SteamGameServer_Init( const SteamPS3Params_t *ps3Params, uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -50,9 +56,9 @@ S_API bool SteamGameServer_Init( const SteamPS3Params_t *ps3Params, uint32 unIP,
|
||||
#ifndef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
S_API ISteamGameServer *SteamGameServer();
|
||||
S_API ISteamUtils *SteamGameServerUtils();
|
||||
S_API ISteamMasterServerUpdater *SteamMasterServerUpdater();
|
||||
S_API ISteamNetworking *SteamGameServerNetworking();
|
||||
S_API ISteamGameServerStats *SteamGameServerStats();
|
||||
S_API ISteamHTTP *SteamGameServerHTTP();
|
||||
#endif
|
||||
|
||||
S_API void SteamGameServer_Shutdown();
|
||||
@@ -92,16 +98,16 @@ public:
|
||||
|
||||
ISteamGameServer *SteamGameServer() { return m_pSteamGameServer; }
|
||||
ISteamUtils *SteamGameServerUtils() { return m_pSteamGameServerUtils; }
|
||||
ISteamMasterServerUpdater *SteamMasterServerUpdater() { return m_pSteamMasterServerUpdater; }
|
||||
ISteamNetworking *SteamGameServerNetworking() { return m_pSteamGameServerNetworking; }
|
||||
ISteamGameServerStats *SteamGameServerStats() { return m_pSteamGameServerStats; }
|
||||
ISteamHTTP *SteamHTTP() { return m_pSteamHTTP; }
|
||||
|
||||
private:
|
||||
ISteamGameServer *m_pSteamGameServer;
|
||||
ISteamUtils *m_pSteamGameServerUtils;
|
||||
ISteamMasterServerUpdater *m_pSteamMasterServerUpdater;
|
||||
ISteamNetworking *m_pSteamGameServerNetworking;
|
||||
ISteamGameServerStats *m_pSteamGameServerStats;
|
||||
ISteamHTTP *m_pSteamHTTP;
|
||||
};
|
||||
|
||||
inline CSteamGameServerAPIContext::CSteamGameServerAPIContext()
|
||||
@@ -113,9 +119,9 @@ inline void CSteamGameServerAPIContext::Clear()
|
||||
{
|
||||
m_pSteamGameServer = NULL;
|
||||
m_pSteamGameServerUtils = NULL;
|
||||
m_pSteamMasterServerUpdater = NULL;
|
||||
m_pSteamGameServerNetworking = NULL;
|
||||
m_pSteamGameServerStats = NULL;
|
||||
m_pSteamHTTP = NULL;
|
||||
}
|
||||
|
||||
S_API ISteamClient *g_pSteamClientGameServer;
|
||||
@@ -136,10 +142,6 @@ inline bool CSteamGameServerAPIContext::Init()
|
||||
if ( !m_pSteamGameServerUtils )
|
||||
return false;
|
||||
|
||||
m_pSteamMasterServerUpdater = g_pSteamClientGameServer->GetISteamMasterServerUpdater( hSteamUser, hSteamPipe, STEAMMASTERSERVERUPDATER_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMasterServerUpdater )
|
||||
return false;
|
||||
|
||||
m_pSteamGameServerNetworking = g_pSteamClientGameServer->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION );
|
||||
if ( !m_pSteamGameServerNetworking )
|
||||
return false;
|
||||
@@ -148,6 +150,10 @@ inline bool CSteamGameServerAPIContext::Init()
|
||||
if ( !m_pSteamGameServerStats )
|
||||
return false;
|
||||
|
||||
m_pSteamHTTP = g_pSteamClientGameServer->GetISteamHTTP( hSteamUser, hSteamPipe, STEAMHTTP_INTERFACE_VERSION );
|
||||
if ( !m_pSteamGameServerStats )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ enum EChatEntryType
|
||||
k_EChatEntryTypeTyping = 2, // Another user is typing (not used in multi-user chat)
|
||||
k_EChatEntryTypeInviteGame = 3, // Invite from other user into that users current game
|
||||
k_EChatEntryTypeEmote = 4, // text emote message
|
||||
k_EChatEntryTypeLobbyGameStart = 5, // lobby game is starting
|
||||
//k_EChatEntryTypeLobbyGameStart = 5, // lobby game is starting (dead - listen for LobbyGameCreated_t callback instead)
|
||||
k_EChatEntryTypeLeftConversation = 6, // user has left the conversation ( closed chat window )
|
||||
// Above are previous FriendMsgType entries, now merged into more generic chat entry types
|
||||
};
|
||||
@@ -253,6 +253,8 @@ enum EChatRoomEnterResponse
|
||||
k_EChatRoomEnterResponseLimited = 7, // Joining this chat is not allowed because you are a limited user (no value on account)
|
||||
k_EChatRoomEnterResponseClanDisabled = 8, // Attempt to join a clan chat when the clan is locked or disabled
|
||||
k_EChatRoomEnterResponseCommunityBan = 9, // Attempt to join a chat when the user has a community lock on their account
|
||||
k_EChatRoomEnterResponseMemberBlockedYou = 10, // Join failed - some member in the chat has blocked you from joining
|
||||
k_EChatRoomEnterResponseYouBlockedMember = 11, // Join failed - you have blocked some member already in the chat
|
||||
};
|
||||
|
||||
|
||||
@@ -273,9 +275,10 @@ typedef bool (*PFNLegacyKeyInstalled)();
|
||||
|
||||
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
|
||||
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
|
||||
// we allow 2 simultaneous user account instances right now, 1= desktop, 2 = console, 0 = all
|
||||
const unsigned int k_unSteamUserDesktopInstance = 1;
|
||||
const unsigned int k_unSteamUserConsoleInstance = 2;
|
||||
// we allow 3 simultaneous user account instances right now, 1= desktop, 2 = console, 4 = web, 0 = all
|
||||
const unsigned int k_unSteamUserDesktopInstance = 1;
|
||||
const unsigned int k_unSteamUserConsoleInstance = 2;
|
||||
const unsigned int k_unSteamUserWebInstance = 4;
|
||||
|
||||
// Special flags for Chat accounts - they go in the top 8 bits
|
||||
// of the steam ID's "instance", leaving 12 for the actual instances
|
||||
@@ -361,7 +364,7 @@ public:
|
||||
CSteamID( uint32 unAccountID, unsigned int unAccountInstance, EUniverse eUniverse, EAccountType eAccountType )
|
||||
{
|
||||
#if defined(_SERVER) && defined(Assert)
|
||||
Assert( ! ( ( k_EAccountTypeIndividual == eAccountType ) && ( unAccountInstance > k_unSteamUserConsoleInstance ) ) ); // enforce that for individual accounts, instance is always 1
|
||||
Assert( ! ( ( k_EAccountTypeIndividual == eAccountType ) && ( unAccountInstance > k_unSteamUserWebInstance ) ) ); // enforce that for individual accounts, instance is always 1
|
||||
#endif // _SERVER
|
||||
InstancedSet( unAccountID, unAccountInstance, eUniverse, eAccountType );
|
||||
}
|
||||
@@ -527,13 +530,29 @@ public:
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this a game server account id?
|
||||
// Purpose: Is this a game server account id? (Either persistent or anonymous)
|
||||
//-----------------------------------------------------------------------------
|
||||
bool BGameServerAccount() const
|
||||
{
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer || m_steamid.m_comp.m_EAccountType == k_EAccountTypeAnonGameServer;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this a persistent (not anonymous) game server account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
bool BPersistentGameServerAccount() const
|
||||
{
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this an anonymous game server account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
bool BAnonGameServerAccount() const
|
||||
{
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeAnonGameServer;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this a content server account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -608,7 +627,7 @@ public:
|
||||
void SetAccountInstance( uint32 unInstance ){ m_steamid.m_comp.m_unAccountInstance = unInstance; }
|
||||
void ClearIndividualInstance() { if ( BIndividualAccount() ) m_steamid.m_comp.m_unAccountInstance = 0; }
|
||||
bool HasNoIndividualInstance() const { return BIndividualAccount() && (m_steamid.m_comp.m_unAccountInstance==0); }
|
||||
uint32 GetAccountID() const { return m_steamid.m_comp.m_unAccountID; }
|
||||
AccountID_t GetAccountID() const { return m_steamid.m_comp.m_unAccountID; }
|
||||
uint32 GetUnAccountInstance() const { return m_steamid.m_comp.m_unAccountInstance; }
|
||||
EAccountType GetEAccountType() const { return ( EAccountType ) m_steamid.m_comp.m_EAccountType; }
|
||||
EUniverse GetEUniverse() const { return m_steamid.m_comp.m_EUniverse; }
|
||||
@@ -671,7 +690,7 @@ inline bool CSteamID::IsValid() const
|
||||
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance > k_unSteamUserConsoleInstance )
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance > k_unSteamUserWebInstance )
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -680,6 +699,13 @@ inline bool CSteamID::IsValid() const
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 )
|
||||
return false;
|
||||
// Any limit on instances? We use them for local users and bots
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,13 @@
|
||||
#define STEAM_PS3_COMMUNICATION_SIG_MAX 160
|
||||
#define STEAM_PS3_LANGUAGE_MAX 64
|
||||
#define STEAM_PS3_REGION_CODE_MAX 16
|
||||
#define STEAM_PS3_CURRENT_PARAMS_VER 1
|
||||
struct SteamPS3Params_t
|
||||
{
|
||||
uint32 m_unVersion; // set to STEAM_PS3_CURRENT_PARAMS_VER
|
||||
|
||||
void *pReserved;
|
||||
uint32 m_nAppId;
|
||||
uint32 m_nAppId; // set to your game's appid
|
||||
|
||||
char m_rgchInstallationPath[ STEAM_PS3_PATH_MAX ]; // directory containing latest steam prx's and sdata. Can be read only (BDVD)
|
||||
char m_rgchSystemCache[ STEAM_PS3_PATH_MAX ]; // temp working cache, not persistent
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,77 @@
|
||||
//========= Copyright Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: Class for joining and showing clan chats
|
||||
//
|
||||
//================================================================
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "clanchatroom.h"
|
||||
#include "BaseMenu.h"
|
||||
#include <math.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
CClanChatRoom::CClanChatRoom( IGameEngine *pGameEngine ) : m_pGameEngine( pGameEngine )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Run a frame for the CClanChatRoom
|
||||
//-----------------------------------------------------------------------------
|
||||
void CClanChatRoom::RunFrame()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Shows / Refreshes the chat room
|
||||
//-----------------------------------------------------------------------------
|
||||
void CClanChatRoom::Show()
|
||||
{
|
||||
// start joining a chat, if we aren't in one already
|
||||
if ( !m_steamIDChat.IsValid() || !m_SteamCallResultJoinChatRoom.IsActive() )
|
||||
{
|
||||
// pick a clan to join from the users current data
|
||||
CSteamID steamIDBestClan;
|
||||
for ( int i = 0; i < SteamFriends()->GetClanCount(); i++ )
|
||||
{
|
||||
CSteamID steamIDClan = SteamFriends()->GetClanByIndex( i );
|
||||
int online, ingame, chatting;
|
||||
if ( SteamFriends()->GetClanActivityCounts( steamIDClan, &online, &ingame, &chatting ) )
|
||||
{
|
||||
if ( chatting > 0 )
|
||||
{
|
||||
steamIDBestClan = steamIDClan;
|
||||
break;
|
||||
}
|
||||
else if ( online )
|
||||
{
|
||||
steamIDBestClan = steamIDClan;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( steamIDBestClan.IsValid() )
|
||||
{
|
||||
SteamAPICall_t hCall = SteamFriends()->JoinClanChatRoom( steamIDBestClan );
|
||||
m_SteamCallResultJoinChatRoom.Set( hCall, this, &CClanChatRoom::OnJoinChatRoom );
|
||||
OutputDebugString( "joining clan chat...\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when SteamFriends()->JoinClanChatRoom() returns asynchronously
|
||||
//-----------------------------------------------------------------------------
|
||||
void CClanChatRoom::OnJoinChatRoom( JoinClanChatRoomCompletionResult_t *pResult, bool bIOFailure )
|
||||
{
|
||||
if ( pResult->m_eChatRoomEnterResponse == k_EChatRoomEnterResponseSuccess )
|
||||
{
|
||||
// we've entered
|
||||
OutputDebugString( "succesfully joined clan chat\n" );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//========= Copyright © 1996-2009, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: Class for joining and showing clan chat rooms
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef CLANCHATROOM_H
|
||||
#define CLANCHATROOM_H
|
||||
|
||||
#include "SpaceWar.h"
|
||||
#include "GameEngine.h"
|
||||
#include "StatsAndAchievements.h"
|
||||
#include "SpaceWarClient.h"
|
||||
|
||||
|
||||
class ISteamUser;
|
||||
|
||||
class CClanChatRoom
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
CClanChatRoom( IGameEngine *pGameEngine );
|
||||
|
||||
// Run a frame
|
||||
void RunFrame();
|
||||
|
||||
// shows / refreshes chat
|
||||
void Show();
|
||||
|
||||
private:
|
||||
// Engine
|
||||
IGameEngine *m_pGameEngine;
|
||||
|
||||
// Called when SteamFriends()->JoinClanChatRoom() returns asynchronously
|
||||
void OnJoinChatRoom( JoinClanChatRoomCompletionResult_t *pResult, bool bIOFailure );
|
||||
CCallResult<CClanChatRoom, JoinClanChatRoomCompletionResult_t> m_SteamCallResultJoinChatRoom;
|
||||
|
||||
CSteamID m_steamIDChat;
|
||||
|
||||
};
|
||||
|
||||
#endif // CLANCHATROOM_H
|
||||
@@ -326,8 +326,6 @@ bool CGameEngineGL::BInitializeGraphics()
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO];
|
||||
|
||||
[app setDelegate: app];
|
||||
[m_window setDelegate: app];
|
||||
[m_window setAcceptsMouseMovedEvents:YES];
|
||||
|
||||
GLint swapInt = 1;
|
||||
@@ -2215,4 +2213,4 @@ void CGameEngineGL::ShowPixels ( CShowPixelsParams *params )
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
503C6DB41269002800B66E3B /* libsteam_api.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 503C6DB31269002800B66E3B /* libsteam_api.dylib */; };
|
||||
504EDCBC126901EC00F96D63 /* libsteam_api.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 503C6DB31269002800B66E3B /* libsteam_api.dylib */; };
|
||||
504EDCC21269026C00F96D63 /* steam_appid.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 504EDCC01269025A00F96D63 /* steam_appid.txt */; };
|
||||
50D642871461EF3200A5739B /* clanchatroom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50D642851461EF3200A5739B /* clanchatroom.cpp */; };
|
||||
50E77DEB1362190C000FC072 /* cglmbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E77DD11362190C000FC072 /* cglmbuffer.cpp */; };
|
||||
50E77DEC1362190C000FC072 /* cglmfbo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E77DD31362190C000FC072 /* cglmfbo.cpp */; };
|
||||
50E77DED1362190C000FC072 /* cglmprogram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E77DD51362190C000FC072 /* cglmprogram.cpp */; };
|
||||
@@ -123,6 +124,8 @@
|
||||
503C6DB31269002800B66E3B /* libsteam_api.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsteam_api.dylib; path = ../redistributable_bin/osx32/libsteam_api.dylib; sourceTree = "<absolute>"; };
|
||||
504EDCB4126900D600F96D63 /* steamworksexample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "steamworksexample-Info.plist"; path = "osx/steamworksexample-Info.plist"; sourceTree = "<group>"; };
|
||||
504EDCC01269025A00F96D63 /* steam_appid.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = steam_appid.txt; path = osx/steam_appid.txt; sourceTree = "<group>"; };
|
||||
50D642851461EF3200A5739B /* clanchatroom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clanchatroom.cpp; sourceTree = "<group>"; };
|
||||
50D642861461EF3200A5739B /* clanchatroom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clanchatroom.h; sourceTree = "<group>"; };
|
||||
50E77DD11362190C000FC072 /* cglmbuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cglmbuffer.cpp; path = ../glmgr/cglmbuffer.cpp; sourceTree = "<group>"; };
|
||||
50E77DD21362190C000FC072 /* cglmbuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cglmbuffer.h; path = ../glmgr/cglmbuffer.h; sourceTree = "<group>"; };
|
||||
50E77DD31362190C000FC072 /* cglmfbo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cglmfbo.cpp; path = ../glmgr/cglmfbo.cpp; sourceTree = "<group>"; };
|
||||
@@ -199,6 +202,7 @@
|
||||
503C6D0B1268F49F00B66E3B /* VectorEntity.cpp */,
|
||||
503C6D0D1268F49F00B66E3B /* voicechat.cpp */,
|
||||
503C6CD91268F49F00B66E3B /* BaseMenu.cpp */,
|
||||
50D642851461EF3200A5739B /* clanchatroom.cpp */,
|
||||
503C6CDB1268F49F00B66E3B /* connectingmenu.cpp */,
|
||||
503C6CE01268F49F00B66E3B /* gameengineosx.mm */,
|
||||
503C6CE21268F49F00B66E3B /* glstringosx.mm */,
|
||||
@@ -242,6 +246,7 @@
|
||||
503C6D291268F4EE00B66E3B /* Headers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
50D642861461EF3200A5739B /* clanchatroom.h */,
|
||||
503C6CEE1268F49F00B66E3B /* p2pauth.h */,
|
||||
503C6CF01268F49F00B66E3B /* PhotonBeam.h */,
|
||||
503C6CF21268F49F00B66E3B /* QuitMenu.h */,
|
||||
@@ -399,6 +404,7 @@
|
||||
50E77DF41362190C000FC072 /* glmgrcocoa.mm in Sources */,
|
||||
50E77DF51362190C000FC072 /* glmgrext.cpp in Sources */,
|
||||
50E77DF61362190C000FC072 /* mathlite.cpp in Sources */,
|
||||
50D642871461EF3200A5739B /* clanchatroom.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,52 @@
|
||||
==================================================
|
||||
Using the DRM tool
|
||||
==================================================
|
||||
|
||||
1. Create a steam account just for submitting builds via DRM tool. Set it up with a *very* strong password. At least 12 characters, mixed case, and including some non-alpha numeric characters.
|
||||
2. Add the account to your Steam publishing group using the steamworks user admin.
|
||||
3. Give the account access to submit DRM
|
||||
4. Disable Steam Guard on the account
|
||||
5. Enter the account user name and password into the drmtool.cfg file that sits with the drmtool.exe
|
||||
6. run DRM tool using the appropriate path to your exe, app ID, and flags
|
||||
|
||||
|
||||
==================================================
|
||||
How to disable Steam Guard
|
||||
==================================================
|
||||
|
||||
1. Go to Steam -> settings -> Account
|
||||
2. Click: Manage Steam Guard Account Security...
|
||||
3. Disable Steam Guard (Not Recommended)
|
||||
4. Click Next, etc.
|
||||
|
||||
==================================================
|
||||
Flag values
|
||||
==================================================
|
||||
Normal: 32
|
||||
Min compatibility mode: 36
|
||||
Max compatibility mode: 38
|
||||
|
||||
Try it with flag = 32, if that breaks the game, try with flag = 36, if that still breaks the game, try with flag = 38.
|
||||
|
||||
==================================================
|
||||
Example usage
|
||||
==================================================
|
||||
drmtool.exe -remotedrm build_path\Auslandia.exe 107700 32
|
||||
|
||||
==================================================
|
||||
Example drmtool.cfg file
|
||||
==================================================
|
||||
server:partner.steamgames.com
|
||||
user:ACCOUNT_NAME_WITH_STEAMGUARD_DISABLED
|
||||
pw:VER_STRONG_PASSWORD
|
||||
universe:public
|
||||
|
||||
==================================================
|
||||
Note on applying the DRM wrapper on top of other DRM systems
|
||||
==================================================
|
||||
If you are applying another DRM technology to the executable, wrap the exe with Steam DRM first in max compatibility mode (38) then apply the additional DRM.
|
||||
|
||||
==================================================
|
||||
Note on .Net executables
|
||||
==================================================
|
||||
Note: The DRM tool breaks most .net executables. If you are building a .Net executable, you can skip the DRM wrapper, but please put in your own Steam check using SteamAPI_RestartAppIfNecessary( unOwnAppID ).
|
||||
@@ -0,0 +1,4 @@
|
||||
server:partner.steamgames.com
|
||||
user:account
|
||||
pw:password
|
||||
universe:public
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user