aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/steam
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2014-05-15 13:59:18 -0700
committerJoe Ludwig <[email protected]>2014-05-15 13:59:18 -0700
commit53e78c503e6e9c7d15e2eefc480755fe37dd7077 (patch)
treec8cc106eb4c0a2b2b5d79f534f2facb0514f5f55 /sp/src/public/steam
parentAdded many shader source files (diff)
downloadsource-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.tar.xz
source-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.zip
General:
* Upgraded Steamworks SDK to v1.29 * Fixed mod compatibility problem with Multiplayer Base that was introduced in September. * In Hammer, while using the Vertex Tool, pressing CTRL+B will snap selected vertices to the grid. Virtual Reality: * Mods that support virtual reality now need to have a line in gameinfo.txt that says “supportsvr 1”. This indicates to gameui and engine that certain UI should be enabled. * VR-enabled mods will now start up in VR mode when launched from Steam’s VR mode. Windows: * Upgraded to Visual Studio 2013. If you need to build projects for VS 2010, add /2010 to your VPC command line. OSX: * Upgraded to XCode 5.
Diffstat (limited to 'sp/src/public/steam')
-rw-r--r--sp/src/public/steam/isteamapplist.h63
-rw-r--r--sp/src/public/steam/isteamapps.h28
-rw-r--r--sp/src/public/steam/isteamclient.h136
-rw-r--r--sp/src/public/steam/isteamcontroller.h35
-rw-r--r--sp/src/public/steam/isteamfriends.h9
-rw-r--r--sp/src/public/steam/isteamgameserver.h25
-rw-r--r--sp/src/public/steam/isteammatchmaking.h20
-rw-r--r--sp/src/public/steam/isteammusic.h67
-rw-r--r--sp/src/public/steam/isteamremotestorage.h77
-rw-r--r--sp/src/public/steam/isteamugc.h205
-rw-r--r--sp/src/public/steam/isteamuser.h15
-rw-r--r--sp/src/public/steam/isteamutils.h11
-rw-r--r--sp/src/public/steam/matchmakingtypes.h7
-rw-r--r--sp/src/public/steam/steam_api.h100
-rw-r--r--sp/src/public/steam/steamclientpublic.h66
-rw-r--r--sp/src/public/steam/steamcontrollerpublic.h76
-rw-r--r--sp/src/public/steam/steamhttpenums.h8
-rw-r--r--sp/src/public/steam/steamtypes.h17
-rw-r--r--sp/src/public/steam/steamuniverse.h27
-rw-r--r--sp/src/public/steam/steamvr.h242
20 files changed, 1074 insertions, 160 deletions
diff --git a/sp/src/public/steam/isteamapplist.h b/sp/src/public/steam/isteamapplist.h
new file mode 100644
index 00000000..b9d71136
--- /dev/null
+++ b/sp/src/public/steam/isteamapplist.h
@@ -0,0 +1,63 @@
+//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
+//
+// Purpose: interface to app data in Steam
+//
+//=============================================================================
+
+#ifndef ISTEAMAPPLIST_H
+#define ISTEAMAPPLIST_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "steam/isteamclient.h"
+#include "steam/steamtypes.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: This is a restricted interface that can only be used by previously approved apps,
+// contact your Steam Account Manager if you believe you need access to this API.
+// This interface lets you detect installed apps for the local Steam client, useful for debugging tools
+// to offer lists of apps to debug via Steam.
+//-----------------------------------------------------------------------------
+class ISteamAppList
+{
+public:
+ virtual uint32 GetNumInstalledApps() = 0;
+ virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0;
+
+ virtual int GetAppName( AppId_t nAppID, char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found
+ virtual int GetAppInstallDir( AppId_t nAppID, char *pchDirectory, int cchNameMax ) = 0; // returns -1 if no dir was found
+
+ virtual int GetAppBuildId( AppId_t nAppID ) = 0; // return the buildid of this app, may change at any time based on backend updates to the game
+};
+
+#define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001"
+
+// callbacks
+#if defined( VALVE_CALLBACK_PACK_SMALL )
+#pragma pack( push, 4 )
+#elif defined( VALVE_CALLBACK_PACK_LARGE )
+#pragma pack( push, 8 )
+#else
+#error isteamclient.h must be included
+#endif
+
+
+//---------------------------------------------------------------------------------
+// Purpose: Sent when a new app is installed
+//---------------------------------------------------------------------------------
+DEFINE_CALLBACK( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 );
+ CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
+END_DEFINE_CALLBACK_1()
+
+
+//---------------------------------------------------------------------------------
+// Purpose: Sent when an app is uninstalled
+//---------------------------------------------------------------------------------
+DEFINE_CALLBACK( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 );
+ CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
+END_DEFINE_CALLBACK_1()
+
+
+#pragma pack( pop )
+#endif // ISTEAMAPPLIST_H
diff --git a/sp/src/public/steam/isteamapps.h b/sp/src/public/steam/isteamapps.h
index 7021a352..7070e2e9 100644
--- a/sp/src/public/steam/isteamapps.h
+++ b/sp/src/public/steam/isteamapps.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to app data in Steam
//
@@ -59,10 +59,19 @@ public:
virtual bool GetCurrentBetaName( char *pchName, int cchNameBufferSize ) = 0; // returns current beta branch name, 'public' is the default branch
virtual bool MarkContentCorrupt( bool bMissingFilesOnly ) = 0; // signal Steam that game files seems corrupt or missing
- virtual uint32 GetInstalledDepots( DepotId_t *pvecDepots, uint32 cMaxDepots ) = 0; // return installed depots in mount order
+ virtual uint32 GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots ) = 0; // return installed depots in mount order
// returns current app install folder for AppID, returns folder name length
virtual uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) = 0;
+ virtual bool BIsAppInstalled( AppId_t appID ) = 0; // returns true if that app is installed (not necessarily owned)
+
+ virtual CSteamID GetAppOwner() = 0; // returns the SteamID of the original owner. If different from current user, it's borrowed
+
+ // Returns the associated launch param if the game is run via steam://run/<appid>//?param1=value1;param2=value2;param3=value3 etc.
+ // Parameter names starting with the character '@' are reserved for internal use and will always return and empty string.
+ // Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
+ // but it is advised that you not param names beginning with an underscore for your own features.
+ virtual const char *GetLaunchQueryParam( const char *pchKey ) = 0;
#ifdef _PS3
// Result returned in a RegisterActivationCodeResponse_t callresult
@@ -70,7 +79,7 @@ public:
#endif
};
-#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION005"
+#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION006"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@@ -123,5 +132,18 @@ struct AppProofOfPurchaseKeyResponse_t
uint32 m_nAppID;
char m_rgchKey[ k_cubAppProofOfPurchaseKeyMax ];
};
+
+//---------------------------------------------------------------------------------
+// Purpose: posted after the user gains executes a steam url with query parameters
+// such as steam://run/<appid>//?param1=value1;param2=value2;param3=value3; etc
+// while the game is already running. The new params can be queried
+// with GetLaunchQueryParam.
+//---------------------------------------------------------------------------------
+struct NewLaunchQueryParameters_t
+{
+ enum { k_iCallback = k_iSteamAppsCallbacks + 14 };
+};
+
+
#pragma pack( pop )
#endif // ISTEAMAPPS_H
diff --git a/sp/src/public/steam/isteamclient.h b/sp/src/public/steam/isteamclient.h
index 43a2076e..b54ad3dc 100644
--- a/sp/src/public/steam/isteamclient.h
+++ b/sp/src/public/steam/isteamclient.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: Main interface for loading and accessing Steamworks API's from the
// Steam client.
@@ -17,6 +17,10 @@
// Define compile time assert macros to let us validate the structure sizes.
#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1];
+#ifndef REFERENCE
+#define REFERENCE(arg) ((void)arg)
+#endif
+
#if defined(__linux__) || defined(__APPLE__)
// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
@@ -83,10 +87,14 @@ class ISteamApps;
class ISteamNetworking;
class ISteamRemoteStorage;
class ISteamScreenshots;
+class ISteamMusic;
class ISteamGameServerStats;
class ISteamPS3OverlayRender;
class ISteamHTTP;
class ISteamUnifiedMessages;
+class ISteamController;
+class ISteamUGC;
+class ISteamAppList;
//-----------------------------------------------------------------------------
// Purpose: Interface to creating a new steam instance, or to
@@ -189,9 +197,20 @@ public:
// Exposes the ISteamUnifiedMessages interface
virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
+ // Exposes the ISteamController interface
+ virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
+
+ // Exposes the ISteamUGC interface
+ virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
+
+ // returns app list interface, only available on specially registered apps
+ virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
+
+ // Music Player
+ virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
};
-#define STEAMCLIENT_INTERFACE_VERSION "SteamClient012"
+#define STEAMCLIENT_INTERFACE_VERSION "SteamClient014"
//-----------------------------------------------------------------------------
// Purpose: Base values for callback identifiers, each callback must
@@ -228,6 +247,15 @@ enum { k_iSteamControllerCallbacks = 2800 };
enum { k_iClientParentalSettingsCallbacks = 2900 };
enum { k_iClientDeviceAuthCallbacks = 3000 };
enum { k_iClientNetworkDeviceManagerCallbacks = 3100 };
+enum { k_iClientMusicCallbacks = 3200 };
+enum { k_iClientRemoteClientManagerCallbacks = 3300 };
+enum { k_iClientUGCCallbacks = 3400 };
+enum { k_iSteamStreamClientCallbacks = 3500 };
+enum { k_IClientProductBuilderCallbacks = 3600 };
+enum { k_iClientShortcutsCallbacks = 3700 };
+enum { k_iClientRemoteControlManagerCallbacks = 3800 };
+enum { k_iSteamAppListCallbacks = 3900 };
+enum { k_iSteamMusicCallbacks = 4000 };
//-----------------------------------------------------------------------------
@@ -236,21 +264,18 @@ enum { k_iClientNetworkDeviceManagerCallbacks = 3100 };
// Do not change any of these.
//-----------------------------------------------------------------------------
-class CSteamCallback
+struct SteamCallback_t
{
public:
- virtual const char *GetCallbackName() const = 0;
- virtual uint32 GetCallbackID() const = 0;
- virtual uint8 *GetFixedData() const = 0;
- virtual uint32 GetFixedSize() const = 0;
- virtual uint32 GetNumMemberVariables() const = 0;
- virtual bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) const = 0;
+ SteamCallback_t() {}
};
#define DEFINE_CALLBACK( callbackname, callbackid ) \
-struct callbackname##_t { \
+struct callbackname : SteamCallback_t { \
enum { k_iCallback = callbackid }; \
- static callbackname##_t *GetNullPointer() { return 0; }
+ static callbackname *GetNullPointer() { return 0; } \
+ static const char *GetCallbackName() { return #callbackname; } \
+ static uint32 GetCallbackID() { return callbackname::k_iCallback; }
#define CALLBACK_MEMBER( varidx, vartype, varname ) \
public: vartype varname ; \
@@ -269,74 +294,93 @@ struct callbackname##_t { \
*pszName = #varname; *pszType = #vartype; }
-#define END_CALLBACK_INTERNAL_BEGIN( callbackname, numvars ) }; \
-class C##callbackname : public CSteamCallback { \
-public: callbackname##_t m_Data; \
- C##callbackname () { memset( &m_Data, 0, sizeof(m_Data) ); } \
- virtual const char *GetCallbackName() const { return #callbackname; } \
- virtual uint32 GetCallbackID() const { return callbackname##_t::k_iCallback; } \
- virtual uint32 GetFixedSize() const { return sizeof( m_Data ); } \
- virtual uint8 *GetFixedData() const { return (uint8*)&m_Data; } \
- virtual uint32 GetNumMemberVariables() const { return numvars; } \
- virtual bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) const { \
+#define END_CALLBACK_INTERNAL_BEGIN( numvars ) \
+ static uint32 GetNumMemberVariables() { return numvars; } \
+ static bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \
switch ( index ) { default : return false;
-#define END_CALLBACK_INTERNAL_SWITCH( varidx ) case varidx : m_Data.GetMemberVar_##varidx( varOffset, varSize, varCount, pszName, pszType ); return true;
+#define END_CALLBACK_INTERNAL_SWITCH( varidx ) case varidx : GetMemberVar_##varidx( varOffset, varSize, varCount, pszName, pszType ); return true;
-#define END_CALLBACK_INTERNAL_END() }; }; };
+#define END_CALLBACK_INTERNAL_END() }; } };
-#define END_DEFINE_CALLBACK_0( callbackname ) }; \
-class C##callbackname : public CSteamCallback { \
-public: callbackname##_t m_Data; \
- virtual const char *GetCallbackName() const { return #callbackname; } \
- virtual uint32 GetCallbackID() const { return callbackname##_t::k_iCallback; } \
- virtual uint32 GetFixedSize() const { return sizeof( m_Data ); } \
- virtual uint8 *GetFixedData() const { return (uint8*)&m_Data; } \
- virtual uint32 GetNumMemberVariables() const { return 0; } \
- virtual bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) const { return false; } \
- }; \
+#define END_DEFINE_CALLBACK_0() \
+ static uint32 GetNumMemberVariables() { return 0; } \
+ static bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { REFERENCE( pszType ); REFERENCE( pszName ); REFERENCE( varCount ); REFERENCE( varSize ); REFERENCE( varOffset ); REFERENCE( index ); return false; } \
+ };
-#define END_DEFINE_CALLBACK_1( callbackname ) \
- END_CALLBACK_INTERNAL_BEGIN( callbackname, 1 ) \
+#define END_DEFINE_CALLBACK_1() \
+ END_CALLBACK_INTERNAL_BEGIN( 1 ) \
END_CALLBACK_INTERNAL_SWITCH( 0 ) \
END_CALLBACK_INTERNAL_END()
-#define END_DEFINE_CALLBACK_2( callbackname ) \
- END_CALLBACK_INTERNAL_BEGIN( callbackname, 2 ) \
+#define END_DEFINE_CALLBACK_2() \
+ END_CALLBACK_INTERNAL_BEGIN( 2 ) \
END_CALLBACK_INTERNAL_SWITCH( 0 ) \
END_CALLBACK_INTERNAL_SWITCH( 1 ) \
END_CALLBACK_INTERNAL_END()
-#define END_DEFINE_CALLBACK_3( callbackname ) \
- END_CALLBACK_INTERNAL_BEGIN( callbackname, 3 ) \
+#define END_DEFINE_CALLBACK_3() \
+ END_CALLBACK_INTERNAL_BEGIN( 3 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 0 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 1 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 2 ) \
+ END_CALLBACK_INTERNAL_END()
+
+#define END_DEFINE_CALLBACK_4() \
+ END_CALLBACK_INTERNAL_BEGIN( 4 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 0 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 1 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 2 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 3 ) \
+ END_CALLBACK_INTERNAL_END()
+
+#define END_DEFINE_CALLBACK_5() \
+ END_CALLBACK_INTERNAL_BEGIN( 4 ) \
END_CALLBACK_INTERNAL_SWITCH( 0 ) \
END_CALLBACK_INTERNAL_SWITCH( 1 ) \
END_CALLBACK_INTERNAL_SWITCH( 2 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 3 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 4 ) \
END_CALLBACK_INTERNAL_END()
-#define END_DEFINE_CALLBACK_4( callbackname ) \
- END_CALLBACK_INTERNAL_BEGIN( callbackname, 4 ) \
+
+#define END_DEFINE_CALLBACK_6() \
+ END_CALLBACK_INTERNAL_BEGIN( 6 ) \
END_CALLBACK_INTERNAL_SWITCH( 0 ) \
END_CALLBACK_INTERNAL_SWITCH( 1 ) \
END_CALLBACK_INTERNAL_SWITCH( 2 ) \
END_CALLBACK_INTERNAL_SWITCH( 3 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 4 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 5 ) \
END_CALLBACK_INTERNAL_END()
+#define END_DEFINE_CALLBACK_7() \
+ END_CALLBACK_INTERNAL_BEGIN( 7 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 0 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 1 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 2 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 3 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 4 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 5 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 6 ) \
+ END_CALLBACK_INTERNAL_END()
-#define END_DEFINE_CALLBACK_6( callbackname ) \
- END_CALLBACK_INTERNAL_BEGIN( callbackname, 6 ) \
+#define END_DEFINE_CALLBACK_8() \
+ END_CALLBACK_INTERNAL_BEGIN( 7 ) \
END_CALLBACK_INTERNAL_SWITCH( 0 ) \
END_CALLBACK_INTERNAL_SWITCH( 1 ) \
END_CALLBACK_INTERNAL_SWITCH( 2 ) \
END_CALLBACK_INTERNAL_SWITCH( 3 ) \
END_CALLBACK_INTERNAL_SWITCH( 4 ) \
END_CALLBACK_INTERNAL_SWITCH( 5 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 6 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 7 ) \
END_CALLBACK_INTERNAL_END()
-#define END_DEFINE_CALLBACK_7( callbackname ) \
- END_CALLBACK_INTERNAL_BEGIN( callbackname, 7 ) \
+#define END_DEFINE_CALLBACK_9() \
+ END_CALLBACK_INTERNAL_BEGIN( 7 ) \
END_CALLBACK_INTERNAL_SWITCH( 0 ) \
END_CALLBACK_INTERNAL_SWITCH( 1 ) \
END_CALLBACK_INTERNAL_SWITCH( 2 ) \
@@ -344,6 +388,8 @@ public: callbackname##_t m_Data; \
END_CALLBACK_INTERNAL_SWITCH( 4 ) \
END_CALLBACK_INTERNAL_SWITCH( 5 ) \
END_CALLBACK_INTERNAL_SWITCH( 6 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 7 ) \
+ END_CALLBACK_INTERNAL_SWITCH( 8 ) \
END_CALLBACK_INTERNAL_END()
#endif // ISTEAMCLIENT_H
diff --git a/sp/src/public/steam/isteamcontroller.h b/sp/src/public/steam/isteamcontroller.h
index 6975e565..6a97a6fc 100644
--- a/sp/src/public/steam/isteamcontroller.h
+++ b/sp/src/public/steam/isteamcontroller.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to valve controller
//
@@ -11,6 +11,7 @@
#endif
#include "isteamclient.h"
+#include "steamcontrollerpublic.h"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@@ -21,16 +22,44 @@
#error isteamclient.h must be included
#endif
+#define MAX_STEAM_CONTROLLERS 16
#pragma pack( pop )
+enum ESteamControllerPad
+{
+ k_ESteamControllerPad_Left,
+ k_ESteamControllerPad_Right
+};
+
+
//-----------------------------------------------------------------------------
-// Purpose: Functions for accessing stats, achievements, and leaderboard information
+// Purpose: Native Steam controller support API
//-----------------------------------------------------------------------------
class ISteamController
{
public:
-
+
+ //
+ // Native controller support API
+ //
+
+ // Must call init and shutdown when starting/ending use of the interface
+ virtual bool Init( const char *pchAbsolutePathToControllerConfigVDF ) = 0;
+ virtual bool Shutdown() = 0;
+
+ // Pump callback/callresult events, SteamAPI_RunCallbacks will do this for you,
+ // normally never need to call directly.
+ virtual void RunFrame() = 0;
+
+ // Get the state of the specified controller, returns false if that controller is not connected
+ virtual bool GetControllerState( uint32 unControllerIndex, SteamControllerState_t *pState ) = 0;
+
+ // Trigger a haptic pulse on the controller
+ virtual void TriggerHapticPulse( uint32 unControllerIndex, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
+
+ // Set the override mode which is used to choose to use different base/legacy bindings from your config file
+ virtual void SetOverrideMode( const char *pchMode ) = 0;
};
#define STEAMCONTROLLER_INTERFACE_VERSION "STEAMCONTROLLER_INTERFACE_VERSION"
diff --git a/sp/src/public/steam/isteamfriends.h b/sp/src/public/steam/isteamfriends.h
index fc0a8e79..16a2aa5a 100644
--- a/sp/src/public/steam/isteamfriends.h
+++ b/sp/src/public/steam/isteamfriends.h
@@ -1,4 +1,4 @@
-//========= Copyright 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
//
@@ -203,6 +203,9 @@ public:
// accesses old friends names - returns an empty string when their are no more items in the history
virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0;
+ // Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player.
+ virtual const char *GetPlayerNickname( CSteamID steamIDPlayer ) = 0;
+
// returns true if the specified user meets any of the criteria specified in iFriendFlags
// iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values
virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0;
@@ -340,7 +343,7 @@ public:
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 int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, CSteamID *psteamidChatter ) = 0;
virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0;
// interact with the Steam (game overlay / desktop)
@@ -360,7 +363,7 @@ public:
virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0;
};
-#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends013"
+#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends014"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
diff --git a/sp/src/public/steam/isteamgameserver.h b/sp/src/public/steam/isteamgameserver.h
index c5667c10..cc109985 100644
--- a/sp/src/public/steam/isteamgameserver.h
+++ b/sp/src/public/steam/isteamgameserver.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright (c) 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam for game servers
//
@@ -56,10 +56,7 @@ public:
/// @see SteamServersConnected_t
/// @see SteamServerConnectFailure_t
/// @see SteamServersDisconnected_t
- virtual void LogOn(
- const char *pszAccountName,
- const char *pszPassword
- ) = 0;
+ virtual void LogOn( const char *pszToken ) = 0;
/// Login to a generic, anonymous account.
///
@@ -121,7 +118,7 @@ public:
/// 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;
+ 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
@@ -129,7 +126,7 @@ public:
/// acknowledged)
///
/// @see k_cbMaxGameServerGameData
- virtual void SetGameData( const char *pchGameData) = 0;
+ 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;
@@ -192,15 +189,10 @@ public:
// 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
+ // these two functions s are deprecated, and will not return results
+ // they will be removed in a future version of the SDK
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
@@ -255,7 +247,7 @@ public:
};
-#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer011"
+#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer012"
// game server flags
const uint32 k_unServerFlagNone = 0x00;
@@ -284,7 +276,8 @@ const uint32 k_unServerFlagPrivate = 0x20; // server shouldn't list on master
struct GSClientApprove_t
{
enum { k_iCallback = k_iSteamGameServerCallbacks + 1 };
- CSteamID m_SteamID;
+ CSteamID m_SteamID; // SteamID of approved player
+ CSteamID m_OwnerSteamID; // SteamID of original owner for game license
};
diff --git a/sp/src/public/steam/isteammatchmaking.h b/sp/src/public/steam/isteammatchmaking.h
index 3d664f52..ca381b81 100644
--- a/sp/src/public/steam/isteammatchmaking.h
+++ b/sp/src/public/steam/isteammatchmaking.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam managing game server/client match making
//
@@ -74,7 +74,7 @@ public:
virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0;
// removes the game server from the local storage; returns true if one was removed
- virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0;
+ virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0;
///////
// Game lobby functions
@@ -563,6 +563,7 @@ struct FavoritesListChanged_t
uint32 m_nAppID;
uint32 m_nFlags;
bool m_bAdd; // true if this is adding the entry, otherwise it is a remove
+ AccountID_t m_unAccountId;
};
@@ -725,6 +726,21 @@ struct PSNGameBootInviteResult_t
bool m_bGameBootInviteExists;
CSteamID m_steamIDLobby; // Should be valid if m_bGameBootInviteExists == true
};
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Result of our request to create a Lobby
+// m_eResult == k_EResultOK on success
+// 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 FavoritesListAccountsUpdated_t
+{
+ enum { k_iCallback = k_iSteamMatchmakingCallbacks + 16 };
+
+ EResult m_eResult;
+};
+
#pragma pack( pop )
diff --git a/sp/src/public/steam/isteammusic.h b/sp/src/public/steam/isteammusic.h
new file mode 100644
index 00000000..23f0b85c
--- /dev/null
+++ b/sp/src/public/steam/isteammusic.h
@@ -0,0 +1,67 @@
+//============ Copyright (c) Valve Corporation, All rights reserved. ============
+
+#ifndef ISTEAMMUSIC_H
+#define ISTEAMMUSIC_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "steam/isteamclient.h"
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+enum AudioPlayback_Status
+{
+ AudioPlayback_Undefined = 0,
+ AudioPlayback_Playing = 1,
+ AudioPlayback_Paused = 2,
+ AudioPlayback_Idle = 3
+};
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Functions to control music playback in the steam client
+//-----------------------------------------------------------------------------
+class ISteamMusic
+{
+public:
+ virtual bool BIsEnabled() = 0;
+ virtual bool BIsPlaying() = 0;
+
+ virtual AudioPlayback_Status GetPlaybackStatus() = 0;
+
+ virtual void Play() = 0;
+ virtual void Pause() = 0;
+ virtual void PlayPrevious() = 0;
+ virtual void PlayNext() = 0;
+
+ // volume is between 0.0 and 1.0
+ virtual void SetVolume( float flVolume ) = 0;
+ virtual float GetVolume() = 0;
+
+};
+
+#define STEAMMUSIC_INTERFACE_VERSION "STEAMMUSIC_INTERFACE_VERSION001"
+
+// callbacks
+#if defined( VALVE_CALLBACK_PACK_SMALL )
+#pragma pack( push, 4 )
+#elif defined( VALVE_CALLBACK_PACK_LARGE )
+#pragma pack( push, 8 )
+#else
+#error isteamclient.h must be included
+#endif
+
+
+DEFINE_CALLBACK( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 )
+END_DEFINE_CALLBACK_0()
+
+DEFINE_CALLBACK( VolumeHasChanged_t, k_iSteamMusicCallbacks + 2 )
+ CALLBACK_MEMBER( 0, float, m_flNewVolume )
+END_DEFINE_CALLBACK_1()
+
+#pragma pack( pop )
+
+
+#endif // #define ISTEAMMUSIC_H
diff --git a/sp/src/public/steam/isteamremotestorage.h b/sp/src/public/steam/isteamremotestorage.h
index 68f0f7e0..ed5aa526 100644
--- a/sp/src/public/steam/isteamremotestorage.h
+++ b/sp/src/public/steam/isteamremotestorage.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: public interface to user remote file storage in Steam
//
@@ -41,6 +41,7 @@ struct SteamParamStringArray_t
typedef uint64 UGCHandle_t;
typedef uint64 PublishedFileUpdateHandle_t;
typedef uint64 PublishedFileId_t;
+const PublishedFileId_t k_PublishedFileIdInvalid = 0;
const UGCHandle_t k_UGCHandleInvalid = 0xffffffffffffffffull;
const PublishedFileUpdateHandle_t k_PublishedFileUpdateHandleInvalid = 0xffffffffffffffffull;
@@ -87,21 +88,23 @@ enum EWorkshopFileType
{
k_EWorkshopFileTypeFirst = 0,
- k_EWorkshopFileTypeCommunity = 0,
- k_EWorkshopFileTypeMicrotransaction = 1,
- k_EWorkshopFileTypeCollection = 2,
- k_EWorkshopFileTypeArt = 3,
- k_EWorkshopFileTypeVideo = 4,
- k_EWorkshopFileTypeScreenshot = 5,
- k_EWorkshopFileTypeGame = 6,
- k_EWorkshopFileTypeSoftware = 7,
- k_EWorkshopFileTypeConcept = 8,
- k_EWorkshopFileTypeWebGuide = 9,
- k_EWorkshopFileTypeIntegratedGuide = 10,
- k_EWorkshopFileTypeMerch = 11,
+ k_EWorkshopFileTypeCommunity = 0,
+ k_EWorkshopFileTypeMicrotransaction = 1,
+ k_EWorkshopFileTypeCollection = 2,
+ k_EWorkshopFileTypeArt = 3,
+ k_EWorkshopFileTypeVideo = 4,
+ k_EWorkshopFileTypeScreenshot = 5,
+ k_EWorkshopFileTypeGame = 6,
+ k_EWorkshopFileTypeSoftware = 7,
+ k_EWorkshopFileTypeConcept = 8,
+ k_EWorkshopFileTypeWebGuide = 9,
+ k_EWorkshopFileTypeIntegratedGuide = 10,
+ k_EWorkshopFileTypeMerch = 11,
+ k_EWorkshopFileTypeControllerBinding = 12,
+ k_EWorkshopFileTypeSteamworksAccessInvite = 13,
// Update k_EWorkshopFileTypeMax if you add values
- k_EWorkshopFileTypeMax = 12
+ k_EWorkshopFileTypeMax = 14
};
@@ -135,6 +138,28 @@ enum EWorkshopVideoProvider
k_EWorkshopVideoProviderYoutube = 1
};
+enum
+{
+ k_WorkshopForceLoadPublishedFileDetailsFromCache = -1
+};
+
+enum EUGCReadAction
+{
+ // Keeps the file handle open unless the last byte is read. You can use this when reading large files (over 100MB) in sequential chunks.
+ // If the last byte is read, this will behave the same as k_EUGCRead_Close. Otherwise, it behaves the same as k_EUGCRead_ContinueReading.
+ // This value maintains the same behavior as before the EUGCReadAction parameter was introduced.
+ k_EUGCRead_ContinueReadingUntilFinished = 0,
+
+ // Keeps the file handle open. Use this when using UGCRead to seek to different parts of the file.
+ // When you are done seeking around the file, make a final call with k_EUGCRead_Close to close it.
+ k_EUGCRead_ContinueReading = 1,
+
+ // Frees the file handle. Use this when you're done reading the content.
+ // To read the file from Steam again you will need to call UGCDownload again.
+ k_EUGCRead_Close = 2,
+};
+
+
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing, reading and writing files stored remotely
// and cached locally
@@ -200,7 +225,7 @@ class ISteamRemoteStorage
// enough memory for each chunk). Once the last byte is read, the file is implicitly closed and further calls to UGCRead will fail
// unless UGCDownload is called again.
// For especially large files (anything over 100MB) it is a requirement that the file is read in chunks.
- virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset ) = 0;
+ virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction ) = 0;
// Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead()
virtual int32 GetCachedUGCCount() = 0;
@@ -235,8 +260,8 @@ class ISteamRemoteStorage
virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0;
virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0;
// Gets published file details for the given publishedfileid. If unMaxSecondsOld is greater than 0,
- // cached data may be returned, depending on how long ago it was cached. A value of 0 will force a refresh,
- // a value of -1 will use cached data if it exists, no matter how old it is.
+ // cached data may be returned, depending on how long ago it was cached. A value of 0 will force a refresh.
+ // A value of k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is.
virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0;
virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
// enumerate the files that the current user published with this app
@@ -258,7 +283,7 @@ class ISteamRemoteStorage
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
};
-#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION011"
+#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION012"
// callbacks
@@ -342,6 +367,7 @@ struct RemoteStorageFileShareResult_t
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 7 };
EResult m_eResult; // The result of the operation
UGCHandle_t m_hFile; // The handle that can be shared with users and features
+ char m_rgchFilename[k_cchFilenameMax]; // The name of the file that was shared
};
@@ -480,6 +506,7 @@ struct RemoteStorageGetPublishedFileDetailsResult_t
int32 m_nPreviewFileSize; // Size of the preview file
char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website)
EWorkshopFileType m_eFileType; // Type of the file
+ bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
};
@@ -491,6 +518,8 @@ struct RemoteStorageEnumerateWorkshopFilesResult_t
int32 m_nTotalResultCount;
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
float m_rgScore[ k_unEnumeratePublishedFilesMaxResults ];
+ AppId_t m_nAppId;
+ uint32 m_unStartIndex;
};
@@ -603,6 +632,18 @@ struct RemoteStoragePublishFileProgress_t
};
+//-----------------------------------------------------------------------------
+// Purpose: Called when the content for a published file is updated
+//-----------------------------------------------------------------------------
+struct RemoteStoragePublishedFileUpdated_t
+{
+ enum { k_iCallback = k_iClientRemoteStorageCallbacks + 30 };
+ PublishedFileId_t m_nPublishedFileId; // The published file id
+ AppId_t m_nAppID; // ID of the app that will consume this file.
+ UGCHandle_t m_hFile; // The new content
+};
+
+
#pragma pack( pop )
diff --git a/sp/src/public/steam/isteamugc.h b/sp/src/public/steam/isteamugc.h
new file mode 100644
index 00000000..ceee8f75
--- /dev/null
+++ b/sp/src/public/steam/isteamugc.h
@@ -0,0 +1,205 @@
+//====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
+//
+// Purpose: interface to steam ugc
+//
+//=============================================================================
+
+#ifndef ISTEAMUGC_H
+#define ISTEAMUGC_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "isteamclient.h"
+
+// callbacks
+#if defined( VALVE_CALLBACK_PACK_SMALL )
+#pragma pack( push, 4 )
+#elif defined( VALVE_CALLBACK_PACK_LARGE )
+#pragma pack( push, 8 )
+#else
+#error isteamclient.h must be included
+#endif
+
+
+typedef uint64 UGCQueryHandle_t;
+typedef uint64 UGCUpdateHandle_t;
+
+
+const UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffffull;
+const UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffffull;
+
+
+// Matching UGC types for queries
+enum EUGCMatchingUGCType
+{
+ k_EUGCMatchingUGCType_Items = 0, // both mtx items and ready-to-use items
+ k_EUGCMatchingUGCType_Items_Mtx = 1,
+ k_EUGCMatchingUGCType_Items_ReadyToUse = 2,
+ k_EUGCMatchingUGCType_Collections = 3,
+ k_EUGCMatchingUGCType_Artwork = 4,
+ k_EUGCMatchingUGCType_Videos = 5,
+ k_EUGCMatchingUGCType_Screenshots = 6,
+ k_EUGCMatchingUGCType_AllGuides = 7, // both web guides and integrated guides
+ k_EUGCMatchingUGCType_WebGuides = 8,
+ k_EUGCMatchingUGCType_IntegratedGuides = 9,
+ k_EUGCMatchingUGCType_UsableInGame = 10, // ready-to-use items and integrated guides
+ k_EUGCMatchingUGCType_ControllerBindings = 11,
+};
+
+// Different lists of published UGC for a user.
+// If the current logged in user is different than the specified user, then some options may not be allowed.
+enum EUserUGCList
+{
+ k_EUserUGCList_Published,
+ k_EUserUGCList_VotedOn,
+ k_EUserUGCList_VotedUp,
+ k_EUserUGCList_VotedDown,
+ k_EUserUGCList_WillVoteLater,
+ k_EUserUGCList_Favorited,
+ k_EUserUGCList_Subscribed,
+ k_EUserUGCList_UsedOrPlayed,
+ k_EUserUGCList_Followed,
+};
+
+// Sort order for user published UGC lists (defaults to creation order descending)
+enum EUserUGCListSortOrder
+{
+ k_EUserUGCListSortOrder_CreationOrderDesc,
+ k_EUserUGCListSortOrder_CreationOrderAsc,
+ k_EUserUGCListSortOrder_TitleAsc,
+ k_EUserUGCListSortOrder_LastUpdatedDesc,
+ k_EUserUGCListSortOrder_SubscriptionDateDesc,
+ k_EUserUGCListSortOrder_VoteScoreDesc,
+ k_EUserUGCListSortOrder_ForModeration,
+};
+
+// Combination of sorting and filtering for queries across all UGC
+enum EUGCQuery
+{
+ k_EUGCQuery_RankedByVote = 0,
+ k_EUGCQuery_RankedByPublicationDate = 1,
+ k_EUGCQuery_AcceptedForGameRankedByAcceptanceDate = 2,
+ k_EUGCQuery_RankedByTrend = 3,
+ k_EUGCQuery_FavoritedByFriendsRankedByPublicationDate = 4,
+ k_EUGCQuery_CreatedByFriendsRankedByPublicationDate = 5,
+ k_EUGCQuery_RankedByNumTimesReported = 6,
+ k_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate = 7,
+ k_EUGCQuery_NotYetRated = 8,
+ k_EUGCQuery_RankedByTotalVotesAsc = 9,
+ k_EUGCQuery_RankedByVotesUp = 10,
+ k_EUGCQuery_RankedByTextSearch = 11,
+};
+
+
+const uint32 kNumUGCResultsPerPage = 50;
+
+// Details for a single published file/UGC
+struct SteamUGCDetails_t
+{
+ PublishedFileId_t m_nPublishedFileId;
+ EResult m_eResult; // The result of the operation.
+ EWorkshopFileType m_eFileType; // Type of the file
+ AppId_t m_nCreatorAppID; // ID of the app that created this file.
+ AppId_t m_nConsumerAppID; // ID of the app that will consume this file.
+ char m_rgchTitle[k_cchPublishedDocumentTitleMax]; // title of document
+ char m_rgchDescription[k_cchPublishedDocumentDescriptionMax]; // description of document
+ 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
+ uint32 m_rtimeAddedToUserList; // time when the user added the published file to their list (not always applicable)
+ ERemoteStoragePublishedFileVisibility m_eVisibility; // visibility
+ bool m_bBanned; // whether the file was banned
+ bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
+ bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer
+ char m_rgchTags[k_cchTagListMax]; // comma separated list of all tags associated with this file
+ // file/url information
+ UGCHandle_t m_hFile; // The handle of the primary file
+ UGCHandle_t m_hPreviewFile; // The handle of the preview file
+ char m_pchFileName[k_cchFilenameMax]; // The cloud filename of the primary file
+ int32 m_nFileSize; // Size of the primary file
+ int32 m_nPreviewFileSize; // Size of the preview file
+ char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website)
+ // voting information
+ uint32 m_unVotesUp; // number of votes up
+ uint32 m_unVotesDown; // number of votes down
+ float m_flScore; // calculated score
+};
+
+//-----------------------------------------------------------------------------
+// Purpose: Steam UGC support API
+//-----------------------------------------------------------------------------
+class ISteamUGC
+{
+public:
+
+ // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
+ virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
+
+ // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
+ virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
+
+ // Send the query to Steam
+ virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
+
+ // Retrieve an individual result after receiving the callback for querying UGC
+ virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0;
+
+ // Release the request to free up memory, after retrieving results
+ virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
+
+ // Options to set for querying UGC
+ virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
+ virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
+ virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0;
+ virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0;
+ virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0;
+
+ // Options only for querying user UGC
+ virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0;
+
+ // Options only for querying all UGC
+ virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0;
+ virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0;
+ virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0;
+
+ // Request full details for one piece of UGC
+ virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0;
+
+};
+
+#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION002"
+
+//-----------------------------------------------------------------------------
+// Purpose: Callback for querying UGC
+//-----------------------------------------------------------------------------
+struct SteamUGCQueryCompleted_t
+{
+ enum { k_iCallback = k_iClientUGCCallbacks + 1 };
+ UGCQueryHandle_t m_handle;
+ EResult m_eResult;
+ uint32 m_unNumResultsReturned;
+ uint32 m_unTotalMatchingResults;
+ bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
+};
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Callback for requesting details on one piece of UGC
+//-----------------------------------------------------------------------------
+struct SteamUGCRequestUGCDetailsResult_t
+{
+ enum { k_iCallback = k_iClientUGCCallbacks + 2 };
+ SteamUGCDetails_t m_details;
+ bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
+};
+
+
+//-----------------------------------------------------------------------------
+// Purpose: k_iClientUGCCallbacks + 3 to k_iClientUGCCallbacks + 6 in use
+//-----------------------------------------------------------------------------
+
+
+#pragma pack( pop )
+
+#endif // ISTEAMUGC_H
diff --git a/sp/src/public/steam/isteamuser.h b/sp/src/public/steam/isteamuser.h
index 5470acb7..a670849e 100644
--- a/sp/src/public/steam/isteamuser.h
+++ b/sp/src/public/steam/isteamuser.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright (c) 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to user account information in Steam
//
@@ -97,7 +97,7 @@ public:
// levels of speech are detected.
// nUncompressedVoiceDesiredSampleRate is necessary to know the number of bytes to return in pcbUncompressed - can be set to 0 if you don't need uncompressed (the usual case)
// If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate
- virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) = 0;
+ virtual EVoiceResult GetAvailableVoice( uint32 *pcbCompressed, uint32 *pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate ) = 0;
// Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to
// DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format.
@@ -158,6 +158,14 @@ public:
// retrieve a finished ticket
virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
+ // Trading Card badges data access
+ // if you only have one set of cards, the series will be 1
+ // the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1)
+ virtual int GetGameBadgeLevel( int nSeries, bool bFoil ) = 0;
+
+ // gets the Steam Level of the user, as shown on their profile
+ virtual int GetPlayerSteamLevel() = 0;
+
#ifdef _PS3
// Initiates PS3 Logon request using just PSN ticket.
//
@@ -197,7 +205,7 @@ public:
};
-#define STEAMUSER_INTERFACE_VERSION "SteamUser016"
+#define STEAMUSER_INTERFACE_VERSION "SteamUser017"
// callbacks
@@ -287,6 +295,7 @@ struct ValidateAuthTicketResponse_t
enum { k_iCallback = k_iSteamUserCallbacks + 43 };
CSteamID m_SteamID;
EAuthSessionResponse m_eAuthSessionResponse;
+ CSteamID m_OwnerSteamID; // different from m_SteamID if borrowed
};
diff --git a/sp/src/public/steam/isteamutils.h b/sp/src/public/steam/isteamutils.h
index b40677c5..7f8d6bf0 100644
--- a/sp/src/public/steam/isteamutils.h
+++ b/sp/src/public/steam/isteamutils.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to utility functions in Steam
//
@@ -149,17 +149,20 @@ public:
#endif
// Activates the Big Picture text input dialog which only supports gamepad input
- virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax ) = 0;
+ virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0;
// Returns previously entered text & length
virtual uint32 GetEnteredGamepadTextLength() = 0;
- virtual bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) = 0;
+ virtual bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) = 0;
// returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases
virtual const char *GetSteamUILanguage() = 0;
+
+ // returns true if Steam itself is running in VR mode
+ virtual bool IsSteamRunningInVR() = 0;
};
-#define STEAMUTILS_INTERFACE_VERSION "SteamUtils006"
+#define STEAMUTILS_INTERFACE_VERSION "SteamUtils007"
// callbacks
diff --git a/sp/src/public/steam/matchmakingtypes.h b/sp/src/public/steam/matchmakingtypes.h
index fae9fe7a..df6a2d4f 100644
--- a/sp/src/public/steam/matchmakingtypes.h
+++ b/sp/src/public/steam/matchmakingtypes.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============
//
// Purpose:
//
@@ -32,6 +32,11 @@ const int k_cbMaxGameServerName = 64;
const int k_cbMaxGameServerTags = 128;
const int k_cbMaxGameServerGameData = 2048;
+/// Store key/value pair used in matchmaking queries.
+///
+/// Actually, the name Key/Value is a bit misleading. The "key" is better
+/// understood as "filter operation code" and the "value" is the operand to this
+/// filter operation. The meaning of the operand depends upon the filter.
struct MatchMakingKeyValuePair_t
{
MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; }
diff --git a/sp/src/public/steam/steam_api.h b/sp/src/public/steam/steam_api.h
index 4f4f5a52..d1ebd2c2 100644
--- a/sp/src/public/steam/steam_api.h
+++ b/sp/src/public/steam/steam_api.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose:
//
@@ -20,9 +20,12 @@
#include "isteamnetworking.h"
#include "isteamremotestorage.h"
#include "isteamscreenshots.h"
+#include "isteammusic.h"
#include "isteamhttp.h"
#include "isteamunifiedmessages.h"
#include "isteamcontroller.h"
+#include "isteamugc.h"
+#include "isteamapplist.h"
#if defined( _PS3 )
#include "steamps3params.h"
@@ -59,10 +62,10 @@
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// S_API void SteamAPI_Init(); (see below)
-S_API void SteamAPI_Shutdown();
+S_API void S_CALLTYPE SteamAPI_Shutdown();
// checks if a local Steam client is running
-S_API bool SteamAPI_IsSteamRunning();
+S_API bool S_CALLTYPE SteamAPI_IsSteamRunning();
// Detects if your executable was launched through the Steam client, and restarts your game through
// the client if necessary. The Steam client will be started if it is not running.
@@ -75,14 +78,14 @@ S_API bool SteamAPI_IsSteamRunning();
//
// NOTE: This function should be used only if you are using CEG or not using Steam's DRM. Once applied
// to your executable, Steam's DRM will handle restarting through Steam if necessary.
-S_API bool SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
+S_API bool S_CALLTYPE SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
// crash dump recording functions
-S_API void SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
-S_API void SteamAPI_SetMiniDumpComment( const char *pchMsg );
+S_API void S_CALLTYPE SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
+S_API void S_CALLTYPE SteamAPI_SetMiniDumpComment( const char *pchMsg );
// interface pointers, configured by SteamAPI_Init()
-S_API ISteamClient *SteamClient();
+S_API ISteamClient *S_CALLTYPE SteamClient();
//
@@ -96,29 +99,33 @@ S_API ISteamClient *SteamClient();
// functions below to get at the Steam interfaces.
//
#ifdef VERSION_SAFE_STEAM_API_INTERFACES
-S_API bool SteamAPI_InitSafe();
+S_API bool S_CALLTYPE SteamAPI_InitSafe();
#else
#if defined(_PS3)
-S_API bool SteamAPI_Init( SteamPS3Params_t *pParams );
+S_API bool S_CALLTYPE SteamAPI_Init( SteamPS3Params_t *pParams );
#else
-S_API bool SteamAPI_Init();
+S_API bool S_CALLTYPE SteamAPI_Init();
#endif
-S_API ISteamUser *SteamUser();
-S_API ISteamFriends *SteamFriends();
-S_API ISteamUtils *SteamUtils();
-S_API ISteamMatchmaking *SteamMatchmaking();
-S_API ISteamUserStats *SteamUserStats();
-S_API ISteamApps *SteamApps();
-S_API ISteamNetworking *SteamNetworking();
-S_API ISteamMatchmakingServers *SteamMatchmakingServers();
-S_API ISteamRemoteStorage *SteamRemoteStorage();
-S_API ISteamScreenshots *SteamScreenshots();
-S_API ISteamHTTP *SteamHTTP();
-S_API ISteamUnifiedMessages *SteamUnifiedMessages();
+S_API ISteamUser *S_CALLTYPE SteamUser();
+S_API ISteamFriends *S_CALLTYPE SteamFriends();
+S_API ISteamUtils *S_CALLTYPE SteamUtils();
+S_API ISteamMatchmaking *S_CALLTYPE SteamMatchmaking();
+S_API ISteamUserStats *S_CALLTYPE SteamUserStats();
+S_API ISteamApps *S_CALLTYPE SteamApps();
+S_API ISteamNetworking *S_CALLTYPE SteamNetworking();
+S_API ISteamMatchmakingServers *S_CALLTYPE SteamMatchmakingServers();
+S_API ISteamRemoteStorage *S_CALLTYPE SteamRemoteStorage();
+S_API ISteamScreenshots *S_CALLTYPE SteamScreenshots();
+S_API ISteamHTTP *S_CALLTYPE SteamHTTP();
+S_API ISteamUnifiedMessages *S_CALLTYPE SteamUnifiedMessages();
+S_API ISteamController *S_CALLTYPE SteamController();
+S_API ISteamUGC *S_CALLTYPE SteamUGC();
+S_API ISteamAppList *S_CALLTYPE SteamAppList();
+S_API ISteamMusic *S_CALLTYPE SteamMusic();
#ifdef _PS3
-S_API ISteamPS3OverlayRender * SteamPS3OverlayRender();
+S_API ISteamPS3OverlayRender *S_CALLTYPE SteamPS3OverlayRender();
#endif
#endif // VERSION_SAFE_STEAM_API_INTERFACES
@@ -132,16 +139,16 @@ S_API ISteamPS3OverlayRender * SteamPS3OverlayRender();
// to as many functions/objects as are registered to it
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
-S_API void SteamAPI_RunCallbacks();
+S_API void S_CALLTYPE SteamAPI_RunCallbacks();
// functions used by the utility CCallback objects to receive callbacks
-S_API void SteamAPI_RegisterCallback( class CCallbackBase *pCallback, int iCallback );
-S_API void SteamAPI_UnregisterCallback( class CCallbackBase *pCallback );
+S_API void S_CALLTYPE SteamAPI_RegisterCallback( class CCallbackBase *pCallback, int iCallback );
+S_API void S_CALLTYPE SteamAPI_UnregisterCallback( class CCallbackBase *pCallback );
// functions used by the utility CCallResult objects to receive async call results
-S_API void SteamAPI_RegisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
-S_API void SteamAPI_UnregisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
+S_API void S_CALLTYPE SteamAPI_RegisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
+S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
//-----------------------------------------------------------------------------
@@ -397,6 +404,10 @@ public:
ISteamScreenshots* SteamScreenshots() { return m_pSteamScreenshots; }
ISteamHTTP* SteamHTTP() { return m_pSteamHTTP; }
ISteamUnifiedMessages* SteamUnifiedMessages() { return m_pSteamUnifiedMessages; }
+ ISteamController* SteamController() { return m_pController; }
+ ISteamUGC* SteamUGC() { return m_pSteamUGC; }
+ ISteamAppList* SteamAppList() { return m_pSteamAppList; }
+ ISteamMusic* SteamMusic() { return m_pSteamMusic; }
#ifdef _PS3
ISteamPS3OverlayRender* SteamPS3OverlayRender() { return m_pSteamPS3OverlayRender; }
#endif
@@ -415,6 +426,9 @@ private:
ISteamHTTP *m_pSteamHTTP;
ISteamUnifiedMessages*m_pSteamUnifiedMessages;
ISteamController *m_pController;
+ ISteamUGC *m_pSteamUGC;
+ ISteamAppList *m_pSteamAppList;
+ ISteamMusic *m_pSteamMusic;
#ifdef _PS3
ISteamPS3OverlayRender *m_pSteamPS3OverlayRender;
#endif
@@ -438,7 +452,11 @@ inline void CSteamAPIContext::Clear()
m_pSteamRemoteStorage = NULL;
m_pSteamHTTP = NULL;
m_pSteamScreenshots = NULL;
+ m_pSteamMusic = NULL;
m_pSteamUnifiedMessages = NULL;
+ m_pController = NULL;
+ m_pSteamUGC = NULL;
+ m_pSteamAppList = NULL;
#ifdef _PS3
m_pSteamPS3OverlayRender = NULL;
#endif
@@ -501,6 +519,24 @@ inline bool CSteamAPIContext::Init()
if ( !m_pSteamUnifiedMessages )
return false;
+ m_pController = SteamClient()->GetISteamController( hSteamUser, hSteamPipe, STEAMCONTROLLER_INTERFACE_VERSION );
+ if ( !m_pController )
+ return false;
+
+ m_pSteamUGC = SteamClient()->GetISteamUGC( hSteamUser, hSteamPipe, STEAMUGC_INTERFACE_VERSION );
+ if ( !m_pSteamUGC )
+ return false;
+
+ m_pSteamAppList = SteamClient()->GetISteamAppList( hSteamUser, hSteamPipe, STEAMAPPLIST_INTERFACE_VERSION );
+ if ( !m_pSteamAppList )
+ return false;
+
+ m_pSteamMusic = SteamClient()->GetISteamMusic( hSteamUser, hSteamPipe, STEAMMUSIC_INTERFACE_VERSION );
+ if ( !m_pSteamMusic )
+ {
+ return false;
+ }
+
#ifdef _PS3
m_pSteamPS3OverlayRender = SteamClient()->GetISteamPS3OverlayRender();
#endif
@@ -512,13 +548,13 @@ inline bool CSteamAPIContext::Init()
#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 )
+// 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 );
+S_API void S_CALLTYPE SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback );
+S_API void S_CALLTYPE SteamAPI_SetBreakpadAppID( uint32 unAppID );
#endif
#endif // STEAM_API_H
diff --git a/sp/src/public/steam/steamclientpublic.h b/sp/src/public/steam/steamclientpublic.h
index b1292673..62eddb76 100644
--- a/sp/src/public/steam/steamclientpublic.h
+++ b/sp/src/public/steam/steamclientpublic.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============
//
// Purpose:
//
@@ -20,7 +20,7 @@
// interface layer, no need to include anything about the implementation.
#include "steamtypes.h"
-
+#include "steamuniverse.h"
// General result codes
enum EResult
@@ -102,7 +102,13 @@ enum EResult
k_EResultNoMatchingURL = 75,
k_EResultBadResponse = 76, // parse failure, missing field, etc.
k_EResultRequirePasswordReEntry = 77, // The user cannot complete the action until they re-enter their password
- k_EResultValueOutOfRange = 78 // the value entered is outside the acceptable range
+ k_EResultValueOutOfRange = 78, // the value entered is outside the acceptable range
+ k_EResultUnexpectedError = 79, // something happened that we didn't expect to ever happen
+ k_EResultDisabled = 80, // The requested service has been configured to be unavailable
+ k_EResultInvalidCEGSubmission = 81, // The set of files submitted to the CEG server are not valid !
+ k_EResultRestrictedDevice = 82, // The device being used is not allowed to perform this action
+ k_EResultRegionLocked = 83, // The action could not be complete because it is region restricted
+ k_EResultRateLimitExceeded = 84, // Temporary rate limit exceeded, try again later, different from k_EResultLimitExceeded which may be permanent
};
// Error codes for use with the voice functions
@@ -178,18 +184,6 @@ typedef enum
} EUserHasLicenseForAppResult;
-// Steam universes. Each universe is a self-contained Steam instance.
-enum EUniverse
-{
- k_EUniverseInvalid = 0,
- k_EUniversePublic = 1,
- k_EUniverseBeta = 2,
- k_EUniverseInternal = 3,
- k_EUniverseDev = 4,
- // k_EUniverseRC = 5, // no such universe anymore
- k_EUniverseMax
-};
-
// Steam account types
enum EAccountType
{
@@ -227,15 +221,21 @@ enum EAppReleaseState
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
-enum EAppOwernshipFlags
+enum EAppOwnershipFlags
{
- k_EAppOwernshipFlags_None = 0, // unknown
- k_EAppOwernshipFlags_OwnsLicense = 1, // owns license for this game
- k_EAppOwernshipFlags_FreeLicense = 2, // not paid for game
- k_EAppOwernshipFlags_RegionRestricted = 4, // owns app, but not allowed to play in current region
- k_EAppOwernshipFlags_LowViolence = 8, // only low violence version
- k_EAppOwernshipFlags_InvalidPlatform = 16, // app not supported on current platform
- k_EAppOwernshipFlags_DeviceLicense = 32, // license was granted by authorized local device
+ k_EAppOwnershipFlags_None = 0x000, // unknown
+ k_EAppOwnershipFlags_OwnsLicense = 0x001, // owns license for this game
+ k_EAppOwnershipFlags_FreeLicense = 0x002, // not paid for game
+ k_EAppOwnershipFlags_RegionRestricted = 0x004, // owns app, but not allowed to play in current region
+ k_EAppOwnershipFlags_LowViolence = 0x008, // only low violence version
+ k_EAppOwnershipFlags_InvalidPlatform = 0x010, // app not supported on current platform
+ k_EAppOwnershipFlags_SharedLicense = 0x020, // license was granted by authorized local device
+ k_EAppOwnershipFlags_FreeWeekend = 0x040, // owned by a free weekend licenses
+ k_EAppOwnershipFlags_LicenseLocked = 0x080, // shared license is locked (in use) by other user
+ k_EAppOwnershipFlags_LicensePending = 0x100, // owns app, but transaction is still pending. Can't install or play
+ k_EAppOwnershipFlags_LicenseExpired = 0x200, // doesn't own app anymore since license expired
+ k_EAppOwnershipFlags_LicensePermanent = 0x400, // permanent license, not borrowed, or guest or freeweekend etc
+ k_EAppOwnershipFlags_LicenseRecurring = 0x800, // Recurring license, user is charged periodically
};
@@ -253,7 +253,8 @@ enum EAppType
k_EAppType_DLC = 0x020, // down loadable content
k_EAppType_Guide = 0x040, // game guide, PDF etc
k_EAppType_Driver = 0x080, // hardware driver updater (ATI, Razor etc)
-
+ k_EAppType_Config = 0x100, // hidden app used to config Steam features (backpack, sales, etc)
+
k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only
k_EAppType_DepotOnly = 0x80000000, // placeholder since depots and apps share the same namespace
};
@@ -449,6 +450,12 @@ public:
{
SetFromUint64( ulSteamID );
}
+#ifdef INT64_DIFFERENT_FROM_INT64_T
+ CSteamID( uint64_t ulSteamID )
+ {
+ SetFromUint64( (uint64)ulSteamID );
+ }
+#endif
//-----------------------------------------------------------------------------
@@ -463,7 +470,7 @@ public:
m_steamid.m_comp.m_EUniverse = eUniverse;
m_steamid.m_comp.m_EAccountType = eAccountType;
- if ( eAccountType == k_EAccountTypeClan )
+ if ( eAccountType == k_EAccountTypeClan || eAccountType == k_EAccountTypeGameServer )
{
m_steamid.m_comp.m_unAccountInstance = 0;
}
@@ -720,6 +727,9 @@ public:
const char * Render() const; // renders this steam ID to string
static const char * Render( uint64 ulSteamID ); // static method to render a uint64 representation of a steam ID to a string
+ const char * RenderLink() const; // renders this steam ID to an admin console link string
+ static const char * RenderLink( uint64 ulSteamID ); // static method to render a uint64 representation of a steam ID to a string
+
void SetFromString( const char *pchSteamID, EUniverse eDefaultUniverse );
// SetFromString allows many partially-correct strings, constraining how
// we might be able to change things in the future.
@@ -845,6 +855,12 @@ public:
{
m_ulGameID = ulGameID;
}
+#ifdef INT64_DIFFERENT_FROM_INT64_T
+ CGameID( uint64_t ulGameID )
+ {
+ m_ulGameID = (uint64)ulGameID;
+ }
+#endif
explicit CGameID( int32 nAppID )
{
diff --git a/sp/src/public/steam/steamcontrollerpublic.h b/sp/src/public/steam/steamcontrollerpublic.h
new file mode 100644
index 00000000..04493332
--- /dev/null
+++ b/sp/src/public/steam/steamcontrollerpublic.h
@@ -0,0 +1,76 @@
+//========= Copyright � 1996-2013, Valve LLC, All rights reserved. ============
+//
+// Purpose: Controller related public types/constants
+//
+//=============================================================================
+
+#ifndef STEAMCONTROLLERPUBLIC_H
+#define STEAMCONTROLLERPUBLIC_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#if defined( STEAM ) || defined( ISTEAMCONTROLLER_H )
+// This file should only be included by the Steam build or directly from
+// isteamcontroller.h.
+#include "steamtypes.h"
+#else
+// Otherwise, we assume it's a firmware build, which doesn't deal with all the
+// things that exist in steamtypes.h, and hardcode the typedefs we need.
+typedef unsigned int uint32;
+typedef unsigned __int64 uint64;
+#endif
+
+#pragma pack(1)
+
+// Safe to add new bitfields at the end of this list for new buttons/actions,
+// but never re-use or re-number an existing flag as old client code will be
+// confused.
+#define STEAM_RIGHT_TRIGGER_MASK 0x0000000000000001l
+#define STEAM_LEFT_TRIGGER_MASK 0x0000000000000002l
+#define STEAM_RIGHT_BUMPER_MASK 0x0000000000000004l
+#define STEAM_LEFT_BUMPER_MASK 0x0000000000000008l
+#define STEAM_BUTTON_0_MASK 0x0000000000000010l
+#define STEAM_BUTTON_1_MASK 0x0000000000000020l
+#define STEAM_BUTTON_2_MASK 0x0000000000000040l
+#define STEAM_BUTTON_3_MASK 0x0000000000000080l
+#define STEAM_TOUCH_0_MASK 0x0000000000000100l
+#define STEAM_TOUCH_1_MASK 0x0000000000000200l
+#define STEAM_TOUCH_2_MASK 0x0000000000000400l
+#define STEAM_TOUCH_3_MASK 0x0000000000000800l
+#define STEAM_BUTTON_MENU_MASK 0x0000000000001000l
+#define STEAM_BUTTON_STEAM_MASK 0x0000000000002000l
+#define STEAM_BUTTON_ESCAPE_MASK 0x0000000000004000l
+#define STEAM_BUTTON_BACK_LEFT_MASK 0x0000000000008000l
+#define STEAM_BUTTON_BACK_RIGHT_MASK 0x0000000000010000l
+#define STEAM_BUTTON_LEFTPAD_CLICKED_MASK 0x0000000000020000l
+#define STEAM_BUTTON_RIGHTPAD_CLICKED_MASK 0x0000000000040000l
+#define STEAM_LEFTPAD_FINGERDOWN_MASK 0x0000000000080000l
+#define STEAM_RIGHTPAD_FINGERDOWN_MASK 0x0000000000100000l
+
+// Only add fields to the end of this struct, or if you need to change it in a larger
+// way add a new message id and new struct completely so as to not break old clients.
+typedef struct
+{
+ // If packet num matches that on your prior call, then the controller state hasn't been changed since
+ // your last call and there is no need to process it
+ uint32 unPacketNum;
+
+ // bit flags for each of the buttons
+ uint64 ulButtons;
+
+ // Left pad coordinates
+ short sLeftPadX;
+ short sLeftPadY;
+
+ // Right pad coordinates
+ short sRightPadX;
+ short sRightPadY;
+
+} SteamControllerState_t;
+
+#pragma pack()
+
+#endif // STEAMCONTROLLERPUBLIC_H
+
diff --git a/sp/src/public/steam/steamhttpenums.h b/sp/src/public/steam/steamhttpenums.h
index c75b59cd..9ac2eeaf 100644
--- a/sp/src/public/steam/steamhttpenums.h
+++ b/sp/src/public/steam/steamhttpenums.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//====== Copyright � 1996-2010, Valve Corporation, All rights reserved. =======
//
// Purpose: HTTP related enums, stuff that is shared by both clients and servers, and our
// UI projects goes here.
@@ -20,13 +20,13 @@ enum EHTTPMethod
k_EHTTPMethodGET,
k_EHTTPMethodHEAD,
k_EHTTPMethodPOST,
+ k_EHTTPMethodPUT,
+ k_EHTTPMethodDELETE,
+ k_EHTTPMethodOPTIONS,
// The remaining HTTP methods are not yet supported, per rfc2616 section 5.1.1 only GET and HEAD are required for
// a compliant general purpose server. We'll likely add more as we find uses for them.
- // k_EHTTPMethodOPTIONS,
- k_EHTTPMethodPUT,
- k_EHTTPMethodDELETE,
// k_EHTTPMethodTRACE,
// k_EHTTPMethodCONNECT
};
diff --git a/sp/src/public/steam/steamtypes.h b/sp/src/public/steam/steamtypes.h
index 5525c925..b26990da 100644
--- a/sp/src/public/steam/steamtypes.h
+++ b/sp/src/public/steam/steamtypes.h
@@ -1,4 +1,4 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
+//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============
//
// Purpose:
//
@@ -10,6 +10,8 @@
#pragma once
#endif
+#define S_CALLTYPE __cdecl
+
// Steam-specific types. Defined here so this header file can be included in other code bases.
#ifndef WCHARTYPES_H
typedef unsigned char uint8;
@@ -43,6 +45,9 @@ typedef unsigned __int32 uint32;
typedef __int64 int64;
typedef unsigned __int64 uint64;
+typedef int64 lint64;
+typedef uint64 ulint64;
+
#ifdef X64BITS
typedef __int64 intp; // intp is an integer that can accomodate a pointer
typedef unsigned __int64 uintp; // (ie, sizeof(intp) >= sizeof(int) && sizeof(intp) >= sizeof(void *)
@@ -59,6 +64,16 @@ typedef int int32;
typedef unsigned int uint32;
typedef long long int64;
typedef unsigned long long uint64;
+
+// [u]int64 are actually defined as 'long long' and gcc 64-bit
+// doesn't automatically consider them the same as 'long int'.
+// Changing the types for [u]int64 is complicated by
+// there being many definitions, so we just
+// define a 'long int' here and use it in places that would
+// otherwise confuse the compiler.
+typedef long int lint64;
+typedef unsigned long int ulint64;
+
#ifdef X64BITS
typedef long long intp;
typedef unsigned long long uintp;
diff --git a/sp/src/public/steam/steamuniverse.h b/sp/src/public/steam/steamuniverse.h
new file mode 100644
index 00000000..dd384dcc
--- /dev/null
+++ b/sp/src/public/steam/steamuniverse.h
@@ -0,0 +1,27 @@
+//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef STEAMUNIVERSE_H
+#define STEAMUNIVERSE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+// Steam universes. Each universe is a self-contained Steam instance.
+enum EUniverse
+{
+ k_EUniverseInvalid = 0,
+ k_EUniversePublic = 1,
+ k_EUniverseBeta = 2,
+ k_EUniverseInternal = 3,
+ k_EUniverseDev = 4,
+ // k_EUniverseRC = 5, // no such universe anymore
+ k_EUniverseMax
+};
+
+
+#endif // STEAMUNIVERSE_H
diff --git a/sp/src/public/steam/steamvr.h b/sp/src/public/steam/steamvr.h
new file mode 100644
index 00000000..68a932dd
--- /dev/null
+++ b/sp/src/public/steam/steamvr.h
@@ -0,0 +1,242 @@
+#pragma once
+
+#include <stdint.h>
+
+namespace vr
+{
+
+#if defined(__linux__) || defined(__APPLE__)
+ // The 32-bit version of gcc has the alignment requirement for uint64 and double set to
+ // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
+ // The 64-bit version of gcc has the alignment requirement for these types set to
+ // 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
+ // The 64-bit structure packing has to match the 32-bit structure packing for each platform.
+#pragma pack( push, 4 )
+#else
+#pragma pack( push, 8 )
+#endif
+
+
+// right-handed system
+// +y is up
+// +x is to the right
+// -z is going away from you
+// Distance unit is meters
+struct HmdMatrix34_t
+{
+ float m[3][4];
+};
+
+struct HmdMatrix44_t
+{
+ float m[4][4];
+};
+
+
+/** Used to return the post-distortion UVs for each color channel.
+* UVs range from 0 to 1 with 0,0 in the upper left corner of the
+* source render target. The 0,0 to 1,1 range covers a single eye. */
+struct DistortionCoordinates_t
+{
+ float rfRed[2];
+ float rfGreen[2];
+ float rfBlue[2];
+};
+
+
+enum Hmd_Eye
+{
+ Eye_Left = 0,
+ Eye_Right = 1
+};
+
+enum GraphicsAPIConvention
+{
+ API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane
+ API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane
+};
+
+enum HmdTrackingResult
+{
+ TrackingResult_Uninitialized = 1,
+
+ TrackingResult_Calibrating_InProgress = 100,
+ TrackingResult_Calibrating_OutOfRange = 101,
+
+ TrackingResult_Running_OK = 200,
+ TrackingResult_Running_OutOfRange = 201,
+};
+
+class IHmd
+{
+public:
+
+
+ // ------------------------------------
+ // Display Methods
+ // ------------------------------------
+
+ /** Size and position that the window needs to be on the VR display. */
+ virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
+
+ /** Suggested size for the intermediate render target that the distortion pulls from. */
+ virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
+
+ /** Gets the viewport in the frame buffer to draw the output of the distortion into */
+ virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
+
+ /** The projection matrix for the specified eye */
+ virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0;
+
+ /** The components necessary to build your own projection matrix in case your
+ * application is doing something fancy like infinite Z */
+ virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0;
+
+ /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
+ * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */
+ virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0;
+
+ /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head
+ * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection.
+ * Normally View and Eye^-1 will be multiplied together and treated as View in your application.
+ */
+ virtual HmdMatrix34_t GetHeadFromEyePose( Hmd_Eye eEye ) = 0;
+
+ /** For use in simple VR apps, this method returns the concatenation of the
+ * tracking pose and the eye matrix to get a full view matrix for each eye.
+ * This is ( GetEyeMatrix() ) * (GetWorldFromHeadPose() ^ -1 ) */
+ virtual bool GetViewMatrix( float fSecondsFromNow, HmdMatrix44_t *pMatLeftView, HmdMatrix44_t *pMatRightView, HmdTrackingResult *peResult ) = 0;
+
+ /** [D3D9 Only]
+ * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such
+ * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error.
+ */
+ virtual int32_t GetD3D9AdapterIndex() = 0;
+
+ /** [D3D10/11 Only]
+ * Returns the adapter index and output index that the user should pass into EnumAdapters adn EnumOutputs
+ * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1.
+ */
+ virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0;
+
+ // ------------------------------------
+ // Tracking Methods
+ // ------------------------------------
+
+ /** The pose that the tracker thinks that the HMD will be in at the specified
+ * number of seconds into the future. Pass 0 to get the current state.
+ *
+ * This is roughly analogous to the inverse of the view matrix in most applications, though
+ * many games will need to do some additional rotation or translation on top of the rotation
+ * and translation provided by the head pose.
+ *
+ * If this function returns true the pose has been populated with a pose that can be used by the application.
+ * Check peResult for details about the pose, including messages that should be displayed to the user.
+ */
+ virtual bool GetTrackerFromHeadPose( float fPredictedSecondsFromNow, HmdMatrix34_t *pmPose, HmdTrackingResult *peResult ) = 0;
+
+ /** Passes back the pose matrix from the last successful call to GetWorldFromHeadPose(). Returns true if that matrix is
+ * valid (because there has been a previous successful pose.) */
+ virtual bool GetLastTrackerFromHeadPose( HmdMatrix34_t *pmPose ) = 0;
+
+ /** Returns true if the tracker for this HMD will drift the Yaw component of its pose over time regardless of
+ * actual head motion. This is true for gyro-based trackers with no ground truth. */
+ virtual bool WillDriftInYaw() = 0;
+
+ /** Sets the zero pose for the tracker coordinate system. After this call all WorldFromHead poses will be relative
+ * to the pose whenever this was called. The new zero coordinate system will not change the fact that the Y axis is
+ * up in the real world, so the next pose returned from GetWorldFromHeadPose after a call to ZeroTracker may not be
+ * exactly an identity matrix. */
+ virtual void ZeroTracker() = 0;
+
+ /** Returns the zero pose for the tracker coordinate system. If the tracker has never had a valid pose, this
+ * will be an identity matrix. */
+ virtual HmdMatrix34_t GetTrackerZeroPose() = 0;
+
+ // ------------------------------------
+ // Administrative methods
+ // ------------------------------------
+
+ /** The ID of the driver this HMD uses as a UTF-8 string. Returns the length of the ID in bytes. If
+ * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes
+ * will be enough to fit any ID. */
+ virtual uint32_t GetDriverId( char *pchBuffer, uint32_t unBufferLen ) = 0;
+
+ /** The ID of this display within its driver this HMD uses as a UTF-8 string. Returns the length of the ID in bytes. If
+ * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes
+ * will be enough to fit any ID. */
+ virtual uint32_t GetDisplayId( char *pchBuffer, uint32_t unBufferLen ) = 0;
+};
+
+static const char * const IHmd_Version = "IHmd_004";
+
+/** error codes returned by Vr_Init */
+enum HmdError
+{
+ HmdError_None = 0,
+
+ HmdError_Init_InstallationNotFound = 100,
+ HmdError_Init_InstallationCorrupt = 101,
+ HmdError_Init_VRClientDLLNotFound = 102,
+ HmdError_Init_FileNotFound = 103,
+ HmdError_Init_FactoryNotFound = 104,
+ HmdError_Init_InterfaceNotFound = 105,
+ HmdError_Init_InvalidInterface = 106,
+ HmdError_Init_UserConfigDirectoryInvalid = 107,
+ HmdError_Init_HmdNotFound = 108,
+ HmdError_Init_NotInitialized = 109,
+
+ HmdError_Driver_Failed = 200,
+
+ HmdError_IPC_ServerInitFailed = 300,
+ HmdError_IPC_ConnectFailed = 301,
+ HmdError_IPC_SharedStateInitFailed = 302,
+
+};
+
+
+// figure out how to import from the VR API dll
+#if defined(_WIN32)
+
+#ifdef VR_API_EXPORT
+#define VR_INTERFACE extern "C" __declspec( dllexport )
+#else
+#define VR_INTERFACE extern "C" __declspec( dllimport )
+#endif
+
+#elif defined(GNUC) || defined(COMPILER_GCC)
+
+#ifdef VR_API_EXPORT
+#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
+#else
+#define VR_INTERFACE extern "C"
+#endif
+
+#else
+#error "Unsupported Platform."
+#endif
+
+
+
+
+/** Finds the active installation of the VR API and initializes it. The priority for figuring
+* out where to load vrclient from are:
+* 1. The convar "VR_OVERRIDE", which should contain an absolute path to the root of
+* an vr API directory.
+* 2. The pchVROverride argument. This should be an absolute path or a path relative to
+* the current executable.
+* 3. The path "./vr" relative to the current executable's path.
+*
+* Each of these paths are to the "root" of the VR API install. That's the directory with
+* the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself.
+*/
+VR_INTERFACE IHmd *VR_Init( HmdError *peError );
+
+/** unloads vrclient.dll. Any interface pointers from the interface are
+* invalid after this point */
+VR_INTERFACE void VR_Shutdown( );
+
+#pragma pack( pop )
+
+
+} \ No newline at end of file