change steam_api headers
This commit is contained in:
parent
3005268bab
commit
b7cd3625c8
@ -25,7 +25,7 @@ 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 GetAppName( AppId_t nAppID, OUT_STRING() 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
|
||||
|
@ -10,7 +10,7 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
const int k_cubAppProofOfPurchaseKeyMax = 64; // max bytes of a legacy cd key we support
|
||||
const int k_cubAppProofOfPurchaseKeyMax = 240; // max supported length of a legacy cd key
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -50,7 +50,7 @@ public:
|
||||
virtual void InstallDLC( AppId_t nAppID ) = 0;
|
||||
virtual void UninstallDLC( AppId_t nAppID ) = 0;
|
||||
|
||||
// Request cd-key for yourself or owned DLC. If you are interested in this
|
||||
// Request legacy cd-key for yourself or owned DLC. If you are interested in this
|
||||
// data then make sure you provide us with a list of valid keys to be distributed
|
||||
// to users when they purchase the game, before the game ships.
|
||||
// You'll receive an AppProofOfPurchaseKeyResponse_t callback when
|
||||
@ -78,13 +78,18 @@ public:
|
||||
|
||||
// return the buildid of this app, may change at any time based on backend updates to the game
|
||||
virtual int GetAppBuildId() = 0;
|
||||
#ifdef _PS3
|
||||
// Result returned in a RegisterActivationCodeResponse_t callresult
|
||||
virtual SteamAPICall_t RegisterActivationCode( const char *pchActivationCode ) = 0;
|
||||
#endif
|
||||
|
||||
// Request all proof of purchase keys for the calling appid and asociated DLC.
|
||||
// A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with
|
||||
// appropriate appid values, ending with a final callback where the m_nAppId
|
||||
// member is k_uAppIdInvalid (zero).
|
||||
virtual void RequestAllProofOfPurchaseKeys() = 0;
|
||||
|
||||
CALL_RESULT( FileDetailsResult_t )
|
||||
virtual SteamAPICall_t GetFileDetails( const char* pszFileName ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION007"
|
||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
@ -127,16 +132,6 @@ struct RegisterActivationCodeResponse_t
|
||||
uint32 m_unPackageRegistered; // package that was registered. Only set on success
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to RegisterActivationCode()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AppProofOfPurchaseKeyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 13 };
|
||||
EResult m_eResult;
|
||||
uint32 m_nAppID;
|
||||
char m_rgchKey[ k_cubAppProofOfPurchaseKeyMax ];
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains executes a steam url with query parameters
|
||||
@ -150,5 +145,32 @@ struct NewLaunchQueryParameters_t
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys
|
||||
// for supporting third-party CD keys, or other proof-of-purchase systems.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AppProofOfPurchaseKeyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 21 };
|
||||
EResult m_eResult;
|
||||
uint32 m_nAppID;
|
||||
uint32 m_cchKeyLength;
|
||||
char m_rgchKey[k_cubAppProofOfPurchaseKeyMax];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to GetFileDetails
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FileDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 23 };
|
||||
EResult m_eResult;
|
||||
uint64 m_ulFileSize; // original file size in bytes
|
||||
uint8 m_FileSHA[20]; // original file SHA1 hash
|
||||
uint32 m_unFlags; //
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
#endif // ISTEAMAPPS_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//====== Copyright 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: a private, but well versioned, interface to get at critical bits
|
||||
// of a steam3 appticket - consumed by the simple drm wrapper to let it
|
||||
|
@ -21,6 +21,14 @@
|
||||
#define REFERENCE(arg) ((void)arg)
|
||||
#endif
|
||||
|
||||
#if ( defined(STEAM_API_EXPORTS) || defined(STEAM_API_NODLL) ) && !defined(API_GEN)
|
||||
#define STEAM_PRIVATE_API( ... ) __VA_ARGS__
|
||||
#elif defined(STEAM_API_EXPORTS) && defined(API_GEN)
|
||||
#define STEAM_PRIVATE_API( ... )
|
||||
#else
|
||||
#define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public:
|
||||
#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.
|
||||
@ -69,7 +77,6 @@ typedef int32 HSteamUser;
|
||||
#define __cdecl
|
||||
#endif
|
||||
extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *);
|
||||
extern "C" typedef void( *SteamAPI_PostAPIResultInProcess_t )(SteamAPICall_t callHandle, void *, uint32 unCallbackSize, int iCallbackNum);
|
||||
extern "C" typedef uint32 ( *SteamAPI_CheckCallbackRegistered_t )( int iCallbackNum );
|
||||
#if defined( __SNC__ )
|
||||
#pragma diag_suppress=1700 // warning 1700: class "%s" has virtual functions but non-virtual destructor
|
||||
@ -93,13 +100,13 @@ class ISteamMusicRemote;
|
||||
class ISteamGameServerStats;
|
||||
class ISteamPS3OverlayRender;
|
||||
class ISteamHTTP;
|
||||
class ISteamUnifiedMessages;
|
||||
class ISteamController;
|
||||
class ISteamUGC;
|
||||
class ISteamAppList;
|
||||
class ISteamHTMLSurface;
|
||||
class ISteamInventory;
|
||||
class ISteamVideo;
|
||||
class ISteamParentalSettings;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface to creating a new steam instance, or to
|
||||
@ -107,26 +114,32 @@ class ISteamVideo;
|
||||
// different process or is local.
|
||||
//
|
||||
// For most scenarios this is all handled automatically via SteamAPI_Init().
|
||||
// You'll only need to use these interfaces if you have a more complex versioning scheme,
|
||||
// where you want to get different versions of the same interface in different dll's in your project.
|
||||
// You'll only need these APIs if you have a more complex versioning scheme,
|
||||
// or if you want to implement a multiplexed gameserver where a single process
|
||||
// is handling multiple games at once with independent gameserver SteamIDs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamClient
|
||||
{
|
||||
public:
|
||||
// Creates a communication pipe to the Steam client
|
||||
// Creates a communication pipe to the Steam client.
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual HSteamPipe CreateSteamPipe() = 0;
|
||||
|
||||
// Releases a previously created communications pipe
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0;
|
||||
|
||||
// connects to an existing global user, failing if none exists
|
||||
// used by the game to coordinate with the steamUI
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0;
|
||||
|
||||
// used by game servers, create a steam user that won't be shared with anyone else
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0;
|
||||
|
||||
// removes an allocated user
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0;
|
||||
|
||||
// retrieves the ISteamUser interface associated with the handle
|
||||
@ -172,9 +185,8 @@ public:
|
||||
// user screenshots
|
||||
virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// this needs to be called every frame to process matchmaking results
|
||||
// redundant if you're already calling SteamAPI_RunCallbacks()
|
||||
virtual void RunFrame() = 0;
|
||||
// Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead.
|
||||
STEAM_PRIVATE_API( virtual void RunFrame() = 0; )
|
||||
|
||||
// returns the number of IPC calls made since the last time this function was called
|
||||
// Used for perf debugging so you can understand how many IPC calls your game makes per frame
|
||||
@ -185,21 +197,17 @@ public:
|
||||
// API warning handling
|
||||
// 'int' is the severity; 0 for msg, 1 for warning
|
||||
// 'const char *' is the text of the message
|
||||
// callbacks will occur directly after the API function is called that generated the warning or message
|
||||
// callbacks will occur directly after the API function is called that generated the warning or message.
|
||||
virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0;
|
||||
|
||||
// Trigger global shutdown for the DLL
|
||||
virtual bool BShutdownIfAllPipesClosed() = 0;
|
||||
|
||||
#ifdef _PS3
|
||||
virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0;
|
||||
#endif
|
||||
|
||||
// Expose HTTP interface
|
||||
virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Exposes the ISteamUnifiedMessages interface
|
||||
virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
// Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption.
|
||||
STEAM_PRIVATE_API( virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; )
|
||||
|
||||
// Exposes the ISteamController interface
|
||||
virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
@ -220,15 +228,18 @@ public:
|
||||
virtual ISteamHTMLSurface *GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0;
|
||||
|
||||
// Helper functions for internal Steam usage
|
||||
virtual void Set_SteamAPI_CPostAPIResultInProcess( SteamAPI_PostAPIResultInProcess_t func ) = 0;
|
||||
virtual void Remove_SteamAPI_CPostAPIResultInProcess( SteamAPI_PostAPIResultInProcess_t func ) = 0;
|
||||
virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0;
|
||||
STEAM_PRIVATE_API( virtual void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
|
||||
STEAM_PRIVATE_API( virtual void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
|
||||
STEAM_PRIVATE_API( virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0; )
|
||||
|
||||
// inventory
|
||||
virtual ISteamInventory *GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Video
|
||||
virtual ISteamVideo *GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Parental controls
|
||||
virtual ISteamParentalSettings *GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -280,11 +291,15 @@ enum { k_iSteamAppListCallbacks = 3900 };
|
||||
enum { k_iSteamMusicCallbacks = 4000 };
|
||||
enum { k_iSteamMusicRemoteCallbacks = 4100 };
|
||||
enum { k_iClientVRCallbacks = 4200 };
|
||||
enum { k_iClientReservedCallbacks = 4300 };
|
||||
enum { k_iSteamReservedCallbacks = 4400 };
|
||||
enum { k_iClientGameNotificationCallbacks = 4300 };
|
||||
enum { k_iSteamGameNotificationCallbacks = 4400 };
|
||||
enum { k_iSteamHTMLSurfaceCallbacks = 4500 };
|
||||
enum { k_iClientVideoCallbacks = 4600 };
|
||||
enum { k_iClientInventoryCallbacks = 4700 };
|
||||
enum { k_iClientBluetoothManagerCallbacks = 4800 };
|
||||
enum { k_iClientSharedConnectionCallbacks = 4900 };
|
||||
enum { k_ISteamParentalSettingsCallbacks = 5000 };
|
||||
enum { k_iClientShaderCallbacks = 5100 };
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The CALLBACK macros are for client side callback logging enabled with
|
||||
@ -292,14 +307,11 @@ enum { k_iClientInventoryCallbacks = 4700 };
|
||||
// Do not change any of these.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct SteamCallback_t
|
||||
{
|
||||
public:
|
||||
SteamCallback_t() {}
|
||||
};
|
||||
#ifdef STEAM_CALLBACK_INSPECTION_ENABLED
|
||||
|
||||
#define DEFINE_CALLBACK( callbackname, callbackid ) \
|
||||
struct callbackname : SteamCallback_t { \
|
||||
struct callbackname { \
|
||||
typedef callbackname SteamCallback_t; \
|
||||
enum { k_iCallback = callbackid }; \
|
||||
static callbackname *GetNullPointer() { return 0; } \
|
||||
static const char *GetCallbackName() { return #callbackname; } \
|
||||
@ -337,6 +349,17 @@ struct callbackname : SteamCallback_t { \
|
||||
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; } \
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
#define DEFINE_CALLBACK( callbackname, callbackid ) struct callbackname { typedef callbackname SteamCallback_t; enum { k_iCallback = callbackid };
|
||||
#define CALLBACK_MEMBER( varidx, vartype, varname ) public: vartype varname ;
|
||||
#define CALLBACK_ARRAY( varidx, vartype, varname, varcount ) public: vartype varname [ varcount ];
|
||||
#define END_CALLBACK_INTERNAL_BEGIN( numvars )
|
||||
#define END_CALLBACK_INTERNAL_SWITCH( varidx )
|
||||
#define END_CALLBACK_INTERNAL_END() };
|
||||
#define END_DEFINE_CALLBACK_0() };
|
||||
|
||||
#endif
|
||||
|
||||
#define END_DEFINE_CALLBACK_1() \
|
||||
END_CALLBACK_INTERNAL_BEGIN( 1 ) \
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_ANALOG_ACTIONS 16
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS 32
|
||||
#define STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS 128
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_ORIGINS 8
|
||||
|
||||
@ -42,7 +42,13 @@ enum EControllerSource
|
||||
k_EControllerSource_Switch,
|
||||
k_EControllerSource_LeftTrigger,
|
||||
k_EControllerSource_RightTrigger,
|
||||
k_EControllerSource_Gyro
|
||||
k_EControllerSource_Gyro,
|
||||
k_EControllerSource_CenterTrackpad, // PS4
|
||||
k_EControllerSource_RightJoystick, // Traditional Controllers
|
||||
k_EControllerSource_DPad, // Traditional Controllers
|
||||
k_EControllerSource_Key, // Keyboards with scan codes
|
||||
k_EControllerSource_Mouse, // Traditional mouse
|
||||
k_EControllerSource_Count
|
||||
};
|
||||
|
||||
enum EControllerSourceMode
|
||||
@ -54,14 +60,21 @@ enum EControllerSourceMode
|
||||
k_EControllerSourceMode_AbsoluteMouse,
|
||||
k_EControllerSourceMode_RelativeMouse,
|
||||
k_EControllerSourceMode_JoystickMove,
|
||||
k_EControllerSourceMode_JoystickMouse,
|
||||
k_EControllerSourceMode_JoystickCamera,
|
||||
k_EControllerSourceMode_ScrollWheel,
|
||||
k_EControllerSourceMode_Trigger,
|
||||
k_EControllerSourceMode_TouchMenu
|
||||
k_EControllerSourceMode_TouchMenu,
|
||||
k_EControllerSourceMode_MouseJoystick,
|
||||
k_EControllerSourceMode_MouseRegion,
|
||||
k_EControllerSourceMode_RadialMenu,
|
||||
k_EControllerSourceMode_SingleButton,
|
||||
k_EControllerSourceMode_Switches
|
||||
};
|
||||
|
||||
enum EControllerActionOrigin
|
||||
{
|
||||
// Steam Controller
|
||||
k_EControllerActionOrigin_None,
|
||||
k_EControllerActionOrigin_A,
|
||||
k_EControllerActionOrigin_B,
|
||||
@ -102,9 +115,190 @@ enum EControllerActionOrigin
|
||||
k_EControllerActionOrigin_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_Gyro_Roll,
|
||||
|
||||
// PS4 Dual Shock
|
||||
k_EControllerActionOrigin_PS4_X,
|
||||
k_EControllerActionOrigin_PS4_Circle,
|
||||
k_EControllerActionOrigin_PS4_Triangle,
|
||||
k_EControllerActionOrigin_PS4_Square,
|
||||
k_EControllerActionOrigin_PS4_LeftBumper,
|
||||
k_EControllerActionOrigin_PS4_RightBumper,
|
||||
k_EControllerActionOrigin_PS4_Options, //Start
|
||||
k_EControllerActionOrigin_PS4_Share, //Back
|
||||
k_EControllerActionOrigin_PS4_LeftPad_Touch,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_Swipe,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_Click,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_RightPad_Touch,
|
||||
k_EControllerActionOrigin_PS4_RightPad_Swipe,
|
||||
k_EControllerActionOrigin_PS4_RightPad_Click,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_Touch,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_Swipe,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_Click,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_PS4_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_PS4_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_PS4_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_Move,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_Click,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_RightStick_Move,
|
||||
k_EControllerActionOrigin_PS4_RightStick_Click,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_DPad_North,
|
||||
k_EControllerActionOrigin_PS4_DPad_South,
|
||||
k_EControllerActionOrigin_PS4_DPad_West,
|
||||
k_EControllerActionOrigin_PS4_DPad_East,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Move,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Pitch,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Roll,
|
||||
|
||||
// XBox One
|
||||
k_EControllerActionOrigin_XBoxOne_A,
|
||||
k_EControllerActionOrigin_XBoxOne_B,
|
||||
k_EControllerActionOrigin_XBoxOne_X,
|
||||
k_EControllerActionOrigin_XBoxOne_Y,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftBumper,
|
||||
k_EControllerActionOrigin_XBoxOne_RightBumper,
|
||||
k_EControllerActionOrigin_XBoxOne_Menu, //Start
|
||||
k_EControllerActionOrigin_XBoxOne_View, //Back
|
||||
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBoxOne_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_Move,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_Move,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_North,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_South,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_West,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_East,
|
||||
|
||||
// XBox 360
|
||||
k_EControllerActionOrigin_XBox360_A,
|
||||
k_EControllerActionOrigin_XBox360_B,
|
||||
k_EControllerActionOrigin_XBox360_X,
|
||||
k_EControllerActionOrigin_XBox360_Y,
|
||||
k_EControllerActionOrigin_XBox360_LeftBumper,
|
||||
k_EControllerActionOrigin_XBox360_RightBumper,
|
||||
k_EControllerActionOrigin_XBox360_Start, //Start
|
||||
k_EControllerActionOrigin_XBox360_Back, //Back
|
||||
k_EControllerActionOrigin_XBox360_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBox360_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_XBox360_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBox360_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_Move,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_Click,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_Move,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_Click,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBox360_DPad_North,
|
||||
k_EControllerActionOrigin_XBox360_DPad_South,
|
||||
k_EControllerActionOrigin_XBox360_DPad_West,
|
||||
k_EControllerActionOrigin_XBox360_DPad_East,
|
||||
|
||||
// SteamController V2
|
||||
k_EControllerActionOrigin_SteamV2_A,
|
||||
k_EControllerActionOrigin_SteamV2_B,
|
||||
k_EControllerActionOrigin_SteamV2_X,
|
||||
k_EControllerActionOrigin_SteamV2_Y,
|
||||
k_EControllerActionOrigin_SteamV2_LeftBumper,
|
||||
k_EControllerActionOrigin_SteamV2_RightBumper,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip_Upper,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip_Upper,
|
||||
k_EControllerActionOrigin_SteamV2_LeftBumper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightBumper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip_Upper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip_Upper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_Start,
|
||||
k_EControllerActionOrigin_SteamV2_Back,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Touch,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Swipe,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Click,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadNorth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadSouth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadWest,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadEast,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Touch,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Swipe,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Click,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadNorth,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadSouth,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadWest,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadEast,
|
||||
k_EControllerActionOrigin_SteamV2_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_SteamV2_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_SteamV2_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_SteamV2_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_Move,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_Click,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Move,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Pitch,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Roll,
|
||||
|
||||
k_EControllerActionOrigin_Count
|
||||
};
|
||||
|
||||
enum ESteamControllerLEDFlag
|
||||
{
|
||||
k_ESteamControllerLEDFlag_SetColor,
|
||||
k_ESteamControllerLEDFlag_RestoreUserDefault
|
||||
};
|
||||
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
k_ESteamInputType_SteamController,
|
||||
k_ESteamInputType_XBox360Controller,
|
||||
k_ESteamInputType_XBoxOneController,
|
||||
k_ESteamInputType_GenericXInput,
|
||||
k_ESteamInputType_PS4Controller,
|
||||
};
|
||||
|
||||
// ControllerHandle_t is used to refer to a specific controller.
|
||||
// This handle will consistently identify a controller, even if it is disconnected and re-connected
|
||||
typedef uint64 ControllerHandle_t;
|
||||
@ -139,6 +333,25 @@ struct ControllerDigitalActionData_t
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct ControllerMotionData_t
|
||||
{
|
||||
// Sensor-fused absolute rotation; will drift in heading
|
||||
float rotQuatX;
|
||||
float rotQuatY;
|
||||
float rotQuatZ;
|
||||
float rotQuatW;
|
||||
|
||||
// Positional acceleration
|
||||
float posAccelX;
|
||||
float posAccelY;
|
||||
float posAccelZ;
|
||||
|
||||
// Angular velocity
|
||||
float rotVelX;
|
||||
float rotVelY;
|
||||
float rotVelZ;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
@ -153,8 +366,9 @@ public:
|
||||
virtual bool Init() = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
||||
// Pump callback/callresult events
|
||||
// Note: SteamAPI_RunCallbacks will do this for you, so you should never need to call this directly.
|
||||
// Synchronize API state with the latest Steam Controller inputs available. This
|
||||
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
|
||||
// possible latency, you call this directly before reading controller state.
|
||||
virtual void RunFrame() = 0;
|
||||
|
||||
// Enumerate currently connected controllers
|
||||
@ -175,6 +389,12 @@ public:
|
||||
// your state loops, instead of trying to place it in all of your state transitions.
|
||||
virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0;
|
||||
virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
virtual void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) = 0;
|
||||
virtual int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t *handlesOut ) = 0;
|
||||
|
||||
|
||||
// ACTIONS
|
||||
// Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
@ -196,15 +416,46 @@ public:
|
||||
// Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles
|
||||
virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut ) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0;
|
||||
|
||||
// Trigger a haptic pulse on a controller
|
||||
virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
|
||||
|
||||
// Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times.
|
||||
// nFlags is currently unused and reserved for future use.
|
||||
virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
|
||||
|
||||
// Tigger a vibration event on supported controllers.
|
||||
virtual void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0;
|
||||
|
||||
// Set the controller LED color on supported controllers.
|
||||
virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
|
||||
|
||||
// Returns the associated gamepad index for the specified controller, if emulating a gamepad
|
||||
virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0;
|
||||
|
||||
// Returns the associated controller handle for the specified emulated gamepad
|
||||
virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0;
|
||||
|
||||
// Returns raw motion data from the specified controller
|
||||
virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
// Attempt to display origins of given action in the controller HUD, for the currently active action set
|
||||
// Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode
|
||||
virtual bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition ) = 0;
|
||||
virtual bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified origin
|
||||
virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular origin
|
||||
virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Returns the input type for a particular handle
|
||||
virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController003"
|
||||
#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController006"
|
||||
|
||||
#endif // ISTEAMCONTROLLER_H
|
||||
|
@ -26,7 +26,7 @@ enum EFriendRelationship
|
||||
k_EFriendRelationshipRequestInitiator = 4,
|
||||
k_EFriendRelationshipIgnored = 5, // this is stored; the user has explicit blocked this other user from comments/chat/etc
|
||||
k_EFriendRelationshipIgnoredFriend = 6,
|
||||
k_EFriendRelationshipSuggested = 7,
|
||||
k_EFriendRelationshipSuggested_DEPRECATED = 7, // was used by the original implementation of the facebook linking feature, but now unused.
|
||||
|
||||
// keep this updated
|
||||
k_EFriendRelationshipMax = 8,
|
||||
@ -80,7 +80,8 @@ enum EFriendFlags
|
||||
k_EFriendFlagRequestingInfo = 0x100,
|
||||
k_EFriendFlagIgnored = 0x200,
|
||||
k_EFriendFlagIgnoredFriend = 0x400,
|
||||
k_EFriendFlagSuggested = 0x800,
|
||||
// k_EFriendFlagSuggested = 0x800, // not used
|
||||
k_EFriendFlagChatMember = 0x1000,
|
||||
k_EFriendFlagAll = 0xFFFF,
|
||||
};
|
||||
|
||||
@ -175,6 +176,7 @@ public:
|
||||
//
|
||||
// If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted
|
||||
// to change the name back, in addition to the SetPersonaNameResponse_t callback.
|
||||
CALL_RESULT( SetPersonaNameResponse_t )
|
||||
virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0;
|
||||
|
||||
// gets the status of the current user
|
||||
@ -307,6 +309,7 @@ public:
|
||||
// you can only ask about clans that a user is a member of
|
||||
// note that this won't download avatars automatically; if you get an officer,
|
||||
// and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar
|
||||
CALL_RESULT( ClanOfficerListResponse_t )
|
||||
virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0;
|
||||
|
||||
// iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed
|
||||
@ -324,7 +327,7 @@ public:
|
||||
|
||||
// Rich Presence data is automatically shared between friends who are in the same game
|
||||
// Each user has a set of Key/Value pairs
|
||||
// Up to 20 different keys can be set
|
||||
// Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength
|
||||
// There are two magic keys:
|
||||
// "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list
|
||||
// "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game
|
||||
@ -358,6 +361,7 @@ public:
|
||||
// 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
|
||||
CALL_RESULT( JoinClanChatRoomCompletionResult_t )
|
||||
virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0;
|
||||
virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0;
|
||||
virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0;
|
||||
@ -378,9 +382,15 @@ public:
|
||||
virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
|
||||
|
||||
// following apis
|
||||
CALL_RESULT( FriendsGetFollowerCount_t )
|
||||
virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0;
|
||||
CALL_RESULT( FriendsIsFollowing_t )
|
||||
virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0;
|
||||
CALL_RESULT( FriendsEnumerateFollowingList_t )
|
||||
virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0;
|
||||
|
||||
virtual bool IsClanPublic( CSteamID steamIDClan ) = 0;
|
||||
virtual bool IsClanOfficialGameGroup( CSteamID steamIDClan ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends015"
|
||||
|
@ -193,7 +193,8 @@ public:
|
||||
// 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;
|
||||
virtual SteamAPICall_t GetServerReputation( ) = 0;
|
||||
CALL_RESULT( GSReputation_t )
|
||||
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
|
||||
@ -240,9 +241,11 @@ public:
|
||||
virtual void ForceHeartbeat() = 0;
|
||||
|
||||
// associate this game server with this clan for the purposes of computing player compat
|
||||
CALL_RESULT( AssociateWithClanResult_t )
|
||||
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
|
||||
CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
|
||||
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
|
||||
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//====== Copyright © Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface for game servers to steam stats and achievements
|
||||
//
|
||||
@ -23,6 +23,7 @@ public:
|
||||
// if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail
|
||||
// these stats will only be auto-updated for clients playing on the server. For other
|
||||
// users you'll need to call RequestUserStats() again to refresh any data
|
||||
CALL_RESULT( GSStatsReceived_t )
|
||||
virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// requests stat information for a user, usable after a successful call to RequestUserStats()
|
||||
@ -47,6 +48,7 @@ public:
|
||||
// uploaded has been rejected, either because they broke constraints
|
||||
// or were out of date. In this case the server sends back updated values.
|
||||
// The stats should be re-iterated to keep in sync.
|
||||
CALL_RESULT( GSStatsStored_t )
|
||||
virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser ) = 0;
|
||||
};
|
||||
|
||||
|
@ -1,75 +0,0 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: interface to steam for game play statistics
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMGAMESTATS_H
|
||||
#define ISTEAMGAMESTATS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for recording game play sessions and details thereof
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameStats
|
||||
{
|
||||
public:
|
||||
virtual SteamAPICall_t GetNewSession( int8 nAccountType, uint64 ulAccountID, int32 nAppID, RTime32 rtTimeStarted ) = 0;
|
||||
virtual SteamAPICall_t EndSession( uint64 ulSessionID, RTime32 rtTimeEnded, int nReasonCode ) = 0;
|
||||
virtual EResult AddSessionAttributeInt( uint64 ulSessionID, const char* pstrName, int32 nData ) = 0;
|
||||
virtual EResult AddSessionAttributeString( uint64 ulSessionID, const char* pstrName, const char *pstrData ) = 0;
|
||||
virtual EResult AddSessionAttributeFloat( uint64 ulSessionID, const char* pstrName, float fData ) = 0;
|
||||
|
||||
virtual EResult AddNewRow( uint64 *pulRowID, uint64 ulSessionID, const char *pstrTableName ) = 0;
|
||||
virtual EResult CommitRow( uint64 ulRowID ) = 0;
|
||||
virtual EResult CommitOutstandingRows( uint64 ulSessionID ) = 0;
|
||||
virtual EResult AddRowAttributeInt( uint64 ulRowID, const char *pstrName, int32 nData ) = 0;
|
||||
virtual EResult AddRowAtributeString( uint64 ulRowID, const char *pstrName, const char *pstrData ) = 0;
|
||||
virtual EResult AddRowAttributeFloat( uint64 ulRowID, const char *pstrName, float fData ) = 0;
|
||||
|
||||
virtual EResult AddSessionAttributeInt64( uint64 ulSessionID, const char *pstrName, int64 llData ) = 0;
|
||||
virtual EResult AddRowAttributeInt64( uint64 ulRowID, const char *pstrName, int64 llData ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMGAMESTATS_INTERFACE_VERSION "SteamGameStats001"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: nAccountType for GetNewSession
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EGameStatsAccountType
|
||||
{
|
||||
k_EGameStatsAccountType_Steam = 1, // ullAccountID is a 64-bit SteamID for a player
|
||||
k_EGameStatsAccountType_Xbox = 2, // ullAccountID is a 64-bit XUID
|
||||
k_EGameStatsAccountType_SteamGameServer = 3, // ullAccountID is a 64-bit SteamID for a game server
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback for GetNewSession() method
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameStatsSessionIssued_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameStatsCallbacks + 1 };
|
||||
|
||||
uint64 m_ulSessionID;
|
||||
EResult m_eResult;
|
||||
bool m_bCollectingAny;
|
||||
bool m_bCollectingDetails;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback for EndSession() method
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameStatsSessionClosed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameStatsCallbacks + 2 };
|
||||
|
||||
uint64 m_ulSessionID;
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
#endif // ISTEAMGAMESTATS_H
|
@ -33,6 +33,14 @@ public:
|
||||
// identify your client on web servers.
|
||||
// The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if
|
||||
// you do not require this functionality.
|
||||
//
|
||||
// YOU MUST HAVE IMPLEMENTED HANDLERS FOR HTML_BrowserReady_t, HTML_StartRequest_t,
|
||||
// HTML_JSAlert_t, HTML_JSConfirm_t, and HTML_FileOpenDialog_t! See the CALLBACKS
|
||||
// section of this interface (AllowStartRequest, etc) for more details. If you do
|
||||
// not implement these callback handlers, the browser may appear to hang instead of
|
||||
// navigating to new pages or triggering javascript popups.
|
||||
//
|
||||
CALL_RESULT( HTML_BrowserReady_t )
|
||||
virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0;
|
||||
|
||||
// Call this when you are done with a html surface, this lets us free the resources being used by it
|
||||
@ -169,6 +177,10 @@ public:
|
||||
// When background mode is disabled, any video or audio objects with that property will resume with ".play()".
|
||||
virtual void SetBackgroundMode( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) = 0;
|
||||
|
||||
// Scale the output display space by this factor, this is useful when displaying content on high dpi devices.
|
||||
// Specifies the ratio between physical and logical pixels.
|
||||
virtual void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling ) = 0;
|
||||
|
||||
// CALLBACKS
|
||||
//
|
||||
// These set of functions are used as responses to callback requests
|
||||
@ -185,10 +197,11 @@ public:
|
||||
virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0;
|
||||
|
||||
// You MUST call this in response to a HTML_FileOpenDialog_t callback
|
||||
IGNOREATTR()
|
||||
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_003"
|
||||
#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_004"
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
@ -438,6 +451,15 @@ CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
END_DEFINE_CALLBACK_1()
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser has restarted due to an internal failure, use this new handle value
|
||||
//-----------------------------------------------------------------------------
|
||||
DEFINE_CALLBACK( HTML_BrowserRestarted_t, k_iSteamHTMLSurfaceCallbacks + 27 )
|
||||
CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new browser handle after the restart
|
||||
CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls
|
||||
END_DEFINE_CALLBACK_2()
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//====== Copyright © 1996-2014 Valve Corporation, All rights reserved. =======
|
||||
//====== Copyright ? 1996-2014 Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to Steam Inventory
|
||||
//
|
||||
@ -27,7 +27,7 @@
|
||||
// and will not be transferred to another player or re-used for another item.
|
||||
typedef uint64 SteamItemInstanceID_t;
|
||||
|
||||
static const SteamItemInstanceID_t k_SteamItemInstanceIDInvalid = ~(SteamItemInstanceID_t)0;
|
||||
static const SteamItemInstanceID_t k_SteamItemInstanceIDInvalid = (SteamItemInstanceID_t)~0;
|
||||
|
||||
// Types of items in your game are identified by a 32-bit "item definition number".
|
||||
// Valid definition numbers are between 1 and 999999999; numbers less than or equal to
|
||||
@ -61,6 +61,8 @@ typedef int32 SteamInventoryResult_t;
|
||||
|
||||
static const SteamInventoryResult_t k_SteamInventoryResultInvalid = -1;
|
||||
|
||||
typedef uint64 SteamInventoryUpdateHandle_t;
|
||||
const SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xffffffffffffffffull;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Inventory query and manipulation API
|
||||
@ -94,6 +96,23 @@ public:
|
||||
OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray,
|
||||
uint32 *punOutItemsArraySize ) = 0;
|
||||
|
||||
// In combination with GetResultItems, you can use GetResultItemProperty to retrieve
|
||||
// dynamic string properties for a given item returned in the result set.
|
||||
//
|
||||
// Property names are always composed of ASCII letters, numbers, and/or underscores.
|
||||
//
|
||||
// Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
|
||||
// property names.
|
||||
//
|
||||
// If pchValueBuffer is NULL, *punValueBufferSize will contain the
|
||||
// suggested buffer size. Otherwise it will be the number of bytes actually copied
|
||||
// to pchValueBuffer. If the results do not fit in the given buffer, partial
|
||||
// results may be copied.
|
||||
virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle,
|
||||
uint32 unItemIndex,
|
||||
const char *pchPropertyName,
|
||||
OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Returns the server time at which the result was generated. Compare against
|
||||
// the value of IClientUtils::GetServerRealTime() to determine age.
|
||||
METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.)
|
||||
@ -175,10 +194,9 @@ public:
|
||||
//
|
||||
|
||||
// GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t
|
||||
// notification with a matching nCallbackContext parameter. This API is insecure, and could
|
||||
// be abused by hacked clients. It is, however, very useful as a development cheat or as
|
||||
// a means of prototyping item-related features for your game. The use of GenerateItems can
|
||||
// be restricted to certain item definitions or fully blocked via the Steamworks website.
|
||||
// notification with a matching nCallbackContext parameter. This API is only intended
|
||||
// for prototyping - it is only usable by Steam accounts that belong to the publisher group
|
||||
// for your game.
|
||||
// If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should
|
||||
// describe the quantity of each item to generate.
|
||||
virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
|
||||
@ -199,22 +217,18 @@ public:
|
||||
|
||||
// ConsumeItem() removes items from the inventory, permanently. They cannot be recovered.
|
||||
// Not for the faint of heart - if your game implements item removal at all, a high-friction
|
||||
// UI confirmation process is highly recommended. Similar to GenerateItems, punArrayQuantity
|
||||
// can be NULL or else an array of the same length as pArrayItems which describe the quantity
|
||||
// of each item to destroy. ConsumeItem can be restricted to certain item definitions or
|
||||
// fully blocked via the Steamworks website to minimize support/abuse issues such as the
|
||||
// clasic "my brother borrowed my laptop and deleted all of my rare items".
|
||||
// UI confirmation process is highly recommended.
|
||||
METHOD_DESC(ConsumeItem() removes items from the inventory permanently.)
|
||||
virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0;
|
||||
|
||||
// ExchangeItems() is an atomic combination of GenerateItems and DestroyItems. It can be
|
||||
// used to implement crafting recipes or transmutations, or items which unpack themselves
|
||||
// into other items. Like GenerateItems, this is a flexible and dangerous API which is
|
||||
// meant for rapid prototyping. You can configure restrictions on ExchangeItems via the
|
||||
// Steamworks website, such as limiting it to a whitelist of input/output combinations
|
||||
// corresponding to recipes.
|
||||
// (Note: although GenerateItems may be hard or impossible to use securely in your game,
|
||||
// ExchangeItems is perfectly reasonable to use once the whitelists are set accordingly.)
|
||||
// ExchangeItems() is an atomic combination of item generation and consumption.
|
||||
// It can be used to implement crafting recipes or transmutations, or items which unpack
|
||||
// themselves into other items (e.g., a chest).
|
||||
// Exchange recipes are defined in the ItemDef, and explicitly list the required item
|
||||
// types and resulting generated type.
|
||||
// Exchange recipes are evaluated atomically by the Inventory Service; if the supplied
|
||||
// components do not match the recipe, or do not contain sufficient quantity, the
|
||||
// exchange will fail.
|
||||
virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle,
|
||||
ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
|
||||
ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0;
|
||||
@ -230,21 +244,8 @@ public:
|
||||
// TIMED DROPS AND PLAYTIME CREDIT
|
||||
//
|
||||
|
||||
// Applications which use timed-drop mechanics should call SendItemDropHeartbeat() when
|
||||
// active gameplay begins, and at least once every two minutes afterwards. The backend
|
||||
// performs its own time calculations, so the precise timing of the heartbeat is not
|
||||
// critical as long as you send at least one heartbeat every two minutes. Calling the
|
||||
// function more often than that is not harmful, it will simply have no effect. Note:
|
||||
// players may be able to spoof this message by hacking their client, so you should not
|
||||
// attempt to use this as a mechanism to restrict playtime credits. It is simply meant
|
||||
// to distinguish between being in any kind of gameplay situation vs the main menu or
|
||||
// a pre-game launcher window. (If you are stingy with handing out playtime credit, it
|
||||
// will only encourage players to run bots or use mouse/kb event simulators.)
|
||||
//
|
||||
// Playtime credit accumulation can be capped on a daily or weekly basis through your
|
||||
// Steamworks configuration.
|
||||
//
|
||||
METHOD_DESC(Applications which use timed-drop mechanics should call SendItemDropHeartbeat() when active gameplay begins and at least once every two minutes afterwards.)
|
||||
// Deprecated. Calling this method is not required for proper playtime accounting.
|
||||
METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. )
|
||||
virtual void SendItemDropHeartbeat() = 0;
|
||||
|
||||
// Playtime credit must be consumed and turned into item drops by your game. Only item
|
||||
@ -253,23 +254,14 @@ public:
|
||||
// Your game should call TriggerItemDrop at an appropriate time for the user to receive
|
||||
// new items, such as between rounds or while the player is dead. Note that players who
|
||||
// hack their clients could modify the value of "dropListDefinition", so do not use it
|
||||
// to directly control rarity. It is primarily useful during testing and development,
|
||||
// where you may wish to perform experiments with different types of drops.
|
||||
// to directly control rarity.
|
||||
// See your Steamworks configuration to set playtime drop rates for individual itemdefs.
|
||||
// The client library will suppress too-frequent calls to this method.
|
||||
METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.)
|
||||
virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0;
|
||||
|
||||
|
||||
// IN-GAME TRADING
|
||||
//
|
||||
// TradeItems() implements limited in-game trading of items, if you prefer not to use
|
||||
// the overlay or an in-game web browser to perform Steam Trading through the website.
|
||||
// You should implement a UI where both players can see and agree to a trade, and then
|
||||
// each client should call TradeItems simultaneously (+/- 5 seconds) with matching
|
||||
// (but reversed) parameters. The result is the same as if both players performed a
|
||||
// Steam Trading transaction through the web. Each player will get an inventory result
|
||||
// confirming the removal or quantity changes of the items given away, and the new
|
||||
// item instance id numbers and quantities of the received items.
|
||||
// (Note: new item instance IDs are generated whenever an item changes ownership.)
|
||||
// Deprecated. This method is not supported.
|
||||
virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner,
|
||||
ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
|
||||
ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0;
|
||||
@ -306,12 +298,67 @@ public:
|
||||
// on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage).
|
||||
// Property names are always composed of ASCII letters, numbers, and/or underscores.
|
||||
// Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
|
||||
// property names.
|
||||
// property names. If pchValueBuffer is NULL, *punValueBufferSize will contain the
|
||||
// suggested buffer size. Otherwise it will be the number of bytes actually copied
|
||||
// to pchValueBuffer. If the results do not fit in the given buffer, partial
|
||||
// results may be copied.
|
||||
virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName,
|
||||
OUT_STRING_COUNT(punValueBufferSize) char *pchValueBuffer, uint32 *punValueBufferSize ) = 0;
|
||||
OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Request the list of "eligible" promo items that can be manually granted to the given
|
||||
// user. These are promo items of type "manual" that won't be granted automatically.
|
||||
// An example usage of this is an item that becomes available every week.
|
||||
CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t )
|
||||
virtual SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID ) = 0;
|
||||
|
||||
// After handling a SteamInventoryEligiblePromoItemDefIDs_t call result, use this
|
||||
// function to pull out the list of item definition ids that the user can be
|
||||
// manually granted via the AddPromoItems() call.
|
||||
virtual bool GetEligiblePromoItemDefinitionIDs(
|
||||
CSteamID steamID,
|
||||
OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
|
||||
DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
|
||||
|
||||
// Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t
|
||||
// will be posted if Steam was able to initialize the transaction.
|
||||
//
|
||||
// Once the purchase has been authorized and completed by the user, the callback SteamInventoryResultReady_t
|
||||
// will be posted.
|
||||
CALL_RESULT( SteamInventoryStartPurchaseResult_t )
|
||||
virtual SteamAPICall_t StartPurchase( ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
|
||||
|
||||
// Request current prices for all applicable item definitions
|
||||
CALL_RESULT( SteamInventoryRequestPricesResult_t )
|
||||
virtual SteamAPICall_t RequestPrices() = 0;
|
||||
|
||||
// Returns the number of items with prices. Need to call RequestPrices() first.
|
||||
virtual uint32 GetNumItemsWithPrices() = 0;
|
||||
|
||||
// Returns item definition ids and their prices in the user's local currency.
|
||||
// Need to call RequestPrices() first.
|
||||
virtual bool GetItemsWithPrices( ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs,
|
||||
ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pPrices,
|
||||
uint32 unArrayLength ) = 0;
|
||||
|
||||
// Retrieves the price for the item definition id
|
||||
// Returns false if there is no price stored for the item definition.
|
||||
virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pPrice ) = 0;
|
||||
|
||||
// Create a request to update properties on items
|
||||
virtual SteamInventoryUpdateHandle_t StartUpdateProperties() = 0;
|
||||
// Remove the property on the item
|
||||
virtual bool RemoveProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName ) = 0;
|
||||
// Accessor methods to set properties on items
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue ) = 0;
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, bool bValue ) = 0;
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, int64 nValue ) = 0;
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, float flValue ) = 0;
|
||||
// Submit the update request by handle
|
||||
virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V001"
|
||||
#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V002"
|
||||
|
||||
|
||||
// SteamInventoryResultReady_t callbacks are fired whenever asynchronous
|
||||
@ -348,6 +395,34 @@ struct SteamInventoryDefinitionUpdate_t
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 2 };
|
||||
};
|
||||
|
||||
// Returned
|
||||
struct SteamInventoryEligiblePromoItemDefIDs_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 3 };
|
||||
EResult m_result;
|
||||
CSteamID m_steamID;
|
||||
int m_numEligiblePromoItemDefs;
|
||||
bool m_bCachedData; // indicates that the data was retrieved from the cache and not the server
|
||||
};
|
||||
|
||||
// Triggered from StartPurchase call
|
||||
struct SteamInventoryStartPurchaseResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 4 };
|
||||
EResult m_result;
|
||||
uint64 m_ulOrderID;
|
||||
uint64 m_ulTransID;
|
||||
};
|
||||
|
||||
|
||||
// Triggered from RequestPrices
|
||||
struct SteamInventoryRequestPricesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 5 };
|
||||
EResult m_result;
|
||||
char m_rgchCurrency[4];
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
#error "This file isn't used any more"
|
||||
|
@ -103,6 +103,7 @@ public:
|
||||
}
|
||||
*/
|
||||
//
|
||||
CALL_RESULT( LobbyMatchList_t )
|
||||
virtual SteamAPICall_t RequestLobbyList() = 0;
|
||||
// filters for lobbies
|
||||
// this needs to be called before RequestLobbyList() to take effect
|
||||
@ -133,12 +134,14 @@ public:
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this point
|
||||
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
||||
CALL_RESULT( LobbyCreated_t )
|
||||
virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int cMaxMembers ) = 0;
|
||||
|
||||
// Joins an existing lobby
|
||||
// this is an asynchronous request
|
||||
// results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful
|
||||
// lobby metadata is available to use immediately on this call completing
|
||||
CALL_RESULT( LobbyEnter_t )
|
||||
virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// Leave a lobby; this will take effect immediately on the client side
|
||||
@ -253,6 +256,7 @@ public:
|
||||
// after completion, the local user will no longer be the owner
|
||||
virtual void CheckForPSNGameBootInvite( unsigned int iGameBootAttributes ) = 0;
|
||||
#endif
|
||||
CALL_BACK( LobbyChatUpdate_t )
|
||||
};
|
||||
#define STEAMMATCHMAKING_INTERFACE_VERSION "SteamMatchMaking009"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to steam managing network connections between game clients & servers
|
||||
//
|
||||
|
57
public/steam/isteamparentalsettings.h
Normal file
57
public/steam/isteamparentalsettings.h
Normal file
@ -0,0 +1,57 @@
|
||||
//====== Copyright ? 2013-, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: Interface to Steam parental settings (Family View)
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMPARENTALSETTINGS_H
|
||||
#define ISTEAMPARENTALSETTINGS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
// Feature types for parental settings
|
||||
enum EParentalFeature
|
||||
{
|
||||
k_EFeatureInvalid = 0,
|
||||
k_EFeatureStore = 1,
|
||||
k_EFeatureCommunity = 2,
|
||||
k_EFeatureProfile = 3,
|
||||
k_EFeatureFriends = 4,
|
||||
k_EFeatureNews = 5,
|
||||
k_EFeatureTrading = 6,
|
||||
k_EFeatureSettings = 7,
|
||||
k_EFeatureConsole = 8,
|
||||
k_EFeatureBrowser = 9,
|
||||
k_EFeatureParentalSetup = 10,
|
||||
k_EFeatureLibrary = 11,
|
||||
k_EFeatureTest = 12,
|
||||
k_EFeatureMax
|
||||
};
|
||||
|
||||
class ISteamParentalSettings
|
||||
{
|
||||
public:
|
||||
virtual bool BIsParentalLockEnabled() = 0;
|
||||
virtual bool BIsParentalLockLocked() = 0;
|
||||
|
||||
virtual bool BIsAppBlocked( AppId_t nAppID ) = 0;
|
||||
virtual bool BIsAppInBlockList( AppId_t nAppID ) = 0;
|
||||
|
||||
virtual bool BIsFeatureBlocked( EParentalFeature eFeature ) = 0;
|
||||
virtual bool BIsFeatureInBlockList( EParentalFeature eFeature ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMPARENTALSETTINGS_INTERFACE_VERSION "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for querying UGC
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamParentalSettingsChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_ISteamParentalSettingsCallbacks + 1 };
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMPARENTALSETTINGS_H
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//====== Copyright © 1996-2010, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface the game must provide Steam with on PS3 in order for the
|
||||
// Steam overlay to render.
|
||||
|
@ -1,4 +1,4 @@
|
||||
//====== Copyright <EFBFBD> 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//====== Copyright ? 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: public interface to user remote file storage in Steam
|
||||
//
|
||||
@ -57,12 +57,6 @@ const uint32 k_cchTagListMax = 1024 + 1;
|
||||
const uint32 k_cchFilenameMax = 260;
|
||||
const uint32 k_cchPublishedFileURLMax = 256;
|
||||
|
||||
// Ways to handle a synchronization conflict
|
||||
enum EResolveConflict
|
||||
{
|
||||
k_EResolveConflictKeepClient = 1, // The local version of each file will be used to overwrite the server version
|
||||
k_EResolveConflictKeepServer = 2, // The server version of each file will be used to overwrite the local version
|
||||
};
|
||||
|
||||
enum ERemoteStoragePlatform
|
||||
{
|
||||
@ -177,13 +171,16 @@ class ISteamRemoteStorage
|
||||
virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0;
|
||||
virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0;
|
||||
|
||||
CALL_RESULT( RemoteStorageFileWriteAsyncComplete_t )
|
||||
virtual SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData ) = 0;
|
||||
|
||||
CALL_RESULT( RemoteStorageFileReadAsyncComplete_t )
|
||||
virtual SteamAPICall_t FileReadAsync( const char *pchFile, uint32 nOffset, uint32 cubToRead ) = 0;
|
||||
virtual bool FileReadAsyncComplete( SteamAPICall_t hReadCall, void *pvBuffer, uint32 cubToRead ) = 0;
|
||||
|
||||
virtual bool FileForget( const char *pchFile ) = 0;
|
||||
virtual bool FileDelete( const char *pchFile ) = 0;
|
||||
CALL_RESULT( RemoteStorageFileShareResult_t )
|
||||
virtual SteamAPICall_t FileShare( const char *pchFile ) = 0;
|
||||
virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0;
|
||||
|
||||
@ -205,7 +202,7 @@ class ISteamRemoteStorage
|
||||
virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0;
|
||||
|
||||
// configuration management
|
||||
virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0;
|
||||
virtual bool GetQuota( uint64 *pnTotalBytes, uint64 *puAvailableBytes ) = 0;
|
||||
virtual bool IsCloudEnabledForAccount() = 0;
|
||||
virtual bool IsCloudEnabledForApp() = 0;
|
||||
virtual void SetCloudEnabledForApp( bool bEnabled ) = 0;
|
||||
@ -215,6 +212,7 @@ class ISteamRemoteStorage
|
||||
// Downloads a UGC file. A priority value of 0 will download the file immediately,
|
||||
// otherwise it will wait to download the file until all downloads with a lower priority
|
||||
// value are completed. Downloads with equal priority will occur simultaneously.
|
||||
CALL_RESULT( RemoteStorageDownloadUGCResult_t )
|
||||
virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 unPriority ) = 0;
|
||||
|
||||
// Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false
|
||||
@ -222,7 +220,7 @@ class ISteamRemoteStorage
|
||||
virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected ) = 0;
|
||||
|
||||
// Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result
|
||||
virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, OUT_STRUCT() CSteamID *pSteamIDOwner ) = 0;
|
||||
virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, OUT_STRING() char **ppchName, int32 *pnFileSizeInBytes, OUT_STRUCT() CSteamID *pSteamIDOwner ) = 0;
|
||||
|
||||
// After download, gets the content of the file.
|
||||
// Small files can be read all at once by calling this function with an offset of 0 and cubDataToRead equal to the size of the file.
|
||||
@ -255,6 +253,7 @@ class ISteamRemoteStorage
|
||||
#endif
|
||||
|
||||
// publishing UGC
|
||||
CALL_RESULT( RemoteStoragePublishFileProgress_t )
|
||||
virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0;
|
||||
virtual PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
virtual bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile ) = 0;
|
||||
@ -263,32 +262,48 @@ class ISteamRemoteStorage
|
||||
virtual bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription ) = 0;
|
||||
virtual bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0;
|
||||
virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0;
|
||||
CALL_RESULT( RemoteStorageUpdatePublishedFileResult_t )
|
||||
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 k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is.
|
||||
CALL_RESULT( RemoteStorageGetPublishedFileDetailsResult_t )
|
||||
virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0;
|
||||
CALL_RESULT( RemoteStorageDeletePublishedFileResult_t )
|
||||
virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
// enumerate the files that the current user published with this app
|
||||
CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
|
||||
virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0;
|
||||
CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
|
||||
virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
CALL_RESULT( RemoteStorageEnumerateUserSubscribedFilesResult_t )
|
||||
virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0;
|
||||
CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
|
||||
virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0;
|
||||
CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
|
||||
virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
CALL_RESULT( RemoteStorageUpdateUserPublishedItemVoteResult_t )
|
||||
virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0;
|
||||
CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
|
||||
virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
|
||||
virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0;
|
||||
CALL_RESULT( RemoteStoragePublishFileProgress_t )
|
||||
virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0;
|
||||
CALL_RESULT( RemoteStorageSetUserPublishedFileActionResult_t )
|
||||
virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0;
|
||||
CALL_RESULT( RemoteStorageEnumeratePublishedFilesByUserActionResult_t )
|
||||
virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0;
|
||||
// this method enumerates the public view of workshop files
|
||||
CALL_RESULT( RemoteStorageEnumerateWorkshopFilesResult_t )
|
||||
virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0;
|
||||
|
||||
CALL_RESULT( RemoteStorageDownloadUGCResult_t )
|
||||
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION013"
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION014"
|
||||
|
||||
|
||||
// callbacks
|
||||
@ -354,15 +369,6 @@ struct RemoteStorageAppSyncStatusCheck_t
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sent after a conflict resolution attempt.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageConflictResolution_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 6 };
|
||||
AppId_t m_nAppID;
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to FileShare()
|
||||
@ -645,7 +651,7 @@ 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
|
||||
uint64 m_ulUnused; // not used anymore
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
//
|
||||
@ -25,6 +25,16 @@ const int k_ScreenshotThumbWidth = 200;
|
||||
typedef uint32 ScreenshotHandle;
|
||||
#define INVALID_SCREENSHOT_HANDLE 0
|
||||
|
||||
enum EVRScreenshotType
|
||||
{
|
||||
k_EVRScreenshotType_None = 0,
|
||||
k_EVRScreenshotType_Mono = 1,
|
||||
k_EVRScreenshotType_Stereo = 2,
|
||||
k_EVRScreenshotType_MonoCubemap = 3,
|
||||
k_EVRScreenshotType_MonoPanorama = 4,
|
||||
k_EVRScreenshotType_StereoPanorama = 5
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for adding screenshots to the user's screenshot library
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -57,9 +67,19 @@ public:
|
||||
|
||||
// Tags a published file as being visible in the screenshot
|
||||
virtual bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID ) = 0;
|
||||
|
||||
// Returns true if the app has hooked the screenshot
|
||||
virtual bool IsScreenshotsHooked() = 0;
|
||||
|
||||
// Adds a VR screenshot to the user's screenshot library from disk in the supported type.
|
||||
// pchFilename should be the normal 2D image used in the library view
|
||||
// pchVRFilename should contain the image that matches the correct type
|
||||
// The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
||||
// JPEG, TGA, and PNG formats are supported.
|
||||
virtual ScreenshotHandle AddVRScreenshotToLibrary( EVRScreenshotType eType, const char *pchFilename, const char *pchVRFilename ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMSCREENSHOTS_INTERFACE_VERSION "STEAMSCREENSHOTS_INTERFACE_VERSION002"
|
||||
#define STEAMSCREENSHOTS_INTERFACE_VERSION "STEAMSCREENSHOTS_INTERFACE_VERSION003"
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
@ -92,5 +112,5 @@ struct ScreenshotRequested_t
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMSCREENSHOTS_H
|
||||
|
||||
|
@ -1,85 +0,0 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: interface to streaming launcher functions in Steam
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMSTREAMLAUNCHER_H
|
||||
#define ISTEAMSTREAMLAUNCHER_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamclient.h"
|
||||
|
||||
enum EStreamLauncherResult
|
||||
{
|
||||
k_EStreamLaunchResultSuccess = 0,
|
||||
k_EStreamLaunchResultFailure = 1, // Unknown streaming launch failure
|
||||
k_EStreamLaunchResultAlreadyStreaming = 2, // The UI is already streaming to a different application
|
||||
k_EStreamLaunchResultInvalidLauncher = 3, // The streaming launcher doesn't exist, or failed signature check
|
||||
k_EStreamLaunchResultNotReady = 4, // The UI isn't ready to go into streaming mode (Desktop UI login?)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to streaming launcher functions in Steam
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamStreamLauncher
|
||||
{
|
||||
public:
|
||||
// Switch Steam to Big Picture mode and optionally set a launcher to run all games
|
||||
virtual EStreamLauncherResult StartStreaming( const char *pchLauncher = NULL ) = 0;
|
||||
|
||||
// Switch Steam back to the original mode and clear the launcher
|
||||
virtual void StopStreaming() = 0;
|
||||
};
|
||||
|
||||
#define STEAMSTREAMLAUNCHER_INTERFACE_VERSION "SteamStreamLauncher001"
|
||||
|
||||
|
||||
// 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
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The big picture window is visible and ready for streaming
|
||||
//-----------------------------------------------------------------------------
|
||||
struct BigPictureStreamingResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 1 };
|
||||
bool m_bSuccess;
|
||||
void *m_hwnd;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The user requested that the application stop streaming
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StopStreamingRequest_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 2 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The big picture window is closed and no longer ready for streaming
|
||||
//-----------------------------------------------------------------------------
|
||||
struct BigPictureStreamingDone_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 3 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Steam is about to restart, continue streaming when it is available again
|
||||
//-----------------------------------------------------------------------------
|
||||
struct BigPictureStreamRestarting_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 4 };
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMSTREAMLAUNCHER_H
|
@ -92,6 +92,12 @@ enum EUGCQuery
|
||||
k_EUGCQuery_RankedByVotesUp = 10,
|
||||
k_EUGCQuery_RankedByTextSearch = 11,
|
||||
k_EUGCQuery_RankedByTotalUniqueSubscriptions = 12,
|
||||
k_EUGCQuery_RankedByPlaytimeTrend = 13,
|
||||
k_EUGCQuery_RankedByTotalPlaytime = 14,
|
||||
k_EUGCQuery_RankedByAveragePlaytimeTrend = 15,
|
||||
k_EUGCQuery_RankedByLifetimeAveragePlaytime = 16,
|
||||
k_EUGCQuery_RankedByPlaytimeSessionsTrend = 17,
|
||||
k_EUGCQuery_RankedByLifetimePlaytimeSessions = 18,
|
||||
};
|
||||
|
||||
enum EItemUpdateStatus
|
||||
@ -117,14 +123,36 @@ enum EItemState
|
||||
|
||||
enum EItemStatistic
|
||||
{
|
||||
k_EItemStatistic_NumSubscriptions = 0,
|
||||
k_EItemStatistic_NumFavorites = 1,
|
||||
k_EItemStatistic_NumFollowers = 2,
|
||||
k_EItemStatistic_NumUniqueSubscriptions = 3,
|
||||
k_EItemStatistic_NumUniqueFavorites = 4,
|
||||
k_EItemStatistic_NumUniqueFollowers = 5,
|
||||
k_EItemStatistic_NumUniqueWebsiteViews = 6,
|
||||
k_EItemStatistic_ReportScore = 7,
|
||||
k_EItemStatistic_NumSubscriptions = 0,
|
||||
k_EItemStatistic_NumFavorites = 1,
|
||||
k_EItemStatistic_NumFollowers = 2,
|
||||
k_EItemStatistic_NumUniqueSubscriptions = 3,
|
||||
k_EItemStatistic_NumUniqueFavorites = 4,
|
||||
k_EItemStatistic_NumUniqueFollowers = 5,
|
||||
k_EItemStatistic_NumUniqueWebsiteViews = 6,
|
||||
k_EItemStatistic_ReportScore = 7,
|
||||
k_EItemStatistic_NumSecondsPlayed = 8,
|
||||
k_EItemStatistic_NumPlaytimeSessions = 9,
|
||||
k_EItemStatistic_NumComments = 10,
|
||||
k_EItemStatistic_NumSecondsPlayedDuringTimePeriod = 11,
|
||||
k_EItemStatistic_NumPlaytimeSessionsDuringTimePeriod = 12,
|
||||
};
|
||||
|
||||
enum EItemPreviewType
|
||||
{
|
||||
k_EItemPreviewType_Image = 0, // standard image file expected (e.g. jpg, png, gif, etc.)
|
||||
k_EItemPreviewType_YouTubeVideo = 1, // video id is stored
|
||||
k_EItemPreviewType_Sketchfab = 2, // model id is stored
|
||||
k_EItemPreviewType_EnvironmentMap_HorizontalCross = 3, // standard image file expected - cube map in the layout
|
||||
// +---+---+-------+
|
||||
// | |Up | |
|
||||
// +---+---+---+---+
|
||||
// | L | F | R | B |
|
||||
// +---+---+---+---+
|
||||
// | |Dn | |
|
||||
// +---+---+---+---+
|
||||
k_EItemPreviewType_EnvironmentMap_LatLong = 4, // standard image file expected
|
||||
k_EItemPreviewType_ReservedMax = 255, // you can specify your own types above this value
|
||||
};
|
||||
|
||||
const uint32 kNumUGCResultsPerPage = 50;
|
||||
@ -181,18 +209,19 @@ public:
|
||||
virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
|
||||
|
||||
// Send the query to Steam
|
||||
CALL_RESULT( SteamUGCQueryCompleted_t )
|
||||
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;
|
||||
virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, char *pchURL, uint32 cchURLSize ) = 0;
|
||||
virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, char *pchMetadata, uint32 cchMetadatasize ) = 0;
|
||||
virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0;
|
||||
virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0;
|
||||
virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0;
|
||||
virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32 *pStatValue ) = 0;
|
||||
virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 *pStatValue ) = 0;
|
||||
virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0;
|
||||
virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char *pchURLOrVideoID, uint32 cchURLSize, bool *pbIsImage ) = 0;
|
||||
virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0;
|
||||
virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0;
|
||||
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char *pchKey, uint32 cchKeySize, char *pchValue, uint32 cchValueSize ) = 0;
|
||||
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0;
|
||||
|
||||
// Release the request to free up memory, after retrieving results
|
||||
virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
|
||||
@ -200,12 +229,14 @@ public:
|
||||
// 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 SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0;
|
||||
virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0;
|
||||
virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0;
|
||||
virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0;
|
||||
virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0;
|
||||
virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0;
|
||||
virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0;
|
||||
virtual bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint32 unDays ) = 0;
|
||||
virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0;
|
||||
virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0;
|
||||
|
||||
@ -222,6 +253,7 @@ public:
|
||||
virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0;
|
||||
|
||||
// Steam Workshop Creator API
|
||||
CALL_RESULT( CreateItemResult_t )
|
||||
virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet
|
||||
|
||||
virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate()
|
||||
@ -236,16 +268,28 @@ public:
|
||||
virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size
|
||||
virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key
|
||||
virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag.
|
||||
virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
|
||||
virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; // add preview video for this item
|
||||
virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
|
||||
virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; // updates an existing preview video for this item
|
||||
virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted)
|
||||
|
||||
CALL_RESULT( SubmitItemUpdateResult_t )
|
||||
virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate()
|
||||
virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0;
|
||||
|
||||
// Steam Workshop Consumer API
|
||||
CALL_RESULT( SetUserItemVoteResult_t )
|
||||
virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0;
|
||||
CALL_RESULT( GetUserItemVoteResult_t )
|
||||
virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
CALL_RESULT( UserFavoriteItemsListChanged_t )
|
||||
virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
|
||||
CALL_RESULT( UserFavoriteItemsListChanged_t )
|
||||
virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
|
||||
CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
|
||||
virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP
|
||||
CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
|
||||
virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits
|
||||
virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items
|
||||
virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs
|
||||
@ -255,7 +299,7 @@ public:
|
||||
|
||||
// get info about currently installed content on disc for items that have k_EItemStateInstalled set
|
||||
// if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder)
|
||||
virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0;
|
||||
virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, OUT_STRING_COUNT( cchFolderSize ) char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0;
|
||||
|
||||
// get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once
|
||||
virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0;
|
||||
@ -271,9 +315,37 @@ public:
|
||||
|
||||
// SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends
|
||||
virtual void SuspendDownloads( bool bSuspend ) = 0;
|
||||
|
||||
// usage tracking
|
||||
CALL_RESULT( StartPlaytimeTrackingResult_t )
|
||||
virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
|
||||
CALL_RESULT( StopPlaytimeTrackingResult_t )
|
||||
virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
|
||||
CALL_RESULT( StopPlaytimeTrackingResult_t )
|
||||
virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0;
|
||||
|
||||
// parent-child relationship or dependency management
|
||||
CALL_RESULT( AddUGCDependencyResult_t )
|
||||
virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
|
||||
CALL_RESULT( RemoveUGCDependencyResult_t )
|
||||
virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
|
||||
|
||||
// add/remove app dependence/requirements (usually DLC)
|
||||
CALL_RESULT( AddAppDependencyResult_t )
|
||||
virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
|
||||
CALL_RESULT( RemoveAppDependencyResult_t )
|
||||
virtual SteamAPICall_t RemoveAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
|
||||
// request app dependencies. note that whatever callback you register for GetAppDependenciesResult_t may be called multiple times
|
||||
// until all app dependencies have been returned
|
||||
CALL_RESULT( GetAppDependenciesResult_t )
|
||||
virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
|
||||
// delete the item without prompting the user
|
||||
CALL_RESULT( DeleteItemResult_t )
|
||||
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION007"
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION010"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for querying UGC
|
||||
@ -320,6 +392,7 @@ struct SubmitItemUpdateResult_t
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 4 };
|
||||
EResult m_eResult;
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
@ -380,6 +453,93 @@ struct GetUserItemVoteResult_t
|
||||
bool m_bVoteSkipped;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to StartPlaytimeTracking()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StartPlaytimeTrackingResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 10 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to StopPlaytimeTracking()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StopPlaytimeTrackingResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 11 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to AddDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AddUGCDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 12 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
PublishedFileId_t m_nChildPublishedFileId;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to RemoveDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoveUGCDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 13 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
PublishedFileId_t m_nChildPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to AddAppDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AddAppDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 14 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
AppId_t m_nAppID;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to RemoveAppDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoveAppDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 15 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
AppId_t m_nAppID;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetAppDependencies. Callback may be called
|
||||
// multiple times until all app dependencies have been returned.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetAppDependenciesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 16 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
AppId_t m_rgAppIDs[32];
|
||||
uint32 m_nNumAppDependencies; // number returned in this struct
|
||||
uint32 m_nTotalNumAppDependencies; // total found
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to DeleteItem
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DeleteItemResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 17 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMUGC_H
|
||||
|
@ -1,63 +0,0 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Interface to unified messages client
|
||||
//
|
||||
// You should not need to use this interface except if your product is using a language other than C++.
|
||||
// Contact your Steam Tech contact for more details.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMUNIFIEDMESSAGES_H
|
||||
#define ISTEAMUNIFIEDMESSAGES_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
typedef uint64 ClientUnifiedMessageHandle;
|
||||
|
||||
class ISteamUnifiedMessages
|
||||
{
|
||||
public:
|
||||
static const ClientUnifiedMessageHandle k_InvalidUnifiedMessageHandle = 0;
|
||||
|
||||
// Sends a service method (in binary serialized form) using the Steam Client.
|
||||
// Returns a unified message handle (k_InvalidUnifiedMessageHandle if could not send the message).
|
||||
virtual ClientUnifiedMessageHandle SendMethod( const char *pchServiceMethod, const void *pRequestBuffer, uint32 unRequestBufferSize, uint64 unContext ) = 0;
|
||||
|
||||
// Gets the size of the response and the EResult. Returns false if the response is not ready yet.
|
||||
virtual bool GetMethodResponseInfo( ClientUnifiedMessageHandle hHandle, uint32 *punResponseSize, EResult *peResult ) = 0;
|
||||
|
||||
// Gets a response in binary serialized form (and optionally release the corresponding allocated memory).
|
||||
virtual bool GetMethodResponseData( ClientUnifiedMessageHandle hHandle, void *pResponseBuffer, uint32 unResponseBufferSize, bool bAutoRelease ) = 0;
|
||||
|
||||
// Releases the message and its corresponding allocated memory.
|
||||
virtual bool ReleaseMethod( ClientUnifiedMessageHandle hHandle ) = 0;
|
||||
|
||||
// Sends a service notification (in binary serialized form) using the Steam Client.
|
||||
// Returns true if the notification was sent successfully.
|
||||
virtual bool SendNotification( const char *pchServiceNotification, const void *pNotificationBuffer, uint32 unNotificationBufferSize ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUNIFIEDMESSAGES_INTERFACE_VERSION "STEAMUNIFIEDMESSAGES_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
|
||||
|
||||
struct SteamUnifiedMessagesSendMethodResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUnifiedMessagesCallbacks + 1 };
|
||||
ClientUnifiedMessageHandle m_hHandle; // The handle returned by SendMethod().
|
||||
uint64 m_unContext; // Context provided when calling SendMethod().
|
||||
EResult m_eResult; // The result of the method call.
|
||||
uint32 m_unResponseSize; // The size of the response.
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMUNIFIEDMESSAGES_H
|
@ -30,8 +30,6 @@ struct CallbackMsg_t
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
// reference to a steam call, to filter results by
|
||||
typedef int32 HSteamCall;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing and manipulating a steam account
|
||||
@ -91,36 +89,50 @@ public:
|
||||
// k_eVoiceResultNotRecording
|
||||
virtual void StopVoiceRecording( ) = 0;
|
||||
|
||||
// Determine the amount of captured audio data that is available in bytes.
|
||||
// This provides both the compressed and uncompressed data. Please note that the uncompressed
|
||||
// data is not the raw feed from the microphone: data may only be available if audible
|
||||
// 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;
|
||||
// Determine the size of captured audio data that is available from GetVoice.
|
||||
// Most applications will only use compressed data and should ignore the other
|
||||
// parameters, which exist primarily for backwards compatibility. See comments
|
||||
// below for further explanation of "uncompressed" data.
|
||||
virtual EVoiceResult GetAvailableVoice( uint32 *pcbCompressed, uint32 *pcbUncompressed_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 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.
|
||||
// Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible
|
||||
// levels of speech are detected, and may have passed through denoising filters, etc.
|
||||
// This function should be called as often as possible once recording has started; once per frame at least.
|
||||
// nBytesWritten is set to the number of bytes written to pDestBuffer.
|
||||
// nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer.
|
||||
// You must grab both compressed and uncompressed here at the same time, if you want both.
|
||||
// Matching data that is not read during this call will be thrown away.
|
||||
// GetAvailableVoice() can be used to determine how much data is actually available.
|
||||
// If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate
|
||||
virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate ) = 0;
|
||||
// ---------------------------------------------------------------------------
|
||||
// NOTE: "uncompressed" audio is a deprecated feature and should not be used
|
||||
// by most applications. It is raw single-channel 16-bit PCM wave data which
|
||||
// may have been run through preprocessing filters and/or had silence removed,
|
||||
// so the uncompressed audio could have a shorter duration than you expect.
|
||||
// There may be no data at all during long periods of silence. Also, fetching
|
||||
// uncompressed audio will cause GetVoice to discard any leftover compressed
|
||||
// audio, so you must fetch both types at once. Finally, GetAvailableVoice is
|
||||
// not precisely accurate when the uncompressed size is requested. So if you
|
||||
// really need to use uncompressed audio, you should call GetVoice frequently
|
||||
// with two very large (20kb+) output buffers instead of trying to allocate
|
||||
// perfectly-sized buffers. But most applications should ignore all of these
|
||||
// details and simply leave the "uncompressed" parameters as NULL/zero.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Decompresses a chunk of compressed data produced by GetVoice().
|
||||
// nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall.
|
||||
// In that case, nBytesWritten is set to the size of the buffer required to decompress the given
|
||||
// data. The suggested buffer size for the destination buffer is 22 kilobytes.
|
||||
// The output format of the data is 16-bit signed at the requested samples per second.
|
||||
// If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nDesiredSampleRate
|
||||
// Read captured audio data from the microphone buffer. This should be called
|
||||
// at least once per frame, and preferably every few milliseconds, to keep the
|
||||
// microphone input delay as low as possible. Most applications will only use
|
||||
// compressed data and should pass NULL/zero for the "uncompressed" parameters.
|
||||
// Compressed data can be transmitted by your application and decoded into raw
|
||||
// using the DecompressVoice function below.
|
||||
virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed_Deprecated = false, void *pUncompressedDestBuffer_Deprecated = 0, uint32 cbUncompressedDestBufferSize_Deprecated = 0, uint32 *nUncompressBytesWritten_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 0;
|
||||
|
||||
// Decodes the compressed voice data returned by GetVoice. The output data is
|
||||
// raw single-channel 16-bit PCM audio. The decoder supports any sample rate
|
||||
// from 11025 to 48000; see GetVoiceOptimalSampleRate() below for details.
|
||||
// If the output buffer is not large enough, then *nBytesWritten will be set
|
||||
// to the required buffer size, and k_EVoiceResultBufferTooSmall is returned.
|
||||
// It is suggested to start with a 20kb buffer and reallocate as necessary.
|
||||
virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0;
|
||||
|
||||
// This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results
|
||||
// This returns the native sample rate of the Steam voice decompressor; using
|
||||
// this sample rate for DecompressVoice will perform the least CPU processing.
|
||||
// However, the final audio quality will depend on how well the audio device
|
||||
// (and/or your application's audio output SDK) deals with lower sample rates.
|
||||
// You may find that you get the best audio output quality when you ignore
|
||||
// this function and use the native sample rate of your audio output device,
|
||||
// which is usually 48000 or 44100.
|
||||
virtual uint32 GetVoiceOptimalSampleRate() = 0;
|
||||
|
||||
// Retrieve ticket to be sent to the entity who wishes to authenticate you.
|
||||
@ -153,6 +165,7 @@ public:
|
||||
// Requests a ticket encrypted with an app specific shared key
|
||||
// pDataToInclude, cbDataToInclude will be encrypted into the ticket
|
||||
// ( This is asynchronous, you must wait for the ticket to be completed by the server )
|
||||
CALL_RESULT( EncryptedAppTicketResponse_t )
|
||||
virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0;
|
||||
|
||||
// retrieve a finished ticket
|
||||
@ -176,48 +189,24 @@ public:
|
||||
// or else immediately navigate to the result URL using a hidden browser window.
|
||||
// NOTE 2: The resulting authorization cookie has an expiration time of one day,
|
||||
// so it would be a good idea to request and visit a new auth URL every 12 hours.
|
||||
CALL_RESULT( StoreAuthURLResponse_t )
|
||||
virtual SteamAPICall_t RequestStoreAuthURL( const char *pchRedirectURL ) = 0;
|
||||
|
||||
#ifdef _PS3
|
||||
// Initiates PS3 Logon request using just PSN ticket.
|
||||
//
|
||||
// PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to
|
||||
// prompt the user for network setup/PSN logon before initiating the Steam side of the logon.
|
||||
//
|
||||
// Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t
|
||||
// may return with EResult k_EResultExternalAccountUnlinked if the PSN account is unknown to Steam. You should
|
||||
// then call LogOnAndLinkSteamAccountToPSN() after prompting the user for credentials to establish a link.
|
||||
// Future calls to LogOn() after the one time link call should succeed as long as the user is connected to PSN.
|
||||
virtual void LogOn( bool bInteractive ) = 0;
|
||||
// gets whether the users phone number is verified
|
||||
virtual bool BIsPhoneVerified() = 0;
|
||||
|
||||
// Initiates a request to logon with a specific steam username/password and create a PSN account link at
|
||||
// the same time. Should call this only if LogOn() has failed and indicated the PSN account is unlinked.
|
||||
//
|
||||
// PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to
|
||||
// prompt the user for network setup/PSN logon before initiating the Steam side of the logon. pchUserName
|
||||
// should be the users Steam username, and pchPassword should be the users Steam password.
|
||||
//
|
||||
// Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t
|
||||
// may return with EResult k_EResultOtherAccountAlreadyLinked if already linked to another account.
|
||||
virtual void LogOnAndLinkSteamAccountToPSN( bool bInteractive, const char *pchUserName, const char *pchPassword ) = 0;
|
||||
// gets whether the user has two factor enabled on their account
|
||||
virtual bool BIsTwoFactorEnabled() = 0;
|
||||
|
||||
// Final logon option for PS3, this logs into an existing account if already linked, but if not already linked
|
||||
// creates a new account using the info in the PSN ticket to generate a unique account name. The new account is
|
||||
// then linked to the PSN ticket. This is the faster option for new users who don't have an existing Steam account
|
||||
// to get into multiplayer.
|
||||
//
|
||||
// PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to
|
||||
// prompt the user for network setup/PSN logon before initiating the Steam side of the logon.
|
||||
virtual void LogOnAndCreateNewSteamAccountIfNeeded( bool bInteractive ) = 0;
|
||||
// gets whether the users phone number is identifying
|
||||
virtual bool BIsPhoneIdentifying() = 0;
|
||||
|
||||
// Returns a special SteamID that represents the user's PSN information. Can be used to query the user's PSN avatar,
|
||||
// online name, etc. through the standard Steamworks interfaces.
|
||||
virtual CSteamID GetConsoleSteamID() = 0;
|
||||
#endif
|
||||
// gets whether the users phone number is awaiting (re)verification
|
||||
virtual bool BIsPhoneRequiringVerification() = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser018"
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser019"
|
||||
|
||||
|
||||
// callbacks
|
||||
|
@ -1,4 +1,4 @@
|
||||
//====== Copyright <EFBFBD> 1996-2009, Valve Corporation, All rights reserved. =======
|
||||
//====== Copyright ? 1996-2009, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to stats, achievements, and leaderboards
|
||||
//
|
||||
@ -89,6 +89,7 @@ class ISteamUserStats
|
||||
{
|
||||
public:
|
||||
// Ask the server to send down this user's data and achievements for this game
|
||||
CALL_BACK( UserStatsReceived_t )
|
||||
virtual bool RequestCurrentStats() = 0;
|
||||
|
||||
// Data accessors
|
||||
@ -148,6 +149,7 @@ public:
|
||||
// returns a UserStatsReceived_t received when completed
|
||||
// if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail
|
||||
// these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data
|
||||
CALL_RESULT( UserStatsReceived_t )
|
||||
virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// requests stat information for a user, usable after a successful call to RequestUserStats()
|
||||
@ -164,10 +166,12 @@ public:
|
||||
|
||||
// asks the Steam back-end for a leaderboard by name, and will create it if it's not yet
|
||||
// This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
||||
CALL_RESULT(LeaderboardFindResult_t)
|
||||
virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0;
|
||||
|
||||
// as above, but won't create the leaderboard if it's not found
|
||||
// This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
||||
CALL_RESULT( LeaderboardFindResult_t )
|
||||
virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0;
|
||||
|
||||
// returns the name of a leaderboard
|
||||
@ -190,11 +194,13 @@ public:
|
||||
// k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate
|
||||
// e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after
|
||||
// k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user
|
||||
CALL_RESULT( LeaderboardScoresDownloaded_t )
|
||||
virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0;
|
||||
// as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
|
||||
// if a user doesn't have a leaderboard entry, they won't be included in the result
|
||||
// a max of 100 users can be downloaded at a time, with only one outstanding call at a time
|
||||
METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers)
|
||||
CALL_RESULT( LeaderboardScoresDownloaded_t )
|
||||
virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard,
|
||||
ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0;
|
||||
|
||||
@ -218,20 +224,24 @@ public:
|
||||
// This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t
|
||||
// Details are extra game-defined information regarding how the user got that score
|
||||
// pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list
|
||||
CALL_RESULT( LeaderboardScoreUploaded_t )
|
||||
virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0;
|
||||
|
||||
// Attaches a piece of user generated content the user's entry on a leaderboard.
|
||||
// hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().
|
||||
// This call is asynchronous, with the result returned in LeaderboardUGCSet_t.
|
||||
CALL_RESULT( LeaderboardUGCSet_t )
|
||||
virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0;
|
||||
|
||||
// Retrieves the number of players currently playing your game (online + offline)
|
||||
// This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t
|
||||
CALL_RESULT( NumberOfCurrentPlayers_t )
|
||||
virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0;
|
||||
|
||||
// Requests that Steam fetch data on the percentage of players who have received each achievement
|
||||
// for the game globally.
|
||||
// This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.
|
||||
CALL_RESULT( GlobalAchievementPercentagesReady_t )
|
||||
virtual SteamAPICall_t RequestGlobalAchievementPercentages() = 0;
|
||||
|
||||
// Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch
|
||||
@ -251,6 +261,7 @@ public:
|
||||
// This call is asynchronous, with the results returned in GlobalStatsReceived_t.
|
||||
// nHistoryDays specifies how many days of day-by-day history to retrieve in addition
|
||||
// to the overall totals. The limit is 60.
|
||||
CALL_RESULT( GlobalStatsReceived_t )
|
||||
virtual SteamAPICall_t RequestGlobalStats( int nHistoryDays ) = 0;
|
||||
|
||||
// Gets the lifetime totals for an aggregated stat
|
||||
|
@ -1,4 +1,4 @@
|
||||
//====== Copyright <EFBFBD> 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//====== Copyright ? 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to utility functions in Steam
|
||||
//
|
||||
@ -61,7 +61,7 @@ public:
|
||||
// the universe this client is connecting to
|
||||
virtual EUniverse GetConnectedUniverse() = 0;
|
||||
|
||||
// Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time)
|
||||
// Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time)
|
||||
virtual uint32 GetServerRealTime() = 0;
|
||||
|
||||
// returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)
|
||||
@ -95,9 +95,8 @@ public:
|
||||
virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0;
|
||||
virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0;
|
||||
|
||||
// this needs to be called every frame to process matchmaking results
|
||||
// redundant if you're already calling SteamAPI_RunCallbacks()
|
||||
virtual void RunFrame() = 0;
|
||||
// Deprecated. Applications should use SteamAPI_RunCallbacks() instead. Game servers do not need to call this function.
|
||||
STEAM_PRIVATE_API( virtual void RunFrame() = 0; )
|
||||
|
||||
// returns the number of IPC calls made since the last time this function was called
|
||||
// Used for perf debugging so you can understand how many IPC calls your game makes per frame
|
||||
@ -126,7 +125,6 @@ public:
|
||||
// refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
||||
virtual bool BOverlayNeedsPresent() = 0;
|
||||
|
||||
#ifndef _PS3
|
||||
// Asynchronous call to check if an executable file has been signed using the public key set on the signing tab
|
||||
// of the partner site, for example to refuse to load modified executable files.
|
||||
// The result is returned in CheckFileSignature_t.
|
||||
@ -135,18 +133,8 @@ public:
|
||||
// k_ECheckFileSignatureFileNotFound - The file does not exist on disk.
|
||||
// k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match.
|
||||
// k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid.
|
||||
CALL_RESULT( CheckFileSignature_t )
|
||||
virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0;
|
||||
#endif
|
||||
|
||||
#ifdef _PS3
|
||||
virtual void PostPS3SysutilCallback( uint64_t status, uint64_t param, void* userdata ) = 0;
|
||||
virtual bool BIsReadyToShutdown() = 0;
|
||||
virtual bool BIsPSNOnline() = 0;
|
||||
|
||||
// Call this with localized strings for the language the game is running in, otherwise default english
|
||||
// strings will be used by Steam.
|
||||
virtual void SetPSNGameBootInviteStrings( const char *pchSubject, const char *pchBody ) = 0;
|
||||
#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, const char *pchExistingText ) = 0;
|
||||
@ -163,9 +151,27 @@ public:
|
||||
|
||||
// Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition.
|
||||
virtual void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) = 0;
|
||||
|
||||
// returns true if Steam & the Steam Overlay are running in Big Picture mode
|
||||
// Games much be launched through the Steam client to enable the Big Picture overlay. During development,
|
||||
// a game can be added as a non-steam game to the developers library to test this feature
|
||||
virtual bool IsSteamInBigPictureMode() = 0;
|
||||
|
||||
// ask SteamUI to create and render its OpenVR dashboard
|
||||
virtual void StartVRDashboard() = 0;
|
||||
|
||||
// Returns true if the HMD content will be streamed via Steam In-Home Streaming
|
||||
virtual bool IsVRHeadsetStreamingEnabled() = 0;
|
||||
|
||||
// Set whether the HMD content will be streamed via Steam In-Home Streaming
|
||||
// If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.
|
||||
// If this is set to false, then the application window will be streamed instead, and remote input will be allowed.
|
||||
// The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
||||
// (this is useful for games that have asymmetric multiplayer gameplay)
|
||||
virtual void SetVRHeadsetStreamingEnabled( bool bEnabled ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils007"
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils009"
|
||||
|
||||
|
||||
// callbacks
|
||||
@ -203,6 +209,8 @@ struct SteamAPICallCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 3 };
|
||||
SteamAPICall_t m_hAsyncCall;
|
||||
int m_iCallback;
|
||||
uint32 m_cubParam;
|
||||
};
|
||||
|
||||
|
||||
@ -235,60 +243,6 @@ struct CheckFileSignature_t
|
||||
ECheckFileSignature m_eCheckFileSignature;
|
||||
};
|
||||
|
||||
#ifdef _PS3
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for NetCtlNetStartDialog finishing on PS3
|
||||
//-----------------------------------------------------------------------------
|
||||
struct NetStartDialogFinished_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 6 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for NetCtlNetStartDialog unloaded on PS3
|
||||
//-----------------------------------------------------------------------------
|
||||
struct NetStartDialogUnloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 7 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for system menu closing on PS3 - should trigger resyncronizing friends list, etc.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PS3SystemMenuClosed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 8 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for NP message being selected by user on PS3 - should trigger handling of message if it's a lobby invite, etc.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PS3NPMessageSelected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 9 };
|
||||
uint32 dataid;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for when the PS3 keyboard dialog closes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PS3KeyboardDialogFinished_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 10 };
|
||||
};
|
||||
|
||||
// k_iSteamUtilsCallbacks + 11 is taken
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for PSN status changing on PS3
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PS3PSNStatusChange_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 12 };
|
||||
bool m_bPSNOnline;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// k_iSteamUtilsCallbacks + 13 is taken
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//====== Copyright © 1996-2014 Valve Corporation, All rights reserved. =======
|
||||
//====== Copyright ? 1996-2014 Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to Steam Video
|
||||
//
|
||||
@ -36,9 +36,14 @@ public:
|
||||
|
||||
// returns true if user is uploading a live broadcast
|
||||
virtual bool IsBroadcasting( int *pnNumViewers ) = 0;
|
||||
|
||||
// Get the OPF Details for 360 Video Playback
|
||||
CALL_BACK( GetOPFSettingsResult_t )
|
||||
virtual void GetOPFSettings( AppId_t unVideoAppID ) = 0;
|
||||
virtual bool GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V001"
|
||||
#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V002"
|
||||
|
||||
DEFINE_CALLBACK( BroadcastUploadStart_t, k_iClientVideoCallbacks + 4 )
|
||||
END_DEFINE_CALLBACK_0()
|
||||
@ -51,7 +56,13 @@ DEFINE_CALLBACK( GetVideoURLResult_t, k_iClientVideoCallbacks + 11 )
|
||||
CALLBACK_MEMBER( 0, EResult, m_eResult )
|
||||
CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
|
||||
CALLBACK_MEMBER( 2, char, m_rgchURL[256] )
|
||||
END_DEFINE_CALLBACK_1()
|
||||
END_DEFINE_CALLBACK_3()
|
||||
|
||||
|
||||
DEFINE_CALLBACK( GetOPFSettingsResult_t, k_iClientVideoCallbacks + 24 )
|
||||
CALLBACK_MEMBER( 0, EResult, m_eResult )
|
||||
CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
|
||||
END_DEFINE_CALLBACK_2()
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright <EFBFBD> 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//========= Copyright ? 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@ -156,9 +156,9 @@ inline const char *servernetadr_t::ToString( uint32 unIP, uint16 usPort ) const
|
||||
static int nBuf = 0;
|
||||
unsigned char *ipByte = (unsigned char *)&unIP;
|
||||
#ifdef VALVE_BIG_ENDIAN
|
||||
V_snprintf (s[nBuf], sizeof( s[nBuf] ), "%u.%u.%u.%u:%i", (int)(ipByte[0]), (int)(ipByte[1]), (int)(ipByte[2]), (int)(ipByte[3]), usPort );
|
||||
_snprintf (s[nBuf], sizeof( s[nBuf] ), "%u.%u.%u.%u:%i", (int)(ipByte[0]), (int)(ipByte[1]), (int)(ipByte[2]), (int)(ipByte[3]), usPort );
|
||||
#else
|
||||
V_snprintf (s[nBuf], sizeof( s[nBuf] ), "%u.%u.%u.%u:%i", (int)(ipByte[3]), (int)(ipByte[2]), (int)(ipByte[1]), (int)(ipByte[0]), usPort );
|
||||
_snprintf (s[nBuf], sizeof( s[nBuf] ), "%u.%u.%u.%u:%i", (int)(ipByte[3]), (int)(ipByte[2]), (int)(ipByte[1]), (int)(ipByte[0]), usPort );
|
||||
#endif
|
||||
const char *pchRet = s[nBuf];
|
||||
++nBuf;
|
||||
|
@ -23,17 +23,14 @@
|
||||
#include "isteammusic.h"
|
||||
#include "isteammusicremote.h"
|
||||
#include "isteamhttp.h"
|
||||
#include "isteamunifiedmessages.h"
|
||||
#include "isteamcontroller.h"
|
||||
#include "isteamugc.h"
|
||||
#include "isteamapplist.h"
|
||||
#include "isteamhtmlsurface.h"
|
||||
#include "isteaminventory.h"
|
||||
#include "isteamvideo.h"
|
||||
#include "isteamparentalsettings.h"
|
||||
|
||||
#if defined( _PS3 )
|
||||
#include "steamps3params.h"
|
||||
#endif
|
||||
|
||||
// Steam API export macro
|
||||
#if defined( _WIN32 ) && !defined( _X360 )
|
||||
@ -65,79 +62,126 @@
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
// S_API void SteamAPI_Init(); (see below)
|
||||
|
||||
// SteamAPI_Init must be called before using any other API functions. If it fails, an
|
||||
// error message will be output to the debugger (or stderr) with further information.
|
||||
S_API bool S_CALLTYPE SteamAPI_Init();
|
||||
|
||||
// SteamAPI_Shutdown should be called during process shutdown if possible.
|
||||
S_API void S_CALLTYPE SteamAPI_Shutdown();
|
||||
|
||||
// checks if a local Steam client is running
|
||||
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.
|
||||
// SteamAPI_RestartAppIfNecessary ensures that your executable was launched through Steam.
|
||||
//
|
||||
// Returns: true if your executable was NOT launched through the Steam client. This function will
|
||||
// then start your application through the client. Your current process should exit.
|
||||
// Returns true if the current process should terminate. Steam is now re-launching your application.
|
||||
//
|
||||
// false if your executable was started through the Steam client or a steam_appid.txt file
|
||||
// is present in your game's directory (for development). Your current process should continue.
|
||||
// Returns false if no action needs to be taken. This means that your executable was started through
|
||||
// the Steam client, or a steam_appid.txt file is present in your game's directory (for development).
|
||||
// Your current process should continue if false is returned.
|
||||
//
|
||||
// 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.
|
||||
// NOTE: If you use the Steam DRM wrapper on your primary executable file, this check is unnecessary
|
||||
// since the DRM wrapper will ensure that your application was launched properly through Steam.
|
||||
S_API bool S_CALLTYPE SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
|
||||
|
||||
// Many Steam API functions allocate a small amount of thread-local memory for parameter storage.
|
||||
// SteamAPI_ReleaseCurrentThreadMemory() will free API memory associated with the calling thread.
|
||||
// This function is also called automatically by SteamAPI_RunCallbacks(), so a single-threaded
|
||||
// program never needs to explicitly call this function.
|
||||
S_API void S_CALLTYPE SteamAPI_ReleaseCurrentThreadMemory();
|
||||
|
||||
|
||||
// crash dump recording functions
|
||||
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 *S_CALLTYPE SteamClient();
|
||||
|
||||
|
||||
//
|
||||
// VERSION_SAFE_STEAM_API_INTERFACES is usually not necessary, but it provides safety against releasing
|
||||
// new steam_api.dll's without recompiling/rereleasing modules that use it.
|
||||
//
|
||||
// If you use VERSION_SAFE_STEAM_API_INTERFACES, then you should call SteamAPI_InitSafe(). Also, to get the
|
||||
// Steam interfaces, you must create and Init() a CSteamAPIContext (below) and use the interfaces in there.
|
||||
//
|
||||
// If you don't use VERSION_SAFE_STEAM_API_INTERFACES, then you can use SteamAPI_Init() and the SteamXXXX()
|
||||
// functions below to get at the Steam interfaces.
|
||||
//
|
||||
#ifdef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
S_API bool S_CALLTYPE SteamAPI_InitSafe();
|
||||
#else
|
||||
|
||||
#if defined(_PS3)
|
||||
S_API bool S_CALLTYPE SteamAPI_Init( SteamPS3Params_t *pParams );
|
||||
#else
|
||||
S_API bool S_CALLTYPE SteamAPI_Init();
|
||||
#endif
|
||||
|
||||
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();
|
||||
S_API ISteamMusicRemote *S_CALLTYPE SteamMusicRemote();
|
||||
S_API ISteamHTMLSurface *S_CALLTYPE SteamHTMLSurface();
|
||||
S_API ISteamInventory *S_CALLTYPE SteamInventory();
|
||||
S_API ISteamVideo *S_CALLTYPE SteamVideo();
|
||||
#ifdef _PS3
|
||||
S_API ISteamPS3OverlayRender *S_CALLTYPE SteamPS3OverlayRender();
|
||||
#endif
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// Global accessors for Steamworks C++ APIs. See individual isteam*.h files for details.
|
||||
// You should not cache the results of these accessors or pass the result pointers across
|
||||
// modules! Different modules may be compiled against different SDK header versions, and
|
||||
// the interface pointers could therefore be different across modules. Every line of code
|
||||
// which calls into a Steamworks API should retrieve the interface from a global accessor.
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
#if !defined( STEAM_API_EXPORTS )
|
||||
inline ISteamClient *SteamClient();
|
||||
inline ISteamUser *SteamUser();
|
||||
inline ISteamFriends *SteamFriends();
|
||||
inline ISteamUtils *SteamUtils();
|
||||
inline ISteamMatchmaking *SteamMatchmaking();
|
||||
inline ISteamUserStats *SteamUserStats();
|
||||
inline ISteamApps *SteamApps();
|
||||
inline ISteamNetworking *SteamNetworking();
|
||||
inline ISteamMatchmakingServers *SteamMatchmakingServers();
|
||||
inline ISteamRemoteStorage *SteamRemoteStorage();
|
||||
inline ISteamScreenshots *SteamScreenshots();
|
||||
inline ISteamHTTP *SteamHTTP();
|
||||
inline ISteamController *SteamController();
|
||||
inline ISteamUGC *SteamUGC();
|
||||
inline ISteamAppList *SteamAppList();
|
||||
inline ISteamMusic *SteamMusic();
|
||||
inline ISteamMusicRemote *SteamMusicRemote();
|
||||
inline ISteamHTMLSurface *SteamHTMLSurface();
|
||||
inline ISteamInventory *SteamInventory();
|
||||
inline ISteamVideo *SteamVideo();
|
||||
inline ISteamParentalSettings *SteamParentalSettings();
|
||||
#endif // VERSION_SAFE_STEAM_API_INTERFACES
|
||||
|
||||
|
||||
// CSteamAPIContext encapsulates the Steamworks API global accessors into
|
||||
// a single object. This is DEPRECATED and only remains for compatibility.
|
||||
class CSteamAPIContext
|
||||
{
|
||||
public:
|
||||
// DEPRECATED - there is no benefit to using this over the global accessors
|
||||
CSteamAPIContext() { Clear(); }
|
||||
void Clear();
|
||||
bool Init();
|
||||
ISteamClient* SteamClient() const { return m_pSteamClient; }
|
||||
ISteamUser* SteamUser() const { return m_pSteamUser; }
|
||||
ISteamFriends* SteamFriends() const { return m_pSteamFriends; }
|
||||
ISteamUtils* SteamUtils() const { return m_pSteamUtils; }
|
||||
ISteamMatchmaking* SteamMatchmaking() const { return m_pSteamMatchmaking; }
|
||||
ISteamUserStats* SteamUserStats() const { return m_pSteamUserStats; }
|
||||
ISteamApps* SteamApps() const { return m_pSteamApps; }
|
||||
ISteamMatchmakingServers* SteamMatchmakingServers() const { return m_pSteamMatchmakingServers; }
|
||||
ISteamNetworking* SteamNetworking() const { return m_pSteamNetworking; }
|
||||
ISteamRemoteStorage* SteamRemoteStorage() const { return m_pSteamRemoteStorage; }
|
||||
ISteamScreenshots* SteamScreenshots() const { return m_pSteamScreenshots; }
|
||||
ISteamHTTP* SteamHTTP() const { return m_pSteamHTTP; }
|
||||
ISteamController* SteamController() const { return m_pController; }
|
||||
ISteamUGC* SteamUGC() const { return m_pSteamUGC; }
|
||||
ISteamAppList* SteamAppList() const { return m_pSteamAppList; }
|
||||
ISteamMusic* SteamMusic() const { return m_pSteamMusic; }
|
||||
ISteamMusicRemote* SteamMusicRemote() const { return m_pSteamMusicRemote; }
|
||||
ISteamHTMLSurface* SteamHTMLSurface() const { return m_pSteamHTMLSurface; }
|
||||
ISteamInventory* SteamInventory() const { return m_pSteamInventory; }
|
||||
ISteamVideo* SteamVideo() const { return m_pSteamVideo; }
|
||||
ISteamParentalSettings* SteamParentalSettings() const { return m_pSteamParentalSettings; }
|
||||
// DEPRECATED - there is no benefit to using this over the global accessors
|
||||
private:
|
||||
ISteamClient *m_pSteamClient;
|
||||
ISteamUser *m_pSteamUser;
|
||||
ISteamFriends *m_pSteamFriends;
|
||||
ISteamUtils *m_pSteamUtils;
|
||||
ISteamMatchmaking *m_pSteamMatchmaking;
|
||||
ISteamUserStats *m_pSteamUserStats;
|
||||
ISteamApps *m_pSteamApps;
|
||||
ISteamMatchmakingServers *m_pSteamMatchmakingServers;
|
||||
ISteamNetworking *m_pSteamNetworking;
|
||||
ISteamRemoteStorage *m_pSteamRemoteStorage;
|
||||
ISteamScreenshots *m_pSteamScreenshots;
|
||||
ISteamHTTP *m_pSteamHTTP;
|
||||
ISteamController *m_pController;
|
||||
ISteamUGC *m_pSteamUGC;
|
||||
ISteamAppList *m_pSteamAppList;
|
||||
ISteamMusic *m_pSteamMusic;
|
||||
ISteamMusicRemote *m_pSteamMusicRemote;
|
||||
ISteamHTMLSurface *m_pSteamHTMLSurface;
|
||||
ISteamInventory *m_pSteamInventory;
|
||||
ISteamVideo *m_pSteamVideo;
|
||||
ISteamParentalSettings *m_pSteamParentalSettings;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// steam callback and call-result helpers
|
||||
//
|
||||
@ -160,10 +204,13 @@ S_API ISteamPS3OverlayRender *S_CALLTYPE SteamPS3OverlayRender();
|
||||
// delivered/executed when your application calls SteamAPI_RunCallbacks().
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
// SteamAPI_RunCallbacks is safe to call from multiple threads simultaneously,
|
||||
// but if you choose to do this, callback code could be executed on any thread.
|
||||
// One alternative is to call SteamAPI_RunCallbacks from the main thread only,
|
||||
// and call SteamAPI_ReleaseCurrentThreadMemory regularly on other threads.
|
||||
S_API void S_CALLTYPE SteamAPI_RunCallbacks();
|
||||
|
||||
|
||||
|
||||
// Declares a callback member function plus a helper member variable which
|
||||
// registers the callback on object creation and unregisters on destruction.
|
||||
// The optional fourth 'var' param exists only for backwards-compatibility
|
||||
@ -236,66 +283,18 @@ class CCallResult : private CCallbackBase
|
||||
public:
|
||||
typedef void (T::*func_t)( P*, bool );
|
||||
|
||||
CCallResult()
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid;
|
||||
m_pObj = NULL;
|
||||
m_Func = NULL;
|
||||
m_iCallback = P::k_iCallback;
|
||||
}
|
||||
|
||||
void Set( SteamAPICall_t hAPICall, T *p, func_t func )
|
||||
{
|
||||
if ( m_hAPICall )
|
||||
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
||||
|
||||
m_hAPICall = hAPICall;
|
||||
m_pObj = p;
|
||||
m_Func = func;
|
||||
|
||||
if ( hAPICall )
|
||||
SteamAPI_RegisterCallResult( this, hAPICall );
|
||||
}
|
||||
|
||||
bool IsActive() const
|
||||
{
|
||||
return ( m_hAPICall != k_uAPICallInvalid );
|
||||
}
|
||||
|
||||
void Cancel()
|
||||
{
|
||||
if ( m_hAPICall != k_uAPICallInvalid )
|
||||
{
|
||||
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
||||
m_hAPICall = k_uAPICallInvalid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
~CCallResult()
|
||||
{
|
||||
Cancel();
|
||||
}
|
||||
CCallResult();
|
||||
~CCallResult();
|
||||
|
||||
void Set( SteamAPICall_t hAPICall, T *p, func_t func );
|
||||
bool IsActive() const;
|
||||
void Cancel();
|
||||
|
||||
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
|
||||
private:
|
||||
virtual void Run( void *pvParam )
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||
(m_pObj->*m_Func)( (P *)pvParam, false );
|
||||
}
|
||||
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )
|
||||
{
|
||||
if ( hSteamAPICall == m_hAPICall )
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||
(m_pObj->*m_Func)( (P *)pvParam, bIOFailure );
|
||||
}
|
||||
}
|
||||
virtual int GetCallbackSizeBytes()
|
||||
{
|
||||
return sizeof( P );
|
||||
}
|
||||
virtual void Run( void *pvParam );
|
||||
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall );
|
||||
virtual int GetCallbackSizeBytes() { return sizeof( P ); }
|
||||
|
||||
SteamAPICall_t m_hAPICall;
|
||||
T *m_pObj;
|
||||
@ -317,42 +316,14 @@ public:
|
||||
|
||||
// NOTE: If you can't provide the correct parameters at construction time, you should
|
||||
// use the CCallbackManual callback object (STEAM_CALLBACK_MANUAL macro) instead.
|
||||
CCallback( T *pObj, func_t func ) : m_pObj( NULL ), m_Func( NULL )
|
||||
{
|
||||
if ( bGameserver )
|
||||
{
|
||||
this->SetGameserverFlag();
|
||||
}
|
||||
Register( pObj, func );
|
||||
}
|
||||
CCallback( T *pObj, func_t func );
|
||||
|
||||
// manual registration of the callback
|
||||
void Register( T *pObj, func_t func )
|
||||
{
|
||||
if ( !pObj || !func )
|
||||
return;
|
||||
|
||||
if ( this->m_nCallbackFlags & CCallbackBase::k_ECallbackFlagsRegistered )
|
||||
Unregister();
|
||||
|
||||
m_pObj = pObj;
|
||||
m_Func = func;
|
||||
// SteamAPI_RegisterCallback sets k_ECallbackFlagsRegistered
|
||||
SteamAPI_RegisterCallback( this, P::k_iCallback );
|
||||
}
|
||||
|
||||
void Unregister()
|
||||
{
|
||||
// SteamAPI_UnregisterCallback removes k_ECallbackFlagsRegistered
|
||||
SteamAPI_UnregisterCallback( this );
|
||||
}
|
||||
void Register( T *pObj, func_t func );
|
||||
void Unregister();
|
||||
|
||||
protected:
|
||||
virtual void Run( void *pvParam )
|
||||
{
|
||||
(m_pObj->*m_Func)( (P *)pvParam );
|
||||
}
|
||||
|
||||
virtual void Run( void *pvParam );
|
||||
|
||||
T *m_pObj;
|
||||
func_t m_Func;
|
||||
};
|
||||
@ -373,26 +344,6 @@ public:
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The following macros are implementation details, not intended for public use
|
||||
//-----------------------------------------------------------------------------
|
||||
#define _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param )
|
||||
#define _STEAM_CALLBACK_HELPER( _1, _2, SELECTED, ... ) _STEAM_CALLBACK_##SELECTED
|
||||
#define _STEAM_CALLBACK_SELECT( X, Y ) _STEAM_CALLBACK_HELPER X Y
|
||||
#define _STEAM_CALLBACK_3( extra_code, thisclass, func, param ) \
|
||||
struct CCallbackInternal_ ## func : private CCallbackImpl< sizeof( param ) > { \
|
||||
CCallbackInternal_ ## func () { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func ( const CCallbackInternal_ ## func & ) { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func & operator=( const CCallbackInternal_ ## func & ) { return *this; } \
|
||||
private: virtual void Run( void *pvParam ) { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \
|
||||
thisclass *pOuter = reinterpret_cast<thisclass*>( reinterpret_cast<char*>(this) - offsetof( thisclass, m_steamcallback_ ## func ) ); \
|
||||
pOuter->func( reinterpret_cast<param*>( pvParam ) ); \
|
||||
} \
|
||||
} m_steamcallback_ ## func ; void func( param *pParam )
|
||||
#define _STEAM_CALLBACK_4( _, thisclass, func, param, var ) \
|
||||
CCallback< thisclass, param > var; void func( param *pParam )
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
// disable this warning; this pattern need for steam callback registration
|
||||
#pragma warning( disable: 4355 ) // 'this' : used in base member initializer list
|
||||
@ -405,7 +356,11 @@ public:
|
||||
// The following functions are part of abstracting API access to the steamclient.dll, but should only be used in very specific cases
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
// pumps out all the steam messages, calling the register callback
|
||||
// SteamAPI_IsSteamRunning() returns true if Steam is currently running
|
||||
S_API bool S_CALLTYPE SteamAPI_IsSteamRunning();
|
||||
|
||||
// Pumps out all the steam messages, calling registered callbacks.
|
||||
// NOT THREADSAFE - do not call from multiple threads simultaneously.
|
||||
S_API void Steam_RunCallbacks( HSteamPipe hSteamPipe, bool bGameServerCallbacks );
|
||||
|
||||
// register the callback funcs to use to interact with the steam dll
|
||||
@ -414,7 +369,8 @@ S_API void Steam_RegisterInterfaceFuncs( void *hModule );
|
||||
// returns the HSteamUser of the last user to dispatch a callback
|
||||
S_API HSteamUser Steam_GetHSteamUserCurrent();
|
||||
|
||||
// returns the filename path of the current running Steam process, used if you need to load an explicit steam dll by name
|
||||
// returns the filename path of the current running Steam process, used if you need to load an explicit steam dll by name.
|
||||
// DEPRECATED - implementation is Windows only, and the path returned is a UTF-8 string which must be converted to UTF-16 for use with Win32 APIs
|
||||
S_API const char *SteamAPI_GetSteamInstallPath();
|
||||
|
||||
// returns the pipe we are communicating to Steam with
|
||||
@ -427,224 +383,12 @@ S_API void SteamAPI_SetTryCatchCallbacks( bool bTryCatchCallbacks );
|
||||
S_API HSteamPipe GetHSteamPipe();
|
||||
S_API HSteamUser GetHSteamUser();
|
||||
|
||||
#ifdef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// VERSION_SAFE_STEAM_API_INTERFACES uses CSteamAPIContext to provide interfaces to each module in a way that
|
||||
// lets them each specify the interface versions they are compiled with.
|
||||
//
|
||||
// It's important that these stay inlined in the header so the calling module specifies the interface versions
|
||||
// for whatever Steam API version it has.
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
S_API HSteamUser SteamAPI_GetHSteamUser();
|
||||
|
||||
class CSteamAPIContext
|
||||
{
|
||||
public:
|
||||
CSteamAPIContext();
|
||||
void Clear();
|
||||
|
||||
bool Init();
|
||||
|
||||
ISteamUser* SteamUser() { return m_pSteamUser; }
|
||||
ISteamFriends* SteamFriends() { return m_pSteamFriends; }
|
||||
ISteamUtils* SteamUtils() { return m_pSteamUtils; }
|
||||
ISteamMatchmaking* SteamMatchmaking() { return m_pSteamMatchmaking; }
|
||||
ISteamUserStats* SteamUserStats() { return m_pSteamUserStats; }
|
||||
ISteamApps* SteamApps() { return m_pSteamApps; }
|
||||
ISteamMatchmakingServers* SteamMatchmakingServers() { return m_pSteamMatchmakingServers; }
|
||||
ISteamNetworking* SteamNetworking() { return m_pSteamNetworking; }
|
||||
ISteamRemoteStorage* SteamRemoteStorage() { return m_pSteamRemoteStorage; }
|
||||
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; }
|
||||
ISteamMusicRemote* SteamMusicRemote() { return m_pSteamMusicRemote; }
|
||||
ISteamHTMLSurface* SteamHTMLSurface() { return m_pSteamHTMLSurface; }
|
||||
ISteamInventory* SteamInventory() { return m_pSteamInventory; }
|
||||
ISteamVideo* SteamVideo() { return m_pSteamVideo; }
|
||||
#ifdef _PS3
|
||||
ISteamPS3OverlayRender* SteamPS3OverlayRender() { return m_pSteamPS3OverlayRender; }
|
||||
#if defined( VERSION_SAFE_STEAM_API_INTERFACES )
|
||||
// exists only for backwards compat with code written against older SDKs
|
||||
S_API bool S_CALLTYPE SteamAPI_InitSafe();
|
||||
#endif
|
||||
|
||||
private:
|
||||
ISteamUser *m_pSteamUser;
|
||||
ISteamFriends *m_pSteamFriends;
|
||||
ISteamUtils *m_pSteamUtils;
|
||||
ISteamMatchmaking *m_pSteamMatchmaking;
|
||||
ISteamUserStats *m_pSteamUserStats;
|
||||
ISteamApps *m_pSteamApps;
|
||||
ISteamMatchmakingServers *m_pSteamMatchmakingServers;
|
||||
ISteamNetworking *m_pSteamNetworking;
|
||||
ISteamRemoteStorage *m_pSteamRemoteStorage;
|
||||
ISteamScreenshots *m_pSteamScreenshots;
|
||||
ISteamHTTP *m_pSteamHTTP;
|
||||
ISteamUnifiedMessages*m_pSteamUnifiedMessages;
|
||||
ISteamController *m_pController;
|
||||
ISteamUGC *m_pSteamUGC;
|
||||
ISteamAppList *m_pSteamAppList;
|
||||
ISteamMusic *m_pSteamMusic;
|
||||
ISteamMusicRemote *m_pSteamMusicRemote;
|
||||
ISteamHTMLSurface *m_pSteamHTMLSurface;
|
||||
ISteamInventory *m_pSteamInventory;
|
||||
ISteamVideo *m_pSteamVideo;
|
||||
#ifdef _PS3
|
||||
ISteamPS3OverlayRender *m_pSteamPS3OverlayRender;
|
||||
#endif
|
||||
};
|
||||
|
||||
inline CSteamAPIContext::CSteamAPIContext()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
inline void CSteamAPIContext::Clear()
|
||||
{
|
||||
m_pSteamUser = NULL;
|
||||
m_pSteamFriends = NULL;
|
||||
m_pSteamUtils = NULL;
|
||||
m_pSteamMatchmaking = NULL;
|
||||
m_pSteamUserStats = NULL;
|
||||
m_pSteamApps = NULL;
|
||||
m_pSteamMatchmakingServers = NULL;
|
||||
m_pSteamNetworking = NULL;
|
||||
m_pSteamRemoteStorage = NULL;
|
||||
m_pSteamHTTP = NULL;
|
||||
m_pSteamScreenshots = NULL;
|
||||
m_pSteamMusic = NULL;
|
||||
m_pSteamUnifiedMessages = NULL;
|
||||
m_pController = NULL;
|
||||
m_pSteamUGC = NULL;
|
||||
m_pSteamAppList = NULL;
|
||||
m_pSteamMusic = NULL;
|
||||
m_pSteamMusicRemote= NULL;
|
||||
m_pSteamHTMLSurface = NULL;
|
||||
m_pSteamInventory = NULL;
|
||||
#ifdef _PS3
|
||||
m_pSteamPS3OverlayRender = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
// This function must be inlined so the module using steam_api.dll gets the version names they want.
|
||||
inline bool CSteamAPIContext::Init()
|
||||
{
|
||||
if ( !SteamClient() )
|
||||
return false;
|
||||
|
||||
HSteamUser hSteamUser = SteamAPI_GetHSteamUser();
|
||||
HSteamPipe hSteamPipe = SteamAPI_GetHSteamPipe();
|
||||
|
||||
m_pSteamUser = SteamClient()->GetISteamUser( hSteamUser, hSteamPipe, STEAMUSER_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUser )
|
||||
return false;
|
||||
|
||||
m_pSteamFriends = SteamClient()->GetISteamFriends( hSteamUser, hSteamPipe, STEAMFRIENDS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamFriends )
|
||||
return false;
|
||||
|
||||
m_pSteamUtils = SteamClient()->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUtils )
|
||||
return false;
|
||||
|
||||
m_pSteamMatchmaking = SteamClient()->GetISteamMatchmaking( hSteamUser, hSteamPipe, STEAMMATCHMAKING_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMatchmaking )
|
||||
return false;
|
||||
|
||||
m_pSteamMatchmakingServers = SteamClient()->GetISteamMatchmakingServers( hSteamUser, hSteamPipe, STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMatchmakingServers )
|
||||
return false;
|
||||
|
||||
m_pSteamUserStats = SteamClient()->GetISteamUserStats( hSteamUser, hSteamPipe, STEAMUSERSTATS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUserStats )
|
||||
return false;
|
||||
|
||||
m_pSteamApps = SteamClient()->GetISteamApps( hSteamUser, hSteamPipe, STEAMAPPS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamApps )
|
||||
return false;
|
||||
|
||||
m_pSteamNetworking = SteamClient()->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION );
|
||||
if ( !m_pSteamNetworking )
|
||||
return false;
|
||||
|
||||
m_pSteamRemoteStorage = SteamClient()->GetISteamRemoteStorage( hSteamUser, hSteamPipe, STEAMREMOTESTORAGE_INTERFACE_VERSION );
|
||||
if ( !m_pSteamRemoteStorage )
|
||||
return false;
|
||||
|
||||
m_pSteamScreenshots = SteamClient()->GetISteamScreenshots( hSteamUser, hSteamPipe, STEAMSCREENSHOTS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamScreenshots )
|
||||
return false;
|
||||
|
||||
m_pSteamHTTP = SteamClient()->GetISteamHTTP( hSteamUser, hSteamPipe, STEAMHTTP_INTERFACE_VERSION );
|
||||
if ( !m_pSteamHTTP )
|
||||
return false;
|
||||
|
||||
m_pSteamUnifiedMessages = SteamClient()->GetISteamUnifiedMessages( hSteamUser, hSteamPipe, STEAMUNIFIEDMESSAGES_INTERFACE_VERSION );
|
||||
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;
|
||||
}
|
||||
|
||||
m_pSteamMusicRemote = SteamClient()->GetISteamMusicRemote( hSteamUser, hSteamPipe, STEAMMUSICREMOTE_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMusicRemote )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_pSteamHTMLSurface = SteamClient()->GetISteamHTMLSurface( hSteamUser, hSteamPipe, STEAMHTMLSURFACE_INTERFACE_VERSION );
|
||||
if ( !m_pSteamHTMLSurface )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_pSteamInventory = SteamClient()->GetISteamInventory( hSteamUser, hSteamPipe, STEAMINVENTORY_INTERFACE_VERSION );
|
||||
if ( !m_pSteamInventory )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_pSteamVideo = SteamClient()->GetISteamVideo( hSteamUser, hSteamPipe, STEAMVIDEO_INTERFACE_VERSION );
|
||||
if ( !m_pSteamVideo )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef _PS3
|
||||
m_pSteamPS3OverlayRender = SteamClient()->GetISteamPS3OverlayRender();
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#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 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
|
||||
#include "steam_api_internal.h"
|
||||
|
||||
#endif // STEAM_API_H
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,135 @@
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
typedef short int16;
|
||||
typedef unsigned short uint16;
|
||||
typedef int int32;
|
||||
typedef unsigned int uint32;
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
typedef int64 lint64;
|
||||
typedef uint64 ulint64;
|
||||
typedef uint8 Salt_t[8];
|
||||
typedef uint64 GID_t;
|
||||
typedef uint64 JobID_t;
|
||||
typedef GID_t TxnID_t;
|
||||
typedef uint32 PackageId_t;
|
||||
typedef uint32 BundleId_t;
|
||||
typedef uint32 AppId_t;
|
||||
typedef uint64 AssetClassId_t;
|
||||
typedef uint32 PhysicalItemId_t;
|
||||
typedef uint32 DepotId_t;
|
||||
typedef uint32 RTime32;
|
||||
typedef uint32 CellID_t;
|
||||
typedef uint64 SteamAPICall_t;
|
||||
typedef uint32 AccountID_t;
|
||||
typedef uint32 PartnerId_t;
|
||||
typedef uint64 ManifestId_t;
|
||||
typedef uint64 SiteId_t;
|
||||
typedef uint32 HAuthTicket;
|
||||
typedef void * BREAKPAD_HANDLE;
|
||||
typedef char compile_time_assert_type[1];
|
||||
typedef int32 HSteamPipe;
|
||||
typedef int32 HSteamUser;
|
||||
typedef int16 FriendsGroupID_t;
|
||||
typedef void * HServerListRequest;
|
||||
typedef int HServerQuery;
|
||||
typedef uint64 UGCHandle_t;
|
||||
typedef uint64 PublishedFileUpdateHandle_t;
|
||||
typedef uint64 PublishedFileId_t;
|
||||
typedef uint64 UGCFileWriteStreamHandle_t;
|
||||
typedef char compile_time_assert_type[1];
|
||||
typedef uint64 SteamLeaderboard_t;
|
||||
typedef uint64 SteamLeaderboardEntries_t;
|
||||
typedef uint32 SNetSocket_t;
|
||||
typedef uint32 SNetListenSocket_t;
|
||||
typedef uint32 ScreenshotHandle;
|
||||
typedef uint32 HTTPRequestHandle;
|
||||
typedef uint32 HTTPCookieContainerHandle;
|
||||
typedef uint64 ControllerHandle_t;
|
||||
typedef uint64 ControllerActionSetHandle_t;
|
||||
typedef uint64 ControllerDigitalActionHandle_t;
|
||||
typedef uint64 ControllerAnalogActionHandle_t;
|
||||
typedef uint64 UGCQueryHandle_t;
|
||||
typedef uint64 UGCUpdateHandle_t;
|
||||
typedef uint32 HHTMLBrowser;
|
||||
typedef uint64 SteamItemInstanceID_t;
|
||||
typedef int32 SteamItemDef_t;
|
||||
typedef int32 SteamInventoryResult_t;
|
||||
typedef uint64 SteamInventoryUpdateHandle_t;
|
||||
// OpenVR Constants
|
||||
int const_k_iSteamUserCallbacks = 100;
|
||||
int const_k_iSteamGameServerCallbacks = 200;
|
||||
int const_k_iSteamFriendsCallbacks = 300;
|
||||
int const_k_iSteamBillingCallbacks = 400;
|
||||
int const_k_iSteamMatchmakingCallbacks = 500;
|
||||
int const_k_iSteamContentServerCallbacks = 600;
|
||||
int const_k_iSteamUtilsCallbacks = 700;
|
||||
int const_k_iClientFriendsCallbacks = 800;
|
||||
int const_k_iClientUserCallbacks = 900;
|
||||
int const_k_iSteamAppsCallbacks = 1000;
|
||||
int const_k_iSteamUserStatsCallbacks = 1100;
|
||||
int const_k_iSteamNetworkingCallbacks = 1200;
|
||||
int const_k_iClientRemoteStorageCallbacks = 1300;
|
||||
int const_k_iClientDepotBuilderCallbacks = 1400;
|
||||
int const_k_iSteamGameServerItemsCallbacks = 1500;
|
||||
int const_k_iClientUtilsCallbacks = 1600;
|
||||
int const_k_iSteamGameCoordinatorCallbacks = 1700;
|
||||
int const_k_iSteamGameServerStatsCallbacks = 1800;
|
||||
int const_k_iSteam2AsyncCallbacks = 1900;
|
||||
int const_k_iSteamGameStatsCallbacks = 2000;
|
||||
int const_k_iClientHTTPCallbacks = 2100;
|
||||
int const_k_iClientScreenshotsCallbacks = 2200;
|
||||
int const_k_iSteamScreenshotsCallbacks = 2300;
|
||||
int const_k_iClientAudioCallbacks = 2400;
|
||||
int const_k_iClientUnifiedMessagesCallbacks = 2500;
|
||||
int const_k_iSteamStreamLauncherCallbacks = 2600;
|
||||
int const_k_iClientControllerCallbacks = 2700;
|
||||
int const_k_iSteamControllerCallbacks = 2800;
|
||||
int const_k_iClientParentalSettingsCallbacks = 2900;
|
||||
int const_k_iClientDeviceAuthCallbacks = 3000;
|
||||
int const_k_iClientNetworkDeviceManagerCallbacks = 3100;
|
||||
int const_k_iClientMusicCallbacks = 3200;
|
||||
int const_k_iClientRemoteClientManagerCallbacks = 3300;
|
||||
int const_k_iClientUGCCallbacks = 3400;
|
||||
int const_k_iSteamStreamClientCallbacks = 3500;
|
||||
int const_k_IClientProductBuilderCallbacks = 3600;
|
||||
int const_k_iClientShortcutsCallbacks = 3700;
|
||||
int const_k_iClientRemoteControlManagerCallbacks = 3800;
|
||||
int const_k_iSteamAppListCallbacks = 3900;
|
||||
int const_k_iSteamMusicCallbacks = 4000;
|
||||
int const_k_iSteamMusicRemoteCallbacks = 4100;
|
||||
int const_k_iClientVRCallbacks = 4200;
|
||||
int const_k_iClientGameNotificationCallbacks = 4300;
|
||||
int const_k_iSteamGameNotificationCallbacks = 4400;
|
||||
int const_k_iSteamHTMLSurfaceCallbacks = 4500;
|
||||
int const_k_iClientVideoCallbacks = 4600;
|
||||
int const_k_iClientInventoryCallbacks = 4700;
|
||||
int const_k_iClientBluetoothManagerCallbacks = 4800;
|
||||
int const_k_iClientSharedConnectionCallbacks = 4900;
|
||||
int const_k_ISteamParentalSettingsCallbacks = 5000;
|
||||
int const_k_iClientShaderCallbacks = 5100;
|
||||
int const_k_cchPersonaNameMax = 128;
|
||||
int const_k_cwchPersonaNameMax = 32;
|
||||
int const_k_cchMaxRichPresenceKeys = 20;
|
||||
int const_k_cchMaxRichPresenceKeyLength = 64;
|
||||
int const_k_cchMaxRichPresenceValueLength = 256;
|
||||
int const_k_cchStatNameMax = 128;
|
||||
int const_k_cchLeaderboardNameMax = 128;
|
||||
int const_k_cLeaderboardDetailsMax = 64;
|
||||
unsigned long const_k_SteamItemInstanceIDInvalid = 0xffffffff;
|
||||
int const_k_SteamInventoryResultInvalid = -1;
|
||||
|
||||
|
||||
|
||||
// OpenVR Enums
|
||||
// OpenVR Structs
|
||||
|
||||
|
||||
|
||||
S_API HSteamPipe SteamAPI_ISteamClient_CreateSteamPipe(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamClient_BReleaseSteamPipe(intptr_t instancePtr, HSteamPipe hSteamPipe);
|
||||
S_API HSteamUser SteamAPI_ISteamClient_ConnectToGlobalUser(intptr_t instancePtr, HSteamPipe hSteamPipe);
|
||||
@ -33,23 +162,19 @@ S_API class ISteamApps * SteamAPI_ISteamClient_GetISteamApps(intptr_t instancePt
|
||||
S_API class ISteamNetworking * SteamAPI_ISteamClient_GetISteamNetworking(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamRemoteStorage * SteamAPI_ISteamClient_GetISteamRemoteStorage(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamScreenshots * SteamAPI_ISteamClient_GetISteamScreenshots(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API void SteamAPI_ISteamClient_RunFrame(intptr_t instancePtr);
|
||||
S_API uint32 SteamAPI_ISteamClient_GetIPCCallCount(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamClient_SetWarningMessageHook(intptr_t instancePtr, SteamAPIWarningMessageHook_t pFunction);
|
||||
S_API bool SteamAPI_ISteamClient_BShutdownIfAllPipesClosed(intptr_t instancePtr);
|
||||
S_API class ISteamHTTP * SteamAPI_ISteamClient_GetISteamHTTP(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamUnifiedMessages * SteamAPI_ISteamClient_GetISteamUnifiedMessages(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamController * SteamAPI_ISteamClient_GetISteamController(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamUGC * SteamAPI_ISteamClient_GetISteamUGC(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamAppList * SteamAPI_ISteamClient_GetISteamAppList(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamMusic * SteamAPI_ISteamClient_GetISteamMusic(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamMusicRemote * SteamAPI_ISteamClient_GetISteamMusicRemote(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamHTMLSurface * SteamAPI_ISteamClient_GetISteamHTMLSurface(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API void SteamAPI_ISteamClient_Set_SteamAPI_CPostAPIResultInProcess(intptr_t instancePtr, SteamAPI_PostAPIResultInProcess_t func);
|
||||
S_API void SteamAPI_ISteamClient_Remove_SteamAPI_CPostAPIResultInProcess(intptr_t instancePtr, SteamAPI_PostAPIResultInProcess_t func);
|
||||
S_API void SteamAPI_ISteamClient_Set_SteamAPI_CCheckCallbackRegisteredInProcess(intptr_t instancePtr, SteamAPI_CheckCallbackRegistered_t func);
|
||||
S_API class ISteamInventory * SteamAPI_ISteamClient_GetISteamInventory(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamVideo * SteamAPI_ISteamClient_GetISteamVideo(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API class ISteamParentalSettings * SteamAPI_ISteamClient_GetISteamParentalSettings(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
|
||||
S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamUser_BLoggedOn(intptr_t instancePtr);
|
||||
S_API uint64 SteamAPI_ISteamUser_GetSteamID(intptr_t instancePtr);
|
||||
@ -59,8 +184,8 @@ S_API void SteamAPI_ISteamUser_TrackAppUsageEvent(intptr_t instancePtr, class CG
|
||||
S_API bool SteamAPI_ISteamUser_GetUserDataFolder(intptr_t instancePtr, char * pchBuffer, int cubBuffer);
|
||||
S_API void SteamAPI_ISteamUser_StartVoiceRecording(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamUser_StopVoiceRecording(intptr_t instancePtr);
|
||||
S_API EVoiceResult SteamAPI_ISteamUser_GetAvailableVoice(intptr_t instancePtr, uint32 * pcbCompressed, uint32 * pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate);
|
||||
S_API EVoiceResult SteamAPI_ISteamUser_GetVoice(intptr_t instancePtr, bool bWantCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, bool bWantUncompressed, void * pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 * nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate);
|
||||
S_API EVoiceResult SteamAPI_ISteamUser_GetAvailableVoice(intptr_t instancePtr, uint32 * pcbCompressed, uint32 * pcbUncompressed_Deprecated, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated);
|
||||
S_API EVoiceResult SteamAPI_ISteamUser_GetVoice(intptr_t instancePtr, bool bWantCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, bool bWantUncompressed_Deprecated, void * pUncompressedDestBuffer_Deprecated, uint32 cbUncompressedDestBufferSize_Deprecated, uint32 * nUncompressBytesWritten_Deprecated, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated);
|
||||
S_API EVoiceResult SteamAPI_ISteamUser_DecompressVoice(intptr_t instancePtr, const void * pCompressed, uint32 cbCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, uint32 nDesiredSampleRate);
|
||||
S_API uint32 SteamAPI_ISteamUser_GetVoiceOptimalSampleRate(intptr_t instancePtr);
|
||||
S_API HAuthTicket SteamAPI_ISteamUser_GetAuthSessionTicket(intptr_t instancePtr, void * pTicket, int cbMaxTicket, uint32 * pcbTicket);
|
||||
@ -75,6 +200,10 @@ S_API bool SteamAPI_ISteamUser_GetEncryptedAppTicket(intptr_t instancePtr, void
|
||||
S_API int SteamAPI_ISteamUser_GetGameBadgeLevel(intptr_t instancePtr, int nSeries, bool bFoil);
|
||||
S_API int SteamAPI_ISteamUser_GetPlayerSteamLevel(intptr_t instancePtr);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUser_RequestStoreAuthURL(intptr_t instancePtr, const char * pchRedirectURL);
|
||||
S_API bool SteamAPI_ISteamUser_BIsPhoneVerified(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamUser_BIsTwoFactorEnabled(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamUser_BIsPhoneIdentifying(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamUser_BIsPhoneRequiringVerification(intptr_t instancePtr);
|
||||
S_API const char * SteamAPI_ISteamFriends_GetPersonaName(intptr_t instancePtr);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamFriends_SetPersonaName(intptr_t instancePtr, const char * pchPersonaName);
|
||||
S_API EPersonaState SteamAPI_ISteamFriends_GetPersonaState(intptr_t instancePtr);
|
||||
@ -145,6 +274,8 @@ S_API int SteamAPI_ISteamFriends_GetFriendMessage(intptr_t instancePtr, class CS
|
||||
S_API SteamAPICall_t SteamAPI_ISteamFriends_GetFollowerCount(intptr_t instancePtr, class CSteamID steamID);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamFriends_IsFollowing(intptr_t instancePtr, class CSteamID steamID);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamFriends_EnumerateFollowingList(intptr_t instancePtr, uint32 unStartIndex);
|
||||
S_API bool SteamAPI_ISteamFriends_IsClanPublic(intptr_t instancePtr, class CSteamID steamIDClan);
|
||||
S_API bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup(intptr_t instancePtr, class CSteamID steamIDClan);
|
||||
S_API uint32 SteamAPI_ISteamUtils_GetSecondsSinceAppActive(intptr_t instancePtr);
|
||||
S_API uint32 SteamAPI_ISteamUtils_GetSecondsSinceComputerActive(intptr_t instancePtr);
|
||||
S_API EUniverse SteamAPI_ISteamUtils_GetConnectedUniverse(intptr_t instancePtr);
|
||||
@ -159,7 +290,6 @@ S_API void SteamAPI_ISteamUtils_SetOverlayNotificationPosition(intptr_t instance
|
||||
S_API bool SteamAPI_ISteamUtils_IsAPICallCompleted(intptr_t instancePtr, SteamAPICall_t hSteamAPICall, bool * pbFailed);
|
||||
S_API ESteamAPICallFailure SteamAPI_ISteamUtils_GetAPICallFailureReason(intptr_t instancePtr, SteamAPICall_t hSteamAPICall);
|
||||
S_API bool SteamAPI_ISteamUtils_GetAPICallResult(intptr_t instancePtr, SteamAPICall_t hSteamAPICall, void * pCallback, int cubCallback, int iCallbackExpected, bool * pbFailed);
|
||||
S_API void SteamAPI_ISteamUtils_RunFrame(intptr_t instancePtr);
|
||||
S_API uint32 SteamAPI_ISteamUtils_GetIPCCallCount(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamUtils_SetWarningMessageHook(intptr_t instancePtr, SteamAPIWarningMessageHook_t pFunction);
|
||||
S_API bool SteamAPI_ISteamUtils_IsOverlayEnabled(intptr_t instancePtr);
|
||||
@ -171,6 +301,10 @@ S_API bool SteamAPI_ISteamUtils_GetEnteredGamepadTextInput(intptr_t instancePtr,
|
||||
S_API const char * SteamAPI_ISteamUtils_GetSteamUILanguage(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamUtils_IsSteamRunningInVR(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamUtils_SetOverlayNotificationInset(intptr_t instancePtr, int nHorizontalInset, int nVerticalInset);
|
||||
S_API bool SteamAPI_ISteamUtils_IsSteamInBigPictureMode(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamUtils_StartVRDashboard(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamUtils_IsVRHeadsetStreamingEnabled(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled(intptr_t instancePtr, bool bEnabled);
|
||||
S_API int SteamAPI_ISteamMatchmaking_GetFavoriteGameCount(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamMatchmaking_GetFavoriteGame(intptr_t instancePtr, int iGame, AppId_t * pnAppID, uint32 * pnIP, uint16 * pnConnPort, uint16 * pnQueryPort, uint32 * punFlags, uint32 * pRTime32LastPlayedOnServer);
|
||||
S_API int SteamAPI_ISteamMatchmaking_AddFavoriteGame(intptr_t instancePtr, AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer);
|
||||
@ -257,7 +391,7 @@ S_API int64 SteamAPI_ISteamRemoteStorage_GetFileTimestamp(intptr_t instancePtr,
|
||||
S_API ERemoteStoragePlatform SteamAPI_ISteamRemoteStorage_GetSyncPlatforms(intptr_t instancePtr, const char * pchFile);
|
||||
S_API int32 SteamAPI_ISteamRemoteStorage_GetFileCount(intptr_t instancePtr);
|
||||
S_API const char * SteamAPI_ISteamRemoteStorage_GetFileNameAndSize(intptr_t instancePtr, int iFile, int32 * pnFileSizeInBytes);
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_GetQuota(intptr_t instancePtr, int32 * pnTotalBytes, int32 * puAvailableBytes);
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_GetQuota(intptr_t instancePtr, uint64 * pnTotalBytes, uint64 * puAvailableBytes);
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp(intptr_t instancePtr, bool bEnabled);
|
||||
@ -359,6 +493,8 @@ S_API uint64 SteamAPI_ISteamApps_GetAppOwner(intptr_t instancePtr);
|
||||
S_API const char * SteamAPI_ISteamApps_GetLaunchQueryParam(intptr_t instancePtr, const char * pchKey);
|
||||
S_API bool SteamAPI_ISteamApps_GetDlcDownloadProgress(intptr_t instancePtr, AppId_t nAppID, uint64 * punBytesDownloaded, uint64 * punBytesTotal);
|
||||
S_API int SteamAPI_ISteamApps_GetAppBuildId(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys(intptr_t instancePtr);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamApps_GetFileDetails(intptr_t instancePtr, const char * pszFileName);
|
||||
S_API bool SteamAPI_ISteamNetworking_SendP2PPacket(intptr_t instancePtr, class CSteamID steamIDRemote, const void * pubData, uint32 cubData, EP2PSend eP2PSendType, int nChannel);
|
||||
S_API bool SteamAPI_ISteamNetworking_IsP2PPacketAvailable(intptr_t instancePtr, uint32 * pcubMsgSize, int nChannel);
|
||||
S_API bool SteamAPI_ISteamNetworking_ReadP2PPacket(intptr_t instancePtr, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize, class CSteamID * psteamIDRemote, int nChannel);
|
||||
@ -388,6 +524,8 @@ S_API void SteamAPI_ISteamScreenshots_HookScreenshots(intptr_t instancePtr, bool
|
||||
S_API bool SteamAPI_ISteamScreenshots_SetLocation(intptr_t instancePtr, ScreenshotHandle hScreenshot, const char * pchLocation);
|
||||
S_API bool SteamAPI_ISteamScreenshots_TagUser(intptr_t instancePtr, ScreenshotHandle hScreenshot, class CSteamID steamID);
|
||||
S_API bool SteamAPI_ISteamScreenshots_TagPublishedFile(intptr_t instancePtr, ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID);
|
||||
S_API bool SteamAPI_ISteamScreenshots_IsScreenshotsHooked(intptr_t instancePtr);
|
||||
S_API ScreenshotHandle SteamAPI_ISteamScreenshots_AddVRScreenshotToLibrary(intptr_t instancePtr, EVRScreenshotType eType, const char * pchFilename, const char * pchVRFilename);
|
||||
S_API bool SteamAPI_ISteamMusic_BIsEnabled(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamMusic_BIsPlaying(intptr_t instancePtr);
|
||||
S_API AudioPlayback_Status SteamAPI_ISteamMusic_GetPlaybackStatus(intptr_t instancePtr);
|
||||
@ -454,11 +592,6 @@ S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo(intptr_t instancePtr,
|
||||
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(intptr_t instancePtr, HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate);
|
||||
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(intptr_t instancePtr, HTTPRequestHandle hRequest, uint32 unMilliseconds);
|
||||
S_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(intptr_t instancePtr, HTTPRequestHandle hRequest, bool * pbWasTimedOut);
|
||||
S_API ClientUnifiedMessageHandle SteamAPI_ISteamUnifiedMessages_SendMethod(intptr_t instancePtr, const char * pchServiceMethod, const void * pRequestBuffer, uint32 unRequestBufferSize, uint64 unContext);
|
||||
S_API bool SteamAPI_ISteamUnifiedMessages_GetMethodResponseInfo(intptr_t instancePtr, ClientUnifiedMessageHandle hHandle, uint32 * punResponseSize, EResult * peResult);
|
||||
S_API bool SteamAPI_ISteamUnifiedMessages_GetMethodResponseData(intptr_t instancePtr, ClientUnifiedMessageHandle hHandle, void * pResponseBuffer, uint32 unResponseBufferSize, bool bAutoRelease);
|
||||
S_API bool SteamAPI_ISteamUnifiedMessages_ReleaseMethod(intptr_t instancePtr, ClientUnifiedMessageHandle hHandle);
|
||||
S_API bool SteamAPI_ISteamUnifiedMessages_SendNotification(intptr_t instancePtr, const char * pchServiceNotification, const void * pNotificationBuffer, uint32 unNotificationBufferSize);
|
||||
S_API bool SteamAPI_ISteamController_Init(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamController_Shutdown(intptr_t instancePtr);
|
||||
S_API void SteamAPI_ISteamController_RunFrame(intptr_t instancePtr);
|
||||
@ -467,6 +600,10 @@ S_API bool SteamAPI_ISteamController_ShowBindingPanel(intptr_t instancePtr, Cont
|
||||
S_API ControllerActionSetHandle_t SteamAPI_ISteamController_GetActionSetHandle(intptr_t instancePtr, const char * pszActionSetName);
|
||||
S_API void SteamAPI_ISteamController_ActivateActionSet(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle);
|
||||
S_API ControllerActionSetHandle_t SteamAPI_ISteamController_GetCurrentActionSet(intptr_t instancePtr, ControllerHandle_t controllerHandle);
|
||||
S_API void SteamAPI_ISteamController_ActivateActionSetLayer(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle);
|
||||
S_API void SteamAPI_ISteamController_DeactivateActionSetLayer(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle);
|
||||
S_API void SteamAPI_ISteamController_DeactivateAllActionSetLayers(intptr_t instancePtr, ControllerHandle_t controllerHandle);
|
||||
S_API int SteamAPI_ISteamController_GetActiveActionSetLayers(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t * handlesOut);
|
||||
S_API ControllerDigitalActionHandle_t SteamAPI_ISteamController_GetDigitalActionHandle(intptr_t instancePtr, const char * pszActionName);
|
||||
S_API struct ControllerDigitalActionData_t SteamAPI_ISteamController_GetDigitalActionData(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle);
|
||||
S_API int SteamAPI_ISteamController_GetDigitalActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin * originsOut);
|
||||
@ -475,6 +612,17 @@ S_API struct ControllerAnalogActionData_t SteamAPI_ISteamController_GetAnalogAct
|
||||
S_API int SteamAPI_ISteamController_GetAnalogActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin * originsOut);
|
||||
S_API void SteamAPI_ISteamController_StopAnalogActionMomentum(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction);
|
||||
S_API void SteamAPI_ISteamController_TriggerHapticPulse(intptr_t instancePtr, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec);
|
||||
S_API void SteamAPI_ISteamController_TriggerRepeatedHapticPulse(intptr_t instancePtr, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags);
|
||||
S_API void SteamAPI_ISteamController_TriggerVibration(intptr_t instancePtr, ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed);
|
||||
S_API void SteamAPI_ISteamController_SetLEDColor(intptr_t instancePtr, ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags);
|
||||
S_API int SteamAPI_ISteamController_GetGamepadIndexForController(intptr_t instancePtr, ControllerHandle_t ulControllerHandle);
|
||||
S_API ControllerHandle_t SteamAPI_ISteamController_GetControllerForGamepadIndex(intptr_t instancePtr, int nIndex);
|
||||
S_API struct ControllerMotionData_t SteamAPI_ISteamController_GetMotionData(intptr_t instancePtr, ControllerHandle_t controllerHandle);
|
||||
S_API bool SteamAPI_ISteamController_ShowDigitalActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition);
|
||||
S_API bool SteamAPI_ISteamController_ShowAnalogActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition);
|
||||
S_API const char * SteamAPI_ISteamController_GetStringForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin);
|
||||
S_API const char * SteamAPI_ISteamController_GetGlyphForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin);
|
||||
S_API ESteamInputType SteamAPI_ISteamController_GetInputTypeForHandle(intptr_t instancePtr, ControllerHandle_t controllerHandle);
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest(intptr_t instancePtr, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage);
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(intptr_t instancePtr, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage);
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs);
|
||||
@ -483,20 +631,22 @@ S_API bool SteamAPI_ISteamUGC_GetQueryUGCResult(intptr_t instancePtr, UGCQueryHa
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCPreviewURL(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, char * pchURL, uint32 cchURLSize);
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCMetadata(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, char * pchMetadata, uint32 cchMetadatasize);
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCChildren(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, PublishedFileId_t * pvecPublishedFileID, uint32 cMaxEntries);
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCStatistic(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32 * pStatValue);
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCStatistic(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 * pStatValue);
|
||||
S_API uint32 SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index);
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char * pchURLOrVideoID, uint32 cchURLSize, bool * pbIsImage);
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char * pchURLOrVideoID, uint32 cchURLSize, char * pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType * pPreviewType);
|
||||
S_API uint32 SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index);
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char * pchKey, uint32 cchKeySize, char * pchValue, uint32 cchValueSize);
|
||||
S_API bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest(intptr_t instancePtr, UGCQueryHandle_t handle);
|
||||
S_API bool SteamAPI_ISteamUGC_AddRequiredTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName);
|
||||
S_API bool SteamAPI_ISteamUGC_AddExcludedTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnOnlyIDs(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnOnlyIDs);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnKeyValueTags(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnKeyValueTags);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnLongDescription(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnLongDescription);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnMetadata(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnMetadata);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnChildren(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnChildren);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnAdditionalPreviews(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnAdditionalPreviews);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnTotalOnly(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnTotalOnly);
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnPlaytimeStats(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 unDays);
|
||||
S_API bool SteamAPI_ISteamUGC_SetLanguage(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pchLanguage);
|
||||
S_API bool SteamAPI_ISteamUGC_SetAllowCachedResponse(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 unMaxAgeSeconds);
|
||||
S_API bool SteamAPI_ISteamUGC_SetCloudFileNameFilter(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pMatchCloudFileName);
|
||||
@ -517,6 +667,11 @@ S_API bool SteamAPI_ISteamUGC_SetItemContent(intptr_t instancePtr, UGCUpdateHand
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemPreview(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszPreviewFile);
|
||||
S_API bool SteamAPI_ISteamUGC_RemoveItemKeyValueTags(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchKey);
|
||||
S_API bool SteamAPI_ISteamUGC_AddItemKeyValueTag(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchKey, const char * pchValue);
|
||||
S_API bool SteamAPI_ISteamUGC_AddItemPreviewFile(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszPreviewFile, EItemPreviewType type);
|
||||
S_API bool SteamAPI_ISteamUGC_AddItemPreviewVideo(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszVideoID);
|
||||
S_API bool SteamAPI_ISteamUGC_UpdateItemPreviewFile(intptr_t instancePtr, UGCUpdateHandle_t handle, uint32 index, const char * pszPreviewFile);
|
||||
S_API bool SteamAPI_ISteamUGC_UpdateItemPreviewVideo(intptr_t instancePtr, UGCUpdateHandle_t handle, uint32 index, const char * pszVideoID);
|
||||
S_API bool SteamAPI_ISteamUGC_RemoveItemPreview(intptr_t instancePtr, UGCUpdateHandle_t handle, uint32 index);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_SubmitItemUpdate(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchChangeNote);
|
||||
S_API EItemUpdateStatus SteamAPI_ISteamUGC_GetItemUpdateProgress(intptr_t instancePtr, UGCUpdateHandle_t handle, uint64 * punBytesProcessed, uint64 * punBytesTotal);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_SetUserItemVote(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, bool bVoteUp);
|
||||
@ -533,6 +688,15 @@ S_API bool SteamAPI_ISteamUGC_GetItemDownloadInfo(intptr_t instancePtr, Publishe
|
||||
S_API bool SteamAPI_ISteamUGC_DownloadItem(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, bool bHighPriority);
|
||||
S_API bool SteamAPI_ISteamUGC_BInitWorkshopForGameServer(intptr_t instancePtr, DepotId_t unWorkshopDepotID, const char * pszFolder);
|
||||
S_API void SteamAPI_ISteamUGC_SuspendDownloads(intptr_t instancePtr, bool bSuspend);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_StartPlaytimeTracking(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_StopPlaytimeTracking(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems(intptr_t instancePtr);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_AddDependency(intptr_t instancePtr, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveDependency(intptr_t instancePtr, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_AddAppDependency(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, AppId_t nAppID);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveAppDependency(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, AppId_t nAppID);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
|
||||
S_API uint32 SteamAPI_ISteamAppList_GetNumInstalledApps(intptr_t instancePtr);
|
||||
S_API uint32 SteamAPI_ISteamAppList_GetInstalledApps(intptr_t instancePtr, AppId_t * pvecAppID, uint32 unMaxAppIDs);
|
||||
S_API int SteamAPI_ISteamAppList_GetAppName(intptr_t instancePtr, AppId_t nAppID, char * pchName, int cchNameMax);
|
||||
@ -571,11 +735,12 @@ S_API void SteamAPI_ISteamHTMLSurface_GetLinkAtPosition(intptr_t instancePtr, HH
|
||||
S_API void SteamAPI_ISteamHTMLSurface_SetCookie(intptr_t instancePtr, const char * pchHostname, const char * pchKey, const char * pchValue, const char * pchPath, RTime32 nExpires, bool bSecure, bool bHTTPOnly);
|
||||
S_API void SteamAPI_ISteamHTMLSurface_SetPageScaleFactor(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY);
|
||||
S_API void SteamAPI_ISteamHTMLSurface_SetBackgroundMode(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bBackgroundMode);
|
||||
S_API void SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, float flDPIScaling);
|
||||
S_API void SteamAPI_ISteamHTMLSurface_AllowStartRequest(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bAllowed);
|
||||
S_API void SteamAPI_ISteamHTMLSurface_JSDialogResponse(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bResult);
|
||||
S_API void SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, const char ** pchSelectedFiles);
|
||||
S_API EResult SteamAPI_ISteamInventory_GetResultStatus(intptr_t instancePtr, SteamInventoryResult_t resultHandle);
|
||||
S_API bool SteamAPI_ISteamInventory_GetResultItems(intptr_t instancePtr, SteamInventoryResult_t resultHandle, struct SteamItemDetails_t * pOutItemsArray, uint32 * punOutItemsArraySize);
|
||||
S_API bool SteamAPI_ISteamInventory_GetResultItemProperty(intptr_t instancePtr, SteamInventoryResult_t resultHandle, uint32 unItemIndex, const char * pchPropertyName, char * pchValueBuffer, uint32 * punValueBufferSizeOut);
|
||||
S_API uint32 SteamAPI_ISteamInventory_GetResultTimestamp(intptr_t instancePtr, SteamInventoryResult_t resultHandle);
|
||||
S_API bool SteamAPI_ISteamInventory_CheckResultSteamID(intptr_t instancePtr, SteamInventoryResult_t resultHandle, class CSteamID steamIDExpected);
|
||||
S_API void SteamAPI_ISteamInventory_DestroyResult(intptr_t instancePtr, SteamInventoryResult_t resultHandle);
|
||||
@ -595,9 +760,31 @@ S_API bool SteamAPI_ISteamInventory_TriggerItemDrop(intptr_t instancePtr, SteamI
|
||||
S_API bool SteamAPI_ISteamInventory_TradeItems(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, class CSteamID steamIDTradePartner, const SteamItemInstanceID_t * pArrayGive, const uint32 * pArrayGiveQuantity, uint32 nArrayGiveLength, const SteamItemInstanceID_t * pArrayGet, const uint32 * pArrayGetQuantity, uint32 nArrayGetLength);
|
||||
S_API bool SteamAPI_ISteamInventory_LoadItemDefinitions(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamInventory_GetItemDefinitionIDs(intptr_t instancePtr, SteamItemDef_t * pItemDefIDs, uint32 * punItemDefIDsArraySize);
|
||||
S_API bool SteamAPI_ISteamInventory_GetItemDefinitionProperty(intptr_t instancePtr, SteamItemDef_t iDefinition, const char * pchPropertyName, char * pchValueBuffer, uint32 * punValueBufferSize);
|
||||
S_API bool SteamAPI_ISteamInventory_GetItemDefinitionProperty(intptr_t instancePtr, SteamItemDef_t iDefinition, const char * pchPropertyName, char * pchValueBuffer, uint32 * punValueBufferSizeOut);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(intptr_t instancePtr, class CSteamID steamID);
|
||||
S_API bool SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs(intptr_t instancePtr, class CSteamID steamID, SteamItemDef_t * pItemDefIDs, uint32 * punItemDefIDsArraySize);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamInventory_StartPurchase(intptr_t instancePtr, const SteamItemDef_t * pArrayItemDefs, const uint32 * punArrayQuantity, uint32 unArrayLength);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamInventory_RequestPrices(intptr_t instancePtr);
|
||||
S_API uint32 SteamAPI_ISteamInventory_GetNumItemsWithPrices(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamInventory_GetItemsWithPrices(intptr_t instancePtr, SteamItemDef_t * pArrayItemDefs, uint64 * pPrices, uint32 unArrayLength);
|
||||
S_API bool SteamAPI_ISteamInventory_GetItemPrice(intptr_t instancePtr, SteamItemDef_t iDefinition, uint64 * pPrice);
|
||||
S_API SteamInventoryUpdateHandle_t SteamAPI_ISteamInventory_StartUpdateProperties(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamInventory_RemoveProperty(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName);
|
||||
S_API bool SteamAPI_ISteamInventory_SetProperty(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, const char * pchPropertyValue);
|
||||
S_API bool SteamAPI_ISteamInventory_SetProperty0(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, bool bValue);
|
||||
S_API bool SteamAPI_ISteamInventory_SetProperty1(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, int64 nValue);
|
||||
S_API bool SteamAPI_ISteamInventory_SetProperty2(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, float flValue);
|
||||
S_API bool SteamAPI_ISteamInventory_SubmitUpdateProperties(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle);
|
||||
S_API void SteamAPI_ISteamVideo_GetVideoURL(intptr_t instancePtr, AppId_t unVideoAppID);
|
||||
S_API bool SteamAPI_ISteamVideo_IsBroadcasting(intptr_t instancePtr, int * pnNumViewers);
|
||||
S_API void SteamAPI_ISteamVideo_GetOPFSettings(intptr_t instancePtr, AppId_t unVideoAppID);
|
||||
S_API bool SteamAPI_ISteamVideo_GetOPFStringForApp(intptr_t instancePtr, AppId_t unVideoAppID, char * pchBuffer, int32 * pnBufferSize);
|
||||
S_API bool SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamParentalSettings_BIsParentalLockLocked(intptr_t instancePtr);
|
||||
S_API bool SteamAPI_ISteamParentalSettings_BIsAppBlocked(intptr_t instancePtr, AppId_t nAppID);
|
||||
S_API bool SteamAPI_ISteamParentalSettings_BIsAppInBlockList(intptr_t instancePtr, AppId_t nAppID);
|
||||
S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureBlocked(intptr_t instancePtr, EParentalFeature eFeature);
|
||||
S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList(intptr_t instancePtr, EParentalFeature eFeature);
|
||||
S_API bool SteamAPI_ISteamGameServer_InitGameServer(intptr_t instancePtr, uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char * pchVersionString);
|
||||
S_API void SteamAPI_ISteamGameServer_SetProduct(intptr_t instancePtr, const char * pszProduct);
|
||||
S_API void SteamAPI_ISteamGameServer_SetGameDescription(intptr_t instancePtr, const char * pszGameDescription);
|
||||
|
328
public/steam/steam_api_internal.h
Normal file
328
public/steam/steam_api_internal.h
Normal file
@ -0,0 +1,328 @@
|
||||
//====== Copyright 1996-2015, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: Internal private Steamworks API declarations and definitions
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef STEAM_API_INTERNAL_H
|
||||
#define STEAM_API_INTERNAL_H
|
||||
|
||||
S_API HSteamUser SteamAPI_GetHSteamUser();
|
||||
S_API void * S_CALLTYPE SteamInternal_ContextInit( void *pContextInitData );
|
||||
S_API void * S_CALLTYPE SteamInternal_CreateInterface( const char *ver );
|
||||
|
||||
#if !defined( STEAM_API_EXPORTS )
|
||||
|
||||
inline void S_CALLTYPE SteamInternal_OnContextInit( void* p )
|
||||
{
|
||||
((CSteamAPIContext*)p)->Clear();
|
||||
if ( SteamAPI_GetHSteamPipe() )
|
||||
((CSteamAPIContext*)p)->Init();
|
||||
}
|
||||
inline CSteamAPIContext& SteamInternal_ModuleContext()
|
||||
{
|
||||
// SteamInternal_ContextInit takes a base pointer for the equivalent of
|
||||
// struct { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; }
|
||||
// Do not change layout of 2 + sizeof... or add non-pointer aligned data!
|
||||
// NOTE: declaring "static CSteamAPIConext" creates a large function
|
||||
// which queries the initialization status of the object. We know that
|
||||
// it is pointer-aligned and fully memset with zeros, so just alias a
|
||||
// static buffer of the appropriate size and call it a CSteamAPIContext.
|
||||
static void* s_CallbackCounterAndContext[ 2 + sizeof(CSteamAPIContext)/sizeof(void*) ] = { (void*)&SteamInternal_OnContextInit, 0 };
|
||||
return *(CSteamAPIContext*)SteamInternal_ContextInit( s_CallbackCounterAndContext );
|
||||
}
|
||||
|
||||
inline ISteamClient *SteamClient() { return SteamInternal_ModuleContext().SteamClient(); }
|
||||
inline ISteamUser *SteamUser() { return SteamInternal_ModuleContext().SteamUser(); }
|
||||
inline ISteamFriends *SteamFriends() { return SteamInternal_ModuleContext().SteamFriends(); }
|
||||
inline ISteamUtils *SteamUtils() { return SteamInternal_ModuleContext().SteamUtils(); }
|
||||
inline ISteamMatchmaking *SteamMatchmaking() { return SteamInternal_ModuleContext().SteamMatchmaking(); }
|
||||
inline ISteamUserStats *SteamUserStats() { return SteamInternal_ModuleContext().SteamUserStats(); }
|
||||
inline ISteamApps *SteamApps() { return SteamInternal_ModuleContext().SteamApps(); }
|
||||
inline ISteamMatchmakingServers *SteamMatchmakingServers() { return SteamInternal_ModuleContext().SteamMatchmakingServers(); }
|
||||
inline ISteamNetworking *SteamNetworking() { return SteamInternal_ModuleContext().SteamNetworking(); }
|
||||
inline ISteamRemoteStorage *SteamRemoteStorage() { return SteamInternal_ModuleContext().SteamRemoteStorage(); }
|
||||
inline ISteamScreenshots *SteamScreenshots() { return SteamInternal_ModuleContext().SteamScreenshots(); }
|
||||
inline ISteamHTTP *SteamHTTP() { return SteamInternal_ModuleContext().SteamHTTP(); }
|
||||
inline ISteamController *SteamController() { return SteamInternal_ModuleContext().SteamController(); }
|
||||
inline ISteamUGC *SteamUGC() { return SteamInternal_ModuleContext().SteamUGC(); }
|
||||
inline ISteamAppList *SteamAppList() { return SteamInternal_ModuleContext().SteamAppList(); }
|
||||
inline ISteamMusic *SteamMusic() { return SteamInternal_ModuleContext().SteamMusic(); }
|
||||
inline ISteamMusicRemote *SteamMusicRemote() { return SteamInternal_ModuleContext().SteamMusicRemote(); }
|
||||
inline ISteamHTMLSurface *SteamHTMLSurface() { return SteamInternal_ModuleContext().SteamHTMLSurface(); }
|
||||
inline ISteamInventory *SteamInventory() { return SteamInternal_ModuleContext().SteamInventory(); }
|
||||
inline ISteamVideo *SteamVideo() { return SteamInternal_ModuleContext().SteamVideo(); }
|
||||
inline ISteamParentalSettings *SteamParentalSettings() { return SteamInternal_ModuleContext().SteamParentalSettings(); }
|
||||
|
||||
#endif // !defined( STEAM_API_EXPORTS )
|
||||
|
||||
|
||||
inline void CSteamAPIContext::Clear()
|
||||
{
|
||||
m_pSteamClient = NULL;
|
||||
m_pSteamUser = NULL;
|
||||
m_pSteamFriends = NULL;
|
||||
m_pSteamUtils = NULL;
|
||||
m_pSteamMatchmaking = NULL;
|
||||
m_pSteamUserStats = NULL;
|
||||
m_pSteamApps = NULL;
|
||||
m_pSteamMatchmakingServers = NULL;
|
||||
m_pSteamNetworking = NULL;
|
||||
m_pSteamRemoteStorage = NULL;
|
||||
m_pSteamHTTP = NULL;
|
||||
m_pSteamScreenshots = NULL;
|
||||
m_pSteamMusic = NULL;
|
||||
m_pController = NULL;
|
||||
m_pSteamUGC = NULL;
|
||||
m_pSteamAppList = NULL;
|
||||
m_pSteamMusic = NULL;
|
||||
m_pSteamMusicRemote = NULL;
|
||||
m_pSteamHTMLSurface = NULL;
|
||||
m_pSteamInventory = NULL;
|
||||
m_pSteamVideo = NULL;
|
||||
m_pSteamParentalSettings = NULL;
|
||||
}
|
||||
|
||||
|
||||
// This function must be declared inline in the header so the module using steam_api.dll gets the version names they want.
|
||||
inline bool CSteamAPIContext::Init()
|
||||
{
|
||||
HSteamUser hSteamUser = SteamAPI_GetHSteamUser();
|
||||
HSteamPipe hSteamPipe = SteamAPI_GetHSteamPipe();
|
||||
if ( !hSteamPipe )
|
||||
return false;
|
||||
|
||||
m_pSteamClient = (ISteamClient*) SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION );
|
||||
if ( !m_pSteamClient )
|
||||
return false;
|
||||
|
||||
m_pSteamUser = m_pSteamClient->GetISteamUser( hSteamUser, hSteamPipe, STEAMUSER_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUser )
|
||||
return false;
|
||||
|
||||
m_pSteamFriends = m_pSteamClient->GetISteamFriends( hSteamUser, hSteamPipe, STEAMFRIENDS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamFriends )
|
||||
return false;
|
||||
|
||||
m_pSteamUtils = m_pSteamClient->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUtils )
|
||||
return false;
|
||||
|
||||
m_pSteamMatchmaking = m_pSteamClient->GetISteamMatchmaking( hSteamUser, hSteamPipe, STEAMMATCHMAKING_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMatchmaking )
|
||||
return false;
|
||||
|
||||
m_pSteamMatchmakingServers = m_pSteamClient->GetISteamMatchmakingServers( hSteamUser, hSteamPipe, STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMatchmakingServers )
|
||||
return false;
|
||||
|
||||
m_pSteamUserStats = m_pSteamClient->GetISteamUserStats( hSteamUser, hSteamPipe, STEAMUSERSTATS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUserStats )
|
||||
return false;
|
||||
|
||||
m_pSteamApps = m_pSteamClient->GetISteamApps( hSteamUser, hSteamPipe, STEAMAPPS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamApps )
|
||||
return false;
|
||||
|
||||
m_pSteamNetworking = m_pSteamClient->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION );
|
||||
if ( !m_pSteamNetworking )
|
||||
return false;
|
||||
|
||||
m_pSteamRemoteStorage = m_pSteamClient->GetISteamRemoteStorage( hSteamUser, hSteamPipe, STEAMREMOTESTORAGE_INTERFACE_VERSION );
|
||||
if ( !m_pSteamRemoteStorage )
|
||||
return false;
|
||||
|
||||
m_pSteamScreenshots = m_pSteamClient->GetISteamScreenshots( hSteamUser, hSteamPipe, STEAMSCREENSHOTS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamScreenshots )
|
||||
return false;
|
||||
|
||||
m_pSteamHTTP = m_pSteamClient->GetISteamHTTP( hSteamUser, hSteamPipe, STEAMHTTP_INTERFACE_VERSION );
|
||||
if ( !m_pSteamHTTP )
|
||||
return false;
|
||||
|
||||
m_pController = m_pSteamClient->GetISteamController( hSteamUser, hSteamPipe, STEAMCONTROLLER_INTERFACE_VERSION );
|
||||
if ( !m_pController )
|
||||
return false;
|
||||
|
||||
m_pSteamUGC = m_pSteamClient->GetISteamUGC( hSteamUser, hSteamPipe, STEAMUGC_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUGC )
|
||||
return false;
|
||||
|
||||
m_pSteamAppList = m_pSteamClient->GetISteamAppList( hSteamUser, hSteamPipe, STEAMAPPLIST_INTERFACE_VERSION );
|
||||
if ( !m_pSteamAppList )
|
||||
return false;
|
||||
|
||||
m_pSteamMusic = m_pSteamClient->GetISteamMusic( hSteamUser, hSteamPipe, STEAMMUSIC_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMusic )
|
||||
return false;
|
||||
|
||||
m_pSteamMusicRemote = m_pSteamClient->GetISteamMusicRemote( hSteamUser, hSteamPipe, STEAMMUSICREMOTE_INTERFACE_VERSION );
|
||||
if ( !m_pSteamMusicRemote )
|
||||
return false;
|
||||
|
||||
m_pSteamHTMLSurface = m_pSteamClient->GetISteamHTMLSurface( hSteamUser, hSteamPipe, STEAMHTMLSURFACE_INTERFACE_VERSION );
|
||||
if ( !m_pSteamHTMLSurface )
|
||||
return false;
|
||||
|
||||
m_pSteamInventory = m_pSteamClient->GetISteamInventory( hSteamUser, hSteamPipe, STEAMINVENTORY_INTERFACE_VERSION );
|
||||
if ( !m_pSteamInventory )
|
||||
return false;
|
||||
|
||||
m_pSteamVideo = m_pSteamClient->GetISteamVideo( hSteamUser, hSteamPipe, STEAMVIDEO_INTERFACE_VERSION );
|
||||
if ( !m_pSteamVideo )
|
||||
return false;
|
||||
|
||||
m_pSteamParentalSettings = m_pSteamClient->GetISteamParentalSettings( hSteamUser, hSteamPipe, STEAMPARENTALSETTINGS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamParentalSettings )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The following macros are implementation details, not intended for public use
|
||||
//-----------------------------------------------------------------------------
|
||||
#define _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param )
|
||||
#define _STEAM_CALLBACK_HELPER( _1, _2, SELECTED, ... ) _STEAM_CALLBACK_##SELECTED
|
||||
#define _STEAM_CALLBACK_SELECT( X, Y ) _STEAM_CALLBACK_HELPER X Y
|
||||
#define _STEAM_CALLBACK_3( extra_code, thisclass, func, param ) \
|
||||
struct CCallbackInternal_ ## func : private CCallbackImpl< sizeof( param ) > { \
|
||||
CCallbackInternal_ ## func () { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func ( const CCallbackInternal_ ## func & ) { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func & operator=( const CCallbackInternal_ ## func & ) { return *this; } \
|
||||
private: virtual void Run( void *pvParam ) { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \
|
||||
thisclass *pOuter = reinterpret_cast<thisclass*>( reinterpret_cast<char*>(this) - offsetof( thisclass, m_steamcallback_ ## func ) ); \
|
||||
pOuter->func( reinterpret_cast<param*>( pvParam ) ); \
|
||||
} \
|
||||
} m_steamcallback_ ## func ; void func( param *pParam )
|
||||
#define _STEAM_CALLBACK_4( _, thisclass, func, param, var ) \
|
||||
CCallback< thisclass, param > var; void func( param *pParam )
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: maps a steam async call result to a class member function
|
||||
// template params: T = local class, P = parameter struct
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P >
|
||||
inline CCallResult<T, P>::CCallResult()
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid;
|
||||
m_pObj = NULL;
|
||||
m_Func = NULL;
|
||||
m_iCallback = P::k_iCallback;
|
||||
}
|
||||
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Set( SteamAPICall_t hAPICall, T *p, func_t func )
|
||||
{
|
||||
if ( m_hAPICall )
|
||||
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
||||
|
||||
m_hAPICall = hAPICall;
|
||||
m_pObj = p;
|
||||
m_Func = func;
|
||||
|
||||
if ( hAPICall )
|
||||
SteamAPI_RegisterCallResult( this, hAPICall );
|
||||
}
|
||||
|
||||
template< class T, class P >
|
||||
inline bool CCallResult<T, P>::IsActive() const
|
||||
{
|
||||
return (m_hAPICall != k_uAPICallInvalid);
|
||||
}
|
||||
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Cancel()
|
||||
{
|
||||
if ( m_hAPICall != k_uAPICallInvalid )
|
||||
{
|
||||
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
||||
m_hAPICall = k_uAPICallInvalid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template< class T, class P >
|
||||
inline CCallResult<T, P>::~CCallResult()
|
||||
{
|
||||
Cancel();
|
||||
}
|
||||
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Run( void *pvParam )
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||
(m_pObj->*m_Func)((P *)pvParam, false);
|
||||
}
|
||||
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )
|
||||
{
|
||||
if ( hSteamAPICall == m_hAPICall )
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||
(m_pObj->*m_Func)((P *)pvParam, bIOFailure);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: maps a steam callback to a class member function
|
||||
// template params: T = local class, P = parameter struct,
|
||||
// bGameserver = listen for gameserver callbacks instead of client callbacks
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P, bool bGameserver >
|
||||
inline CCallback< T, P, bGameserver >::CCallback( T *pObj, func_t func )
|
||||
: m_pObj( NULL ), m_Func( NULL )
|
||||
{
|
||||
if ( bGameserver )
|
||||
{
|
||||
this->SetGameserverFlag();
|
||||
}
|
||||
Register( pObj, func );
|
||||
}
|
||||
|
||||
template< class T, class P, bool bGameserver >
|
||||
inline void CCallback< T, P, bGameserver >::Register( T *pObj, func_t func )
|
||||
{
|
||||
if ( !pObj || !func )
|
||||
return;
|
||||
|
||||
if ( this->m_nCallbackFlags & CCallbackBase::k_ECallbackFlagsRegistered )
|
||||
Unregister();
|
||||
|
||||
m_pObj = pObj;
|
||||
m_Func = func;
|
||||
// SteamAPI_RegisterCallback sets k_ECallbackFlagsRegistered
|
||||
SteamAPI_RegisterCallback( this, P::k_iCallback );
|
||||
}
|
||||
|
||||
template< class T, class P, bool bGameserver >
|
||||
inline void CCallback< T, P, bGameserver >::Unregister()
|
||||
{
|
||||
// SteamAPI_UnregisterCallback removes k_ECallbackFlagsRegistered
|
||||
SteamAPI_UnregisterCallback( this );
|
||||
}
|
||||
|
||||
template< class T, class P, bool bGameserver >
|
||||
inline void CCallback< T, P, bGameserver >::Run( void *pvParam )
|
||||
{
|
||||
(m_pObj->*m_Func)((P *)pvParam);
|
||||
}
|
||||
|
||||
|
||||
#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 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_INTERNAL_H
|
File diff suppressed because it is too large
Load Diff
@ -35,41 +35,82 @@ enum EServerMode
|
||||
// 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 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
#else
|
||||
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 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
#else
|
||||
S_API bool SteamGameServer_Init( const SteamPS3Params_t *ps3Params, uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
S_API ISteamGameServer *SteamGameServer();
|
||||
S_API ISteamUtils *SteamGameServerUtils();
|
||||
S_API ISteamNetworking *SteamGameServerNetworking();
|
||||
S_API ISteamGameServerStats *SteamGameServerStats();
|
||||
S_API ISteamHTTP *SteamGameServerHTTP();
|
||||
S_API ISteamInventory *SteamGameServerInventory();
|
||||
S_API ISteamUGC *SteamGameServerUGC();
|
||||
#endif
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
|
||||
S_API void SteamGameServer_Shutdown();
|
||||
S_API void SteamGameServer_RunCallbacks();
|
||||
|
||||
// Most Steam API functions allocate some amount of thread-local memory for
|
||||
// parameter storage. Calling SteamGameServer_ReleaseCurrentThreadMemory()
|
||||
// will free all API-related memory associated with the calling thread.
|
||||
// This memory is released automatically by SteamGameServer_RunCallbacks(),
|
||||
// so single-threaded servers do not need to explicitly call this function.
|
||||
inline void SteamGameServer_ReleaseCurrentThreadMemory();
|
||||
|
||||
S_API bool SteamGameServer_BSecure();
|
||||
S_API uint64 SteamGameServer_GetSteamID();
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// Global accessors for game server C++ APIs. See individual isteam*.h files for details.
|
||||
// You should not cache the results of these accessors or pass the result pointers across
|
||||
// modules! Different modules may be compiled against different SDK header versions, and
|
||||
// the interface pointers could therefore be different across modules. Every line of code
|
||||
// which calls into a Steamworks API should retrieve the interface from a global accessor.
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
#if !defined( STEAM_API_EXPORTS )
|
||||
inline ISteamClient *SteamGameServerClient();
|
||||
inline ISteamGameServer *SteamGameServer();
|
||||
inline ISteamUtils *SteamGameServerUtils();
|
||||
inline ISteamNetworking *SteamGameServerNetworking();
|
||||
inline ISteamGameServerStats *SteamGameServerStats();
|
||||
inline ISteamHTTP *SteamGameServerHTTP();
|
||||
inline ISteamInventory *SteamGameServerInventory();
|
||||
inline ISteamUGC *SteamGameServerUGC();
|
||||
inline ISteamApps *SteamGameServerApps();
|
||||
#endif
|
||||
|
||||
class CSteamGameServerAPIContext
|
||||
{
|
||||
public:
|
||||
CSteamGameServerAPIContext() { Clear(); }
|
||||
inline void Clear();
|
||||
inline bool Init();
|
||||
|
||||
ISteamClient *SteamClient() const { return m_pSteamClient; }
|
||||
ISteamGameServer *SteamGameServer() const { return m_pSteamGameServer; }
|
||||
ISteamUtils *SteamGameServerUtils() const { return m_pSteamGameServerUtils; }
|
||||
ISteamNetworking *SteamGameServerNetworking() const { return m_pSteamGameServerNetworking; }
|
||||
ISteamGameServerStats *SteamGameServerStats() const { return m_pSteamGameServerStats; }
|
||||
ISteamHTTP *SteamHTTP() const { return m_pSteamHTTP; }
|
||||
ISteamInventory *SteamInventory() const { return m_pSteamInventory; }
|
||||
ISteamUGC *SteamUGC() const { return m_pSteamUGC; }
|
||||
ISteamApps *SteamApps() const { return m_pSteamApps; }
|
||||
|
||||
private:
|
||||
ISteamClient *m_pSteamClient;
|
||||
ISteamGameServer *m_pSteamGameServer;
|
||||
ISteamUtils *m_pSteamGameServerUtils;
|
||||
ISteamNetworking *m_pSteamGameServerNetworking;
|
||||
ISteamGameServerStats *m_pSteamGameServerStats;
|
||||
ISteamHTTP *m_pSteamHTTP;
|
||||
ISteamInventory *m_pSteamInventory;
|
||||
ISteamUGC *m_pSteamUGC;
|
||||
ISteamApps *m_pSteamApps;
|
||||
};
|
||||
|
||||
|
||||
// Older SDKs exported this global pointer, but it is no longer supported.
|
||||
// You should use SteamGameServerClient() or CSteamGameServerAPIContext to
|
||||
// safely access the ISteamClient APIs from your game server application.
|
||||
//S_API ISteamClient *g_pSteamClientGameServer;
|
||||
|
||||
// SteamGameServer_InitSafe has been replaced with SteamGameServer_Init and
|
||||
// is no longer supported. Use SteamGameServer_Init instead.
|
||||
//S_API void S_CALLTYPE SteamGameServer_InitSafe();
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// These macros are similar to the STEAM_CALLBACK_* macros in steam_api.h, but only trigger for gameserver callbacks
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
@ -80,7 +121,6 @@ S_API uint64 SteamGameServer_GetSteamID();
|
||||
CCallbackManual< thisclass, callback_type, true > var; void func( callback_type *pParam )
|
||||
|
||||
|
||||
|
||||
#define _STEAM_CALLBACK_GS( _, thisclass, func, param, var ) \
|
||||
CCallback< thisclass, param, true > var; void func( param *pParam )
|
||||
|
||||
@ -89,52 +129,45 @@ S_API uint64 SteamGameServer_GetSteamID();
|
||||
//
|
||||
// The following functions are part of abstracting API access to the steamclient.dll, but should only be used in very specific cases
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
S_API HSteamPipe SteamGameServer_GetHSteamPipe();
|
||||
S_API HSteamPipe S_CALLTYPE SteamGameServer_GetHSteamPipe();
|
||||
S_API HSteamUser S_CALLTYPE SteamGameServer_GetHSteamUser();
|
||||
S_API bool S_CALLTYPE SteamInternal_GameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
|
||||
#ifdef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// VERSION_SAFE_STEAM_API_INTERFACES uses CSteamAPIContext to provide interfaces to each module in a way that
|
||||
// lets them each specify the interface versions they are compiled with.
|
||||
//
|
||||
// It's important that these stay inlined in the header so the calling module specifies the interface versions
|
||||
// for whatever Steam API version it has.
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
S_API HSteamUser SteamGameServer_GetHSteamUser();
|
||||
|
||||
class CSteamGameServerAPIContext
|
||||
#if !defined( STEAM_API_EXPORTS )
|
||||
inline void S_CALLTYPE SteamGameServerInternal_OnContextInit( void* p )
|
||||
{
|
||||
public:
|
||||
CSteamGameServerAPIContext();
|
||||
void Clear();
|
||||
|
||||
bool Init();
|
||||
|
||||
ISteamGameServer *SteamGameServer() { return m_pSteamGameServer; }
|
||||
ISteamUtils *SteamGameServerUtils() { return m_pSteamGameServerUtils; }
|
||||
ISteamNetworking *SteamGameServerNetworking() { return m_pSteamGameServerNetworking; }
|
||||
ISteamGameServerStats *SteamGameServerStats() { return m_pSteamGameServerStats; }
|
||||
ISteamHTTP *SteamHTTP() { return m_pSteamHTTP; }
|
||||
ISteamInventory *SteamInventory() { return m_pSteamInventory; }
|
||||
ISteamUGC *SteamUGC() { return m_pSteamUGC; }
|
||||
|
||||
private:
|
||||
ISteamGameServer *m_pSteamGameServer;
|
||||
ISteamUtils *m_pSteamGameServerUtils;
|
||||
ISteamNetworking *m_pSteamGameServerNetworking;
|
||||
ISteamGameServerStats *m_pSteamGameServerStats;
|
||||
ISteamHTTP *m_pSteamHTTP;
|
||||
ISteamInventory *m_pSteamInventory;
|
||||
ISteamUGC *m_pSteamUGC;
|
||||
};
|
||||
|
||||
inline CSteamGameServerAPIContext::CSteamGameServerAPIContext()
|
||||
{
|
||||
Clear();
|
||||
((CSteamGameServerAPIContext*)p)->Clear();
|
||||
if ( SteamGameServer_GetHSteamPipe() )
|
||||
((CSteamGameServerAPIContext*)p)->Init();
|
||||
}
|
||||
inline CSteamGameServerAPIContext& SteamGameServerInternal_ModuleContext()
|
||||
{
|
||||
// SteamInternal_ContextInit takes a base pointer for the equivalent of
|
||||
// struct { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; }
|
||||
// Do not change layout of 2 + sizeof... or add non-pointer aligned data!
|
||||
// NOTE: declaring "static CSteamAPIConext" creates a large function
|
||||
// which queries the initialization status of the object. We know that
|
||||
// it is pointer-aligned and fully memset with zeros, so just alias a
|
||||
// static buffer of the appropriate size and call it a CSteamAPIContext.
|
||||
static void* s_CallbackCounterAndContext[2 + sizeof( CSteamGameServerAPIContext ) / sizeof( void* )] = { (void*)&SteamGameServerInternal_OnContextInit, 0 };
|
||||
return *(CSteamGameServerAPIContext*)SteamInternal_ContextInit( s_CallbackCounterAndContext );
|
||||
}
|
||||
inline ISteamClient *SteamGameServerClient() { return SteamGameServerInternal_ModuleContext().SteamClient(); }
|
||||
inline ISteamGameServer *SteamGameServer() { return SteamGameServerInternal_ModuleContext().SteamGameServer(); }
|
||||
inline ISteamUtils *SteamGameServerUtils() { return SteamGameServerInternal_ModuleContext().SteamGameServerUtils(); }
|
||||
inline ISteamNetworking *SteamGameServerNetworking() { return SteamGameServerInternal_ModuleContext().SteamGameServerNetworking(); }
|
||||
inline ISteamGameServerStats *SteamGameServerStats() { return SteamGameServerInternal_ModuleContext().SteamGameServerStats(); }
|
||||
inline ISteamHTTP *SteamGameServerHTTP() { return SteamGameServerInternal_ModuleContext().SteamHTTP(); }
|
||||
inline ISteamInventory *SteamGameServerInventory() { return SteamGameServerInternal_ModuleContext().SteamInventory(); }
|
||||
inline ISteamUGC *SteamGameServerUGC() { return SteamGameServerInternal_ModuleContext().SteamUGC(); }
|
||||
inline ISteamApps *SteamGameServerApps() { return SteamGameServerInternal_ModuleContext().SteamApps(); }
|
||||
#endif // !defined( STEAM_API_EXPORTS )
|
||||
|
||||
|
||||
inline void CSteamGameServerAPIContext::Clear()
|
||||
{
|
||||
m_pSteamClient = NULL;
|
||||
m_pSteamGameServer = NULL;
|
||||
m_pSteamGameServerUtils = NULL;
|
||||
m_pSteamGameServerNetworking = NULL;
|
||||
@ -142,50 +175,69 @@ inline void CSteamGameServerAPIContext::Clear()
|
||||
m_pSteamHTTP = NULL;
|
||||
m_pSteamInventory = NULL;
|
||||
m_pSteamUGC = NULL;
|
||||
m_pSteamApps = NULL;
|
||||
}
|
||||
|
||||
S_API ISteamClient *g_pSteamClientGameServer;
|
||||
// This function must be inlined so the module using steam_api.dll gets the version names they want.
|
||||
// This function must be declared inline in the header so the module using steam_api.dll gets the version names they want.
|
||||
inline bool CSteamGameServerAPIContext::Init()
|
||||
{
|
||||
if ( !g_pSteamClientGameServer )
|
||||
return false;
|
||||
|
||||
HSteamUser hSteamUser = SteamGameServer_GetHSteamUser();
|
||||
HSteamPipe hSteamPipe = SteamGameServer_GetHSteamPipe();
|
||||
if ( !hSteamPipe )
|
||||
return false;
|
||||
|
||||
m_pSteamGameServer = g_pSteamClientGameServer->GetISteamGameServer( hSteamUser, hSteamPipe, STEAMGAMESERVER_INTERFACE_VERSION );
|
||||
m_pSteamClient = (ISteamClient*) SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION );
|
||||
if ( !m_pSteamClient )
|
||||
return false;
|
||||
|
||||
m_pSteamGameServer = m_pSteamClient->GetISteamGameServer( hSteamUser, hSteamPipe, STEAMGAMESERVER_INTERFACE_VERSION );
|
||||
if ( !m_pSteamGameServer )
|
||||
return false;
|
||||
|
||||
m_pSteamGameServerUtils = g_pSteamClientGameServer->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION );
|
||||
m_pSteamGameServerUtils = m_pSteamClient->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamGameServerUtils )
|
||||
return false;
|
||||
|
||||
m_pSteamGameServerNetworking = g_pSteamClientGameServer->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION );
|
||||
m_pSteamGameServerNetworking = m_pSteamClient->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION );
|
||||
if ( !m_pSteamGameServerNetworking )
|
||||
return false;
|
||||
|
||||
m_pSteamGameServerStats = g_pSteamClientGameServer->GetISteamGameServerStats( hSteamUser, hSteamPipe, STEAMGAMESERVERSTATS_INTERFACE_VERSION );
|
||||
m_pSteamGameServerStats = m_pSteamClient->GetISteamGameServerStats( hSteamUser, hSteamPipe, STEAMGAMESERVERSTATS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamGameServerStats )
|
||||
return false;
|
||||
|
||||
m_pSteamHTTP = g_pSteamClientGameServer->GetISteamHTTP( hSteamUser, hSteamPipe, STEAMHTTP_INTERFACE_VERSION );
|
||||
m_pSteamHTTP = m_pSteamClient->GetISteamHTTP( hSteamUser, hSteamPipe, STEAMHTTP_INTERFACE_VERSION );
|
||||
if ( !m_pSteamHTTP )
|
||||
return false;
|
||||
|
||||
m_pSteamInventory = g_pSteamClientGameServer->GetISteamInventory( hSteamUser, hSteamPipe, STEAMINVENTORY_INTERFACE_VERSION );
|
||||
m_pSteamInventory = m_pSteamClient->GetISteamInventory( hSteamUser, hSteamPipe, STEAMINVENTORY_INTERFACE_VERSION );
|
||||
if ( !m_pSteamInventory )
|
||||
return false;
|
||||
|
||||
m_pSteamUGC = g_pSteamClientGameServer->GetISteamUGC( hSteamUser, hSteamPipe, STEAMUGC_INTERFACE_VERSION );
|
||||
m_pSteamUGC = m_pSteamClient->GetISteamUGC( hSteamUser, hSteamPipe, STEAMUGC_INTERFACE_VERSION );
|
||||
if ( !m_pSteamUGC )
|
||||
return false;
|
||||
|
||||
m_pSteamApps = m_pSteamClient->GetISteamApps( hSteamUser, hSteamPipe, STEAMAPPS_INTERFACE_VERSION );
|
||||
if ( !m_pSteamApps )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // VERSION_SAFE_STEAM_API_INTERFACES
|
||||
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString )
|
||||
{
|
||||
if ( !SteamInternal_GameServer_Init( unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
inline void SteamGameServer_ReleaseCurrentThreadMemory()
|
||||
{
|
||||
SteamAPI_ReleaseCurrentThreadMemory();
|
||||
}
|
||||
|
||||
#endif // STEAM_GAMESERVER_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright <EFBFBD> 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//========= Copyright ?1996-2008, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@ -126,6 +126,17 @@ enum EResult
|
||||
k_EResultEmailSendFailure = 99, // Cannot send an email
|
||||
k_EResultNotSettled = 100, // Can't perform operation till payment has settled
|
||||
k_EResultNeedCaptcha = 101, // Needs to provide a valid captcha
|
||||
k_EResultGSLTDenied = 102, // a game server login token owned by this token's owner has been banned
|
||||
k_EResultGSOwnerDenied = 103, // game server owner is denied for other reason (account lock, community ban, vac ban, missing phone)
|
||||
k_EResultInvalidItemType = 104, // the type of thing we were requested to act on is invalid
|
||||
k_EResultIPBanned = 105, // the ip address has been banned from taking this action
|
||||
k_EResultGSLTExpired = 106, // this token has expired from disuse; can be reset for use
|
||||
k_EResultInsufficientFunds = 107, // user doesn't have enough wallet funds to complete the action
|
||||
k_EResultTooManyPending = 108, // There are too many of this thing pending already
|
||||
k_EResultNoSiteLicensesFound = 109, // No site licenses found
|
||||
k_EResultWGNetworkSendExceeded = 110, // the WG couldn't send a response because we exceeded max network send size
|
||||
k_EResultAccountNotFriends = 111, // the user is not mutually friends
|
||||
k_EResultLimitedUserAccount = 112, // the user is limited
|
||||
};
|
||||
|
||||
// Error codes for use with the voice functions
|
||||
@ -260,11 +271,15 @@ enum EAppOwnershipFlags
|
||||
k_EAppOwnershipFlags_LicenseCanceled = 0x2000, // Mark as canceled, but might be still active if recurring
|
||||
k_EAppOwnershipFlags_AutoGrant = 0x4000, // Ownership is based on any kind of autogrant license
|
||||
k_EAppOwnershipFlags_PendingGift = 0x8000, // user has pending gift to redeem
|
||||
k_EAppOwnershipFlags_RentalNotActivated = 0x10000, // Rental hasn't been activated yet
|
||||
k_EAppOwnershipFlags_Rental = 0x20000, // Is a rental
|
||||
k_EAppOwnershipFlags_SiteLicense = 0x40000, // Is from a site license
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: designed as flags to allow filters masks
|
||||
// NOTE: If you add to this, please update PackageAppType (SteamConfig) as well as populatePackageAppType
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EAppType
|
||||
{
|
||||
@ -279,10 +294,12 @@ enum EAppType
|
||||
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_Hardware = 0x200, // a hardware device (Steam Machine, Steam Controller, Steam Link, etc.)
|
||||
// 0x400 is up for grabs here
|
||||
k_EAppType_Franchise = 0x400, // A hub for collections of multiple apps, eg films, series, games
|
||||
k_EAppType_Video = 0x800, // A video component of either a Film or TVSeries (may be the feature, an episode, preview, making-of, etc)
|
||||
k_EAppType_Plugin = 0x1000, // Plug-in types for other Apps
|
||||
k_EAppType_Music = 0x2000, // Music files
|
||||
k_EAppType_Series = 0x4000, // Container app for video series
|
||||
k_EAppType_Comic = 0x8000, // Comic Book
|
||||
|
||||
k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only
|
||||
k_EAppType_DepotOnly = 0x80000000, // placeholder since depots and apps share the same namespace
|
||||
@ -327,8 +344,8 @@ enum EChatEntryType
|
||||
k_EChatEntryTypeWasBanned = 9, // user was banned (data: 64-bit steamid of actor performing the ban)
|
||||
k_EChatEntryTypeDisconnected = 10, // user disconnected
|
||||
k_EChatEntryTypeHistoricalChat = 11, // a chat message from user's chat history or offilne message
|
||||
k_EChatEntryTypeReserved1 = 12,
|
||||
k_EChatEntryTypeReserved2 = 13,
|
||||
//k_EChatEntryTypeReserved1 = 12, // No longer used
|
||||
//k_EChatEntryTypeReserved2 = 13, // No longer used
|
||||
k_EChatEntryTypeLinkBlocked = 14, // a link was removed by the chat filter.
|
||||
};
|
||||
|
||||
@ -352,6 +369,7 @@ enum EChatRoomEnterResponse
|
||||
// k_EChatRoomEnterResponseNoRankingDataLobby = 12, // No longer used
|
||||
// k_EChatRoomEnterResponseNoRankingDataUser = 13, // No longer used
|
||||
// k_EChatRoomEnterResponseRankOutOfRange = 14, // No longer used
|
||||
k_EChatRoomEnterResponseRatelimitExceeded = 15, // Join failed - to many join attempts in a very short period of time
|
||||
};
|
||||
|
||||
|
||||
@ -443,7 +461,7 @@ enum ELaunchOptionType
|
||||
k_ELaunchOptionType_SafeMode = 2, // runs the game in safe mode
|
||||
k_ELaunchOptionType_Multiplayer = 3, // runs the game in multiplayer mode
|
||||
k_ELaunchOptionType_Config = 4, // runs config tool for this game
|
||||
k_ELaunchOptionType_VR = 5, // runs game in VR mode
|
||||
k_ELaunchOptionType_OpenVR = 5, // runs game in VR mode using OpenVR
|
||||
k_ELaunchOptionType_Server = 6, // runs dedicated server for this game
|
||||
k_ELaunchOptionType_Editor = 7, // runs game editor
|
||||
k_ELaunchOptionType_Manual = 8, // shows game manual
|
||||
@ -451,13 +469,98 @@ enum ELaunchOptionType
|
||||
k_ELaunchOptionType_Option1 = 10, // generic run option, uses description field for game name
|
||||
k_ELaunchOptionType_Option2 = 11, // generic run option, uses description field for game name
|
||||
k_ELaunchOptionType_Option3 = 12, // generic run option, uses description field for game name
|
||||
|
||||
k_ELaunchOptionType_OculusVR = 13, // runs game in VR mode using the Oculus SDK
|
||||
k_ELaunchOptionType_OpenVROverlay = 14, // runs an OpenVR dashboard overlay
|
||||
k_ELaunchOptionType_OSVR = 15, // runs game in VR mode using the OSVR SDK
|
||||
|
||||
|
||||
k_ELaunchOptionType_Dialog = 1000, // show launch options dialog
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this launch option is any of the vr launching types
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsVRLaunchOptionType( const ELaunchOptionType eType )
|
||||
{
|
||||
return eType == k_ELaunchOptionType_OpenVR
|
||||
|| eType == k_ELaunchOptionType_OpenVROverlay
|
||||
|| eType == k_ELaunchOptionType_OculusVR
|
||||
|| eType == k_ELaunchOptionType_OSVR;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: code points for VR HMD vendors and models
|
||||
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN A DATABASE
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EVRHMDType
|
||||
{
|
||||
k_eEVRHMDType_None = -1, // unknown vendor and model
|
||||
|
||||
k_eEVRHMDType_Unknown = 0, // unknown vendor and model
|
||||
|
||||
k_eEVRHMDType_HTC_Dev = 1, // original HTC dev kits
|
||||
k_eEVRHMDType_HTC_VivePre = 2, // htc vive pre
|
||||
k_eEVRHMDType_HTC_Vive = 3, // htc vive consumer release
|
||||
|
||||
k_eEVRHMDType_HTC_Unknown = 20, // unknown htc hmd
|
||||
|
||||
k_eEVRHMDType_Oculus_DK1 = 21, // Oculus DK1
|
||||
k_eEVRHMDType_Oculus_DK2 = 22, // Oculus DK2
|
||||
k_eEVRHMDType_Oculus_Rift = 23, // Oculus rift
|
||||
|
||||
k_eEVRHMDType_Oculus_Unknown = 40, // // Oculus unknown HMD
|
||||
|
||||
k_eEVRHMDType_Acer_Unknown = 50, // Acer unknown HMD
|
||||
k_eEVRHMDType_Acer_WindowsMR = 51, // Acer QHMD Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Dell_Unknown = 60, // Dell unknown HMD
|
||||
k_eEVRHMDType_Dell_Visor = 61, // Dell Visor Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Lenovo_Unknown = 70, // Lenovo unknown HMD
|
||||
k_eEVRHMDType_Lenovo_Explorer = 71, // Lenovo Explorer Windows MR headset
|
||||
|
||||
k_eEVRHMDType_HP_Unknown = 80, // HP unknown HMD
|
||||
k_eEVRHMDType_HP_WindowsMR = 81, // HP Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD
|
||||
k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Unannounced_Unknown = 100, // Unannounced unknown HMD
|
||||
k_eEVRHMDType_Unannounced_WindowsMR = 101, // Unannounced Windows MR headset
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this is from an Oculus HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsOculusHMD( EVRHMDType eType )
|
||||
{
|
||||
return eType == k_eEVRHMDType_Oculus_DK1 || eType == k_eEVRHMDType_Oculus_DK2 || eType == k_eEVRHMDType_Oculus_Rift || eType == k_eEVRHMDType_Oculus_Unknown;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this is from a Windows MR HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsWindowsMRHeadset( EVRHMDType eType )
|
||||
{
|
||||
return eType >= k_eEVRHMDType_Acer_WindowsMR && eType <= k_eEVRHMDType_Unannounced_WindowsMR;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this is from an Vive HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsViveHMD( EVRHMDType eType )
|
||||
{
|
||||
return eType == k_eEVRHMDType_HTC_Dev || eType == k_eEVRHMDType_HTC_VivePre || eType == k_eEVRHMDType_HTC_Vive || eType == k_eEVRHMDType_HTC_Unknown;
|
||||
}
|
||||
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
#define CSTEAMID_DEFINED
|
||||
|
||||
@ -979,8 +1082,10 @@ public:
|
||||
|
||||
CRC32_t crc32;
|
||||
CRC32_Init( &crc32 );
|
||||
CRC32_ProcessBuffer( &crc32, pchExePath, V_strlen( pchExePath ) );
|
||||
CRC32_ProcessBuffer( &crc32, pchAppName, V_strlen( pchAppName ) );
|
||||
if ( pchExePath )
|
||||
CRC32_ProcessBuffer( &crc32, pchExePath, V_strlen( pchExePath ) );
|
||||
if ( pchAppName )
|
||||
CRC32_ProcessBuffer( &crc32, pchAppName, V_strlen( pchAppName ) );
|
||||
CRC32_Final( &crc32 );
|
||||
|
||||
// set the high-bit on the mod-id
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright © 1996-2010, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: utilities to decode/decrypt a ticket from the
|
||||
// ISteamUser::RequestEncryptedAppTicket, ISteamUser::GetEncryptedAppTicket API
|
||||
|
@ -1,4 +1,4 @@
|
||||
//====== Copyright © 1996-2010, 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.
|
||||
@ -23,6 +23,7 @@ enum EHTTPMethod
|
||||
k_EHTTPMethodPUT,
|
||||
k_EHTTPMethodDELETE,
|
||||
k_EHTTPMethodOPTIONS,
|
||||
k_EHTTPMethodPATCH,
|
||||
|
||||
// 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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//====== Copyright 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright © 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//========= Copyright ?1996-2008, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@ -24,7 +24,7 @@ typedef unsigned char uint8;
|
||||
#define POSIX 1
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(_WIN64)
|
||||
#if defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__)
|
||||
#define X64BITS
|
||||
#endif
|
||||
|
||||
@ -84,7 +84,7 @@ typedef unsigned int uintp;
|
||||
|
||||
#endif // else _WIN32
|
||||
|
||||
#ifdef __clang__
|
||||
#ifdef API_GEN
|
||||
# define CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
|
||||
#else
|
||||
# define CLANG_ATTR(ATTR)
|
||||
@ -93,6 +93,7 @@ typedef unsigned int uintp;
|
||||
#define METHOD_DESC(DESC) CLANG_ATTR( "desc:" #DESC ";" )
|
||||
#define IGNOREATTR() CLANG_ATTR( "ignore" )
|
||||
#define OUT_STRUCT() CLANG_ATTR( "out_struct: ;" )
|
||||
#define OUT_STRING() CLANG_ATTR( "out_string: ;" )
|
||||
#define OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
|
||||
#define OUT_ARRAY_COUNT(COUNTER, DESC) CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC )
|
||||
#define ARRAY_COUNT(COUNTER) CLANG_ATTR( "array_count:" #COUNTER ";" )
|
||||
@ -101,7 +102,8 @@ typedef unsigned int uintp;
|
||||
#define OUT_BUFFER_COUNT(COUNTER) CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
|
||||
#define OUT_STRING_COUNT(COUNTER) CLANG_ATTR( "out_string_count:" #COUNTER ";" )
|
||||
#define DESC(DESC) CLANG_ATTR("desc:" #DESC ";")
|
||||
|
||||
#define CALL_RESULT(RESULT_TYPE) CLANG_ATTR("callresult:" #RESULT_TYPE ";")
|
||||
#define CALL_BACK(RESULT_TYPE) CLANG_ATTR("callback:" #RESULT_TYPE ";")
|
||||
|
||||
const int k_cubSaltSize = 8;
|
||||
typedef uint8 Salt_t[ k_cubSaltSize ];
|
||||
@ -174,6 +176,9 @@ const PartnerId_t k_uPartnerIdInvalid = 0;
|
||||
typedef uint64 ManifestId_t;
|
||||
const ManifestId_t k_uManifestIdInvalid = 0;
|
||||
|
||||
// ID for cafe sites
|
||||
typedef uint64 SiteId_t;
|
||||
const SiteId_t k_ulSiteIdInvalid = 0;
|
||||
|
||||
|
||||
#endif // STEAMTYPES_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright <EFBFBD> 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//========= Copyright ? 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
|
@ -1,33 +0,0 @@
|
||||
//====== Copyright (c) 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to user account information in Steam
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef STEAMVRFLAT_H
|
||||
#define STEAMVRFLAT_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
S_API void SteamAPI_IHmd_GetWindowBounds(intptr_t instancePtr, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
|
||||
S_API void SteamAPI_IHmd_GetRecommendedRenderTargetSize(intptr_t instancePtr, uint32_t * pnWidth, uint32_t * pnHeight);
|
||||
S_API void SteamAPI_IHmd_GetEyeOutputViewport(intptr_t instancePtr, vr::Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
|
||||
S_API struct vr::HmdMatrix44_t SteamAPI_IHmd_GetProjectionMatrix(intptr_t instancePtr, vr::Hmd_Eye eEye, float fNearZ, float fFarZ, vr::GraphicsAPIConvention eProjType);
|
||||
S_API void SteamAPI_IHmd_GetProjectionRaw(intptr_t instancePtr, vr::Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom);
|
||||
S_API struct vr::DistortionCoordinates_t SteamAPI_IHmd_ComputeDistortion(intptr_t instancePtr, vr::Hmd_Eye eEye, float fU, float fV);
|
||||
S_API struct vr::HmdMatrix34_t SteamAPI_IHmd_GetHeadFromEyePose(intptr_t instancePtr, vr::Hmd_Eye eEye);
|
||||
S_API bool SteamAPI_IHmd_GetViewMatrix(intptr_t instancePtr, float fSecondsFromNow, struct vr::HmdMatrix44_t * pMatLeftView, struct vr::HmdMatrix44_t * pMatRightView, vr::HmdTrackingResult * peResult);
|
||||
S_API int32_t SteamAPI_IHmd_GetD3D9AdapterIndex(intptr_t instancePtr);
|
||||
S_API void SteamAPI_IHmd_GetDXGIOutputInfo(intptr_t instancePtr, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex);
|
||||
S_API void SteamAPI_IHmd_AttachToWindow(intptr_t instancePtr, void * hWnd);
|
||||
S_API bool SteamAPI_IHmd_GetTrackerFromHeadPose(intptr_t instancePtr, float fPredictedSecondsFromNow, struct vr::HmdMatrix34_t * pmPose, vr::HmdTrackingResult * peResult);
|
||||
S_API bool SteamAPI_IHmd_GetLastTrackerFromHeadPose(intptr_t instancePtr, struct vr::HmdMatrix34_t * pmPose);
|
||||
S_API bool SteamAPI_IHmd_WillDriftInYaw(intptr_t instancePtr);
|
||||
S_API void SteamAPI_IHmd_ZeroTracker(intptr_t instancePtr);
|
||||
S_API struct vr::HmdMatrix34_t SteamAPI_IHmd_GetTrackerZeroPose(intptr_t instancePtr);
|
||||
S_API uint32_t SteamAPI_IHmd_GetDriverId(intptr_t instancePtr, char * pchBuffer, uint32_t unBufferLen);
|
||||
S_API uint32_t SteamAPI_IHmd_GetDisplayId(intptr_t instancePtr, char * pchBuffer, uint32_t unBufferLen);
|
||||
#endif // STEAMVRFLAT_H
|
@ -1,285 +0,0 @@
|
||||
//=== === Copyright 1996-2004, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Valve.SteamVRInterop
|
||||
{
|
||||
|
||||
class NativeEntrypoints
|
||||
{
|
||||
|
||||
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetWindowBounds")]
|
||||
internal static extern void SteamAPI_IHmd_GetWindowBounds(IntPtr instancePtr, ref int32_t pnX, ref int32_t pnY, ref uint32_t pnWidth, ref uint32_t pnHeight);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetRecommendedRenderTargetSize")]
|
||||
internal static extern void SteamAPI_IHmd_GetRecommendedRenderTargetSize(IntPtr instancePtr, ref uint32_t pnWidth, ref uint32_t pnHeight);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetEyeOutputViewport")]
|
||||
internal static extern void SteamAPI_IHmd_GetEyeOutputViewport(IntPtr instancePtr, vr::Hmd_Eye eEye, ref uint32_t pnX, ref uint32_t pnY, ref uint32_t pnWidth, ref uint32_t pnHeight);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetProjectionMatrix")]
|
||||
internal static extern vr::HmdMatrix44_t SteamAPI_IHmd_GetProjectionMatrix(IntPtr instancePtr, vr::Hmd_Eye eEye, float fNearZ, float fFarZ, vr::GraphicsAPIConvention eProjType);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetProjectionRaw")]
|
||||
internal static extern void SteamAPI_IHmd_GetProjectionRaw(IntPtr instancePtr, vr::Hmd_Eye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_ComputeDistortion")]
|
||||
internal static extern vr::DistortionCoordinates_t SteamAPI_IHmd_ComputeDistortion(IntPtr instancePtr, vr::Hmd_Eye eEye, float fU, float fV);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetHeadFromEyePose")]
|
||||
internal static extern vr::HmdMatrix34_t SteamAPI_IHmd_GetHeadFromEyePose(IntPtr instancePtr, vr::Hmd_Eye eEye);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetViewMatrix")]
|
||||
internal static extern bool SteamAPI_IHmd_GetViewMatrix(IntPtr instancePtr, float fSecondsFromNow, ref vr::HmdMatrix44_t pMatLeftView, ref vr::HmdMatrix44_t pMatRightView, ref vr::HmdTrackingResult peResult);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetD3D9AdapterIndex")]
|
||||
internal static extern int32_t SteamAPI_IHmd_GetD3D9AdapterIndex(IntPtr instancePtr);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetDXGIOutputInfo")]
|
||||
internal static extern void SteamAPI_IHmd_GetDXGIOutputInfo(IntPtr instancePtr, ref int32_t pnAdapterIndex, ref int32_t pnAdapterOutputIndex);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_AttachToWindow")]
|
||||
internal static extern void SteamAPI_IHmd_AttachToWindow(IntPtr instancePtr, IntPtr hWnd);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetTrackerFromHeadPose")]
|
||||
internal static extern bool SteamAPI_IHmd_GetTrackerFromHeadPose(IntPtr instancePtr, float fPredictedSecondsFromNow, ref vr::HmdMatrix34_t pmPose, ref vr::HmdTrackingResult peResult);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetLastTrackerFromHeadPose")]
|
||||
internal static extern bool SteamAPI_IHmd_GetLastTrackerFromHeadPose(IntPtr instancePtr, ref vr::HmdMatrix34_t pmPose);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_WillDriftInYaw")]
|
||||
internal static extern bool SteamAPI_IHmd_WillDriftInYaw(IntPtr instancePtr);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_ZeroTracker")]
|
||||
internal static extern void SteamAPI_IHmd_ZeroTracker(IntPtr instancePtr);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetTrackerZeroPose")]
|
||||
internal static extern vr::HmdMatrix34_t SteamAPI_IHmd_GetTrackerZeroPose(IntPtr instancePtr);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetDriverId")]
|
||||
internal static extern uint32_t SteamAPI_IHmd_GetDriverId(IntPtr instancePtr, string pchBuffer, uint32_t unBufferLen);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_IHmd_GetDisplayId")]
|
||||
internal static extern uint32_t SteamAPI_IHmd_GetDisplayId(IntPtr instancePtr, string pchBuffer, uint32_t unBufferLen);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public abstract class IHmd
|
||||
{
|
||||
public abstract void GetWindowBounds(out int32_t pnX,out int32_t pnY,out uint32_t pnWidth,out uint32_t pnHeight);
|
||||
public abstract void GetRecommendedRenderTargetSize(out uint32_t pnWidth,out uint32_t pnHeight);
|
||||
public abstract void GetEyeOutputViewport(vr::Hmd_Eye eEye,out uint32_t pnX,out uint32_t pnY,out uint32_t pnWidth,out uint32_t pnHeight);
|
||||
public abstract vr::HmdMatrix44_t GetProjectionMatrix(vr::Hmd_Eye eEye,float fNearZ,float fFarZ,vr::GraphicsAPIConvention eProjType);
|
||||
public abstract void GetProjectionRaw(vr::Hmd_Eye eEye,out float pfLeft,out float pfRight,out float pfTop,out float pfBottom);
|
||||
public abstract vr::DistortionCoordinates_t ComputeDistortion(vr::Hmd_Eye eEye,float fU,float fV);
|
||||
public abstract vr::HmdMatrix34_t GetHeadFromEyePose(vr::Hmd_Eye eEye);
|
||||
public abstract bool GetViewMatrix(float fSecondsFromNow,out vr::HmdMatrix44_t pMatLeftView,out vr::HmdMatrix44_t pMatRightView,out vr::HmdTrackingResult peResult);
|
||||
public abstract int32_t GetD3D9AdapterIndex();
|
||||
public abstract void GetDXGIOutputInfo(out int32_t pnAdapterIndex,out int32_t pnAdapterOutputIndex);
|
||||
public abstract void AttachToWindow(IntPtr hWnd);
|
||||
public abstract bool GetTrackerFromHeadPose(float fPredictedSecondsFromNow,out vr::HmdMatrix34_t pmPose,out vr::HmdTrackingResult peResult);
|
||||
public abstract bool GetLastTrackerFromHeadPose(out vr::HmdMatrix34_t pmPose);
|
||||
public abstract bool WillDriftInYaw();
|
||||
public abstract void ZeroTracker();
|
||||
public abstract vr::HmdMatrix34_t GetTrackerZeroPose();
|
||||
public abstract uint32_t GetDriverId(string pchBuffer,uint32_t unBufferLen);
|
||||
public abstract uint32_t GetDisplayId(string pchBuffer,uint32_t unBufferLen);
|
||||
}
|
||||
|
||||
|
||||
public class CHmd : IHmd
|
||||
{
|
||||
public CHmd(IntPtr hmd)
|
||||
{
|
||||
m_hmd = hmd;
|
||||
}
|
||||
IntPtr m_hmd;
|
||||
|
||||
private void CheckIfUsable()
|
||||
{
|
||||
if (m_hmd == IntPtr.Zero)
|
||||
{
|
||||
throw new Exception("Steam Pointer not configured");
|
||||
}
|
||||
}
|
||||
public override void GetWindowBounds(out int32_t pnX,out int32_t pnY,out uint32_t pnWidth,out uint32_t pnHeight)
|
||||
{
|
||||
CheckIfUsable();
|
||||
NativeEntrypoints.SteamAPI_IHmd_GetWindowBounds(m_hmd,ref pnX,ref pnY,ref pnWidth,ref pnHeight);
|
||||
}
|
||||
public override void GetRecommendedRenderTargetSize(out uint32_t pnWidth,out uint32_t pnHeight)
|
||||
{
|
||||
CheckIfUsable();
|
||||
NativeEntrypoints.SteamAPI_IHmd_GetRecommendedRenderTargetSize(m_hmd,ref pnWidth,ref pnHeight);
|
||||
}
|
||||
public override void GetEyeOutputViewport(vr::Hmd_Eye eEye,out uint32_t pnX,out uint32_t pnY,out uint32_t pnWidth,out uint32_t pnHeight)
|
||||
{
|
||||
CheckIfUsable();
|
||||
NativeEntrypoints.SteamAPI_IHmd_GetEyeOutputViewport(m_hmd,eEye,ref pnX,ref pnY,ref pnWidth,ref pnHeight);
|
||||
}
|
||||
public override vr::HmdMatrix44_t GetProjectionMatrix(vr::Hmd_Eye eEye,float fNearZ,float fFarZ,vr::GraphicsAPIConvention eProjType)
|
||||
{
|
||||
CheckIfUsable();
|
||||
vr::HmdMatrix44_t result = NativeEntrypoints.SteamAPI_IHmd_GetProjectionMatrix(m_hmd,eEye,fNearZ,fFarZ,eProjType);
|
||||
return result;
|
||||
}
|
||||
public override void GetProjectionRaw(vr::Hmd_Eye eEye,out float pfLeft,out float pfRight,out float pfTop,out float pfBottom)
|
||||
{
|
||||
CheckIfUsable();
|
||||
pfLeft = 0;
|
||||
pfRight = 0;
|
||||
pfTop = 0;
|
||||
pfBottom = 0;
|
||||
NativeEntrypoints.SteamAPI_IHmd_GetProjectionRaw(m_hmd,eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom);
|
||||
}
|
||||
public override vr::DistortionCoordinates_t ComputeDistortion(vr::Hmd_Eye eEye,float fU,float fV)
|
||||
{
|
||||
CheckIfUsable();
|
||||
vr::DistortionCoordinates_t result = NativeEntrypoints.SteamAPI_IHmd_ComputeDistortion(m_hmd,eEye,fU,fV);
|
||||
return result;
|
||||
}
|
||||
public override vr::HmdMatrix34_t GetHeadFromEyePose(vr::Hmd_Eye eEye)
|
||||
{
|
||||
CheckIfUsable();
|
||||
vr::HmdMatrix34_t result = NativeEntrypoints.SteamAPI_IHmd_GetHeadFromEyePose(m_hmd,eEye);
|
||||
return result;
|
||||
}
|
||||
public override bool GetViewMatrix(float fSecondsFromNow,out vr::HmdMatrix44_t pMatLeftView,out vr::HmdMatrix44_t pMatRightView,out vr::HmdTrackingResult peResult)
|
||||
{
|
||||
CheckIfUsable();
|
||||
bool result = NativeEntrypoints.SteamAPI_IHmd_GetViewMatrix(m_hmd,fSecondsFromNow,ref pMatLeftView,ref pMatRightView,ref peResult);
|
||||
return result;
|
||||
}
|
||||
public override int32_t GetD3D9AdapterIndex()
|
||||
{
|
||||
CheckIfUsable();
|
||||
int32_t result = NativeEntrypoints.SteamAPI_IHmd_GetD3D9AdapterIndex(m_hmd);
|
||||
return result;
|
||||
}
|
||||
public override void GetDXGIOutputInfo(out int32_t pnAdapterIndex,out int32_t pnAdapterOutputIndex)
|
||||
{
|
||||
CheckIfUsable();
|
||||
NativeEntrypoints.SteamAPI_IHmd_GetDXGIOutputInfo(m_hmd,ref pnAdapterIndex,ref pnAdapterOutputIndex);
|
||||
}
|
||||
public override void AttachToWindow(IntPtr hWnd)
|
||||
{
|
||||
CheckIfUsable();
|
||||
NativeEntrypoints.SteamAPI_IHmd_AttachToWindow(m_hmd,hWnd);
|
||||
}
|
||||
public override bool GetTrackerFromHeadPose(float fPredictedSecondsFromNow,out vr::HmdMatrix34_t pmPose,out vr::HmdTrackingResult peResult)
|
||||
{
|
||||
CheckIfUsable();
|
||||
bool result = NativeEntrypoints.SteamAPI_IHmd_GetTrackerFromHeadPose(m_hmd,fPredictedSecondsFromNow,ref pmPose,ref peResult);
|
||||
return result;
|
||||
}
|
||||
public override bool GetLastTrackerFromHeadPose(out vr::HmdMatrix34_t pmPose)
|
||||
{
|
||||
CheckIfUsable();
|
||||
bool result = NativeEntrypoints.SteamAPI_IHmd_GetLastTrackerFromHeadPose(m_hmd,ref pmPose);
|
||||
return result;
|
||||
}
|
||||
public override bool WillDriftInYaw()
|
||||
{
|
||||
CheckIfUsable();
|
||||
bool result = NativeEntrypoints.SteamAPI_IHmd_WillDriftInYaw(m_hmd);
|
||||
return result;
|
||||
}
|
||||
public override void ZeroTracker()
|
||||
{
|
||||
CheckIfUsable();
|
||||
NativeEntrypoints.SteamAPI_IHmd_ZeroTracker(m_hmd);
|
||||
}
|
||||
public override vr::HmdMatrix34_t GetTrackerZeroPose()
|
||||
{
|
||||
CheckIfUsable();
|
||||
vr::HmdMatrix34_t result = NativeEntrypoints.SteamAPI_IHmd_GetTrackerZeroPose(m_hmd);
|
||||
return result;
|
||||
}
|
||||
public override uint32_t GetDriverId(string pchBuffer,uint32_t unBufferLen)
|
||||
{
|
||||
CheckIfUsable();
|
||||
uint32_t result = NativeEntrypoints.SteamAPI_IHmd_GetDriverId(m_hmd,pchBuffer,unBufferLen);
|
||||
return result;
|
||||
}
|
||||
public override uint32_t GetDisplayId(string pchBuffer,uint32_t unBufferLen)
|
||||
{
|
||||
CheckIfUsable();
|
||||
uint32_t result = NativeEntrypoints.SteamAPI_IHmd_GetDisplayId(m_hmd,pchBuffer,unBufferLen);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class SteamVRInterop
|
||||
{
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "VR_Init")]
|
||||
internal static extern IntPtr VR_Init(out HmdError peError);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "VR_Shutdown")]
|
||||
internal static extern void VR_Shutdown();
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "VR_IsHmdPresent")]
|
||||
internal static extern bool VR_IsHmdPresent();
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_UnregisterCallback")]
|
||||
internal static extern string VR_GetStringForHmdError(HmdError error);
|
||||
[DllImportAttribute("Steam_api", EntryPoint = "Hmd")]
|
||||
internal static extern IntPtr Hmd();
|
||||
}
|
||||
|
||||
|
||||
public enum Hmd_Eye
|
||||
{
|
||||
Eye_Left = 0,
|
||||
Eye_Right = 1,
|
||||
}
|
||||
public enum GraphicsAPIConvention
|
||||
{
|
||||
API_DirectX = 0,
|
||||
API_OpenGL = 1,
|
||||
}
|
||||
public enum HmdTrackingResult
|
||||
{
|
||||
TrackingResult_Uninitialized = 1,
|
||||
TrackingResult_Calibrating_InProgress = 100,
|
||||
TrackingResult_Calibrating_OutOfRange = 101,
|
||||
TrackingResult_Running_OK = 200,
|
||||
TrackingResult_Running_OutOfRange = 201,
|
||||
}
|
||||
public 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_Driver_Unknown = 201,
|
||||
HmdError_Driver_HmdUnknown = 202,
|
||||
HmdError_Driver_NotLoaded = 203,
|
||||
HmdError_IPC_ServerInitFailed = 300,
|
||||
HmdError_IPC_ConnectFailed = 301,
|
||||
HmdError_IPC_SharedStateInitFailed = 302,
|
||||
HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix34_t
|
||||
{
|
||||
public float m;
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix44_t
|
||||
{
|
||||
public float m;
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t
|
||||
{
|
||||
public float rfRed;
|
||||
public float rfGreen;
|
||||
public float rfBlue;
|
||||
}
|
||||
|
||||
public class SteamVR
|
||||
{
|
||||
public static IHMD Init(out HmdError peError)
|
||||
{
|
||||
return new CHMD(VR_Init(out peError));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user