mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 06:35:49 +03:00
Update to Steamworks 152
This commit is contained in:
parent
bfa94d89fa
commit
40bcf2e95a
Binary file not shown.
Binary file not shown.
@ -11,7 +11,6 @@
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamtypes.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: This is a restricted interface that can only be used by previously approved apps,
|
||||
@ -51,16 +50,18 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIS
|
||||
// Purpose: Sent when a new app is installed
|
||||
//---------------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 )
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_END(1)
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app is installed
|
||||
STEAM_CALLBACK_END( 2 )
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Sent when an app is uninstalled
|
||||
//---------------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 )
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_END(1)
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app was installed
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
@ -116,10 +116,6 @@ public:
|
||||
inline ISteamApps *SteamApps();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFACE_VERSION );
|
||||
|
||||
// Global accessor for the gameserver client
|
||||
inline ISteamApps *SteamGameServerApps();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamApps *, SteamGameServerApps, STEAMAPPS_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
|
@ -367,6 +367,11 @@ enum EControllerActionOrigin
|
||||
k_EControllerActionOrigin_PS5_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_PS5_Gyro_Roll,
|
||||
|
||||
k_EControllerActionOrigin_XBoxOne_LeftGrip_Lower,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftGrip_Upper,
|
||||
k_EControllerActionOrigin_XBoxOne_RightGrip_Lower,
|
||||
k_EControllerActionOrigin_XBoxOne_RightGrip_Upper,
|
||||
k_EControllerActionOrigin_XBoxOne_Share,
|
||||
|
||||
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
|
||||
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
|
||||
@ -592,7 +597,7 @@ public:
|
||||
virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions availible without using the rest of Steam Input API
|
||||
// Utility functions available without using the rest of Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
|
||||
|
@ -91,14 +91,23 @@ public:
|
||||
|
||||
/// Set name of map to report in the server browser
|
||||
///
|
||||
/// @see k_cbMaxGameServerName
|
||||
/// @see k_cbMaxGameServerMapName
|
||||
virtual void SetMapName( const char *pszMapName ) = 0;
|
||||
|
||||
/// Let people know if your server will require a password
|
||||
virtual void SetPasswordProtected( bool bPasswordProtected ) = 0;
|
||||
|
||||
/// Spectator server. The default value is zero, meaning the service
|
||||
/// is not used.
|
||||
/// Spectator server port to advertise. The default value is zero, meaning the
|
||||
/// service is not used. If your server receives any info requests on the LAN,
|
||||
/// this is the value that will be placed into the reply for such local queries.
|
||||
///
|
||||
/// This is also the value that will be advertised by the master server.
|
||||
/// The only exception is if your server is using a FakeIP. Then then the second
|
||||
/// fake port number (index 1) assigned to your server will be listed on the master
|
||||
/// server as the spectator port, if you set this value to any nonzero value.
|
||||
///
|
||||
/// This function merely controls the values that are advertised -- it's up to you to
|
||||
/// configure the server to actually listen on this port and handle any spectator traffic
|
||||
virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0;
|
||||
|
||||
/// Name of the spectator server. (Only used if spectator port is nonzero.)
|
||||
@ -120,8 +129,6 @@ public:
|
||||
|
||||
/// Sets a string defining the "gamedata" for this server, this is optional, but if it is set
|
||||
/// it allows users to filter in the matchmaking/server-browser interfaces based on the value
|
||||
/// don't set this unless it actually changes, its only uploaded to the master once (when
|
||||
/// acknowledged)
|
||||
///
|
||||
/// @see k_cbMaxGameServerGameData
|
||||
virtual void SetGameData( const char *pchGameData ) = 0;
|
||||
@ -129,42 +136,20 @@ public:
|
||||
/// Region identifier. This is an optional field, the default value is empty, meaning the "world" region
|
||||
virtual void SetRegion( const char *pszRegion ) = 0;
|
||||
|
||||
/// Indicate whether you wish to be listed on the master server list
|
||||
/// and/or respond to server browser / LAN discovery packets.
|
||||
/// The server starts with this value set to false. You should set all
|
||||
/// relevant server parameters before enabling advertisement on the server.
|
||||
///
|
||||
/// (This function used to be named EnableHeartbeats, so if you are wondering
|
||||
/// where that function went, it's right here. It does the same thing as before,
|
||||
/// the old name was just confusing.)
|
||||
virtual void SetAdvertiseServerActive( bool bActive ) = 0;
|
||||
|
||||
//
|
||||
// Player list management / authentication
|
||||
// Player list management / authentication.
|
||||
//
|
||||
|
||||
// Handles receiving a new connection from a Steam user. This call will ask the Steam
|
||||
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
|
||||
// are off-line, then it will validate the cached ticket itself which will validate app ownership
|
||||
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
|
||||
// and must then be sent up to the game server for authentication.
|
||||
//
|
||||
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
|
||||
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
|
||||
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
|
||||
virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0;
|
||||
|
||||
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
|
||||
//
|
||||
// Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect()
|
||||
// when this user leaves the server just like you would for a real user.
|
||||
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
|
||||
|
||||
// Should be called whenever a user leaves our game server, this lets Steam internally
|
||||
// track which users are currently on which servers for the purposes of preventing a single
|
||||
// account being logged into multiple servers, showing who is currently on a server, etc.
|
||||
virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
|
||||
// currently connected to the server. For regular users you must call this after you receive a
|
||||
// GSUserValidationSuccess callback.
|
||||
//
|
||||
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
|
||||
virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0;
|
||||
|
||||
// New auth system APIs - do not mix with the old auth system APIs.
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
// Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).
|
||||
// pcbTicket retrieves the length of the actual ticket.
|
||||
virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
|
||||
@ -199,12 +184,9 @@ public:
|
||||
// connect to
|
||||
virtual SteamIPAddress_t GetPublicIP() = 0;
|
||||
|
||||
// These are in GameSocketShare mode, where instead of ISteamGameServer creating its own
|
||||
// socket to talk to the master server on, it lets the game use its socket to forward messages
|
||||
// back and forth. This prevents us from requiring server ops to open up yet another port
|
||||
// in their firewalls.
|
||||
//
|
||||
// the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001
|
||||
// Server browser related query packet processing for shared socket mode. These are used
|
||||
// when you pass STEAMGAMESERVER_QUERY_PORT_SHARED as the query port to SteamGameServer_Init.
|
||||
// IP address and port are in host order, i.e 127.0.0.1 == 0x7f000001
|
||||
|
||||
// These are used when you've elected to multiplex the game server's UDP socket
|
||||
// rather than having the master server updater use its own sockets.
|
||||
@ -223,21 +205,9 @@ public:
|
||||
virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0;
|
||||
|
||||
//
|
||||
// Control heartbeats / advertisement with master server
|
||||
// Server clan association
|
||||
//
|
||||
|
||||
// Call this as often as you like to tell the master server updater whether or not
|
||||
// you want it to be active (default: off).
|
||||
virtual void EnableHeartbeats( bool bActive ) = 0;
|
||||
|
||||
// You usually don't need to modify this.
|
||||
// Pass -1 to use the default value for iHeartbeatInterval.
|
||||
// Some mods change this.
|
||||
virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0;
|
||||
|
||||
// Force a heartbeat to steam at the next opportunity
|
||||
virtual void ForceHeartbeat() = 0;
|
||||
|
||||
// associate this game server with this clan for the purposes of computing player compat
|
||||
STEAM_CALL_RESULT( AssociateWithClanResult_t )
|
||||
virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0;
|
||||
@ -246,9 +216,55 @@ public:
|
||||
STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
|
||||
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
// Handles receiving a new connection from a Steam user. This call will ask the Steam
|
||||
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
|
||||
// are off-line, then it will validate the cached ticket itself which will validate app ownership
|
||||
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
|
||||
// and must then be sent up to the game server for authentication.
|
||||
//
|
||||
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
|
||||
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
|
||||
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual bool SendUserConnectAndAuthenticate_DEPRECATED( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0;
|
||||
|
||||
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
|
||||
//
|
||||
// Return Value: Returns a SteamID for the user to be tracked with, you should call EndAuthSession()
|
||||
// when this user leaves the server just like you would for a real user.
|
||||
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
|
||||
|
||||
// Should be called whenever a user leaves our game server, this lets Steam internally
|
||||
// track which users are currently on which servers for the purposes of preventing a single
|
||||
// account being logged into multiple servers, showing who is currently on a server, etc.
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual void SendUserDisconnect_DEPRECATED( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
|
||||
// currently connected to the server. For regular users you must call this after you receive a
|
||||
// GSUserValidationSuccess callback.
|
||||
//
|
||||
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
|
||||
virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0;
|
||||
|
||||
// Deprecated functions. These will be removed in a future version of the SDK.
|
||||
// If you really need these, please contact us and help us understand what you are
|
||||
// using them for.
|
||||
|
||||
STEAM_PRIVATE_API(
|
||||
virtual void SetMasterServerHeartbeatInterval_DEPRECATED( int iHeartbeatInterval ) = 0;
|
||||
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;
|
||||
)
|
||||
};
|
||||
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer013"
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer014"
|
||||
|
||||
// Global accessor
|
||||
inline ISteamGameServer *SteamGameServer();
|
||||
|
@ -201,7 +201,6 @@ public:
|
||||
virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0;
|
||||
|
||||
// You MUST call this in response to a HTML_FileOpenDialog_t callback
|
||||
STEAM_IGNOREATTR()
|
||||
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
|
||||
};
|
||||
|
||||
|
@ -206,11 +206,11 @@ enum EInputActionOrigin
|
||||
k_EInputActionOrigin_XBoxOne_DPad_West,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_East,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_Move,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved1,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved2,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved3,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved4,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved5,
|
||||
k_EInputActionOrigin_XBoxOne_LeftGrip_Lower,
|
||||
k_EInputActionOrigin_XBoxOne_LeftGrip_Upper,
|
||||
k_EInputActionOrigin_XBoxOne_RightGrip_Lower,
|
||||
k_EInputActionOrigin_XBoxOne_RightGrip_Upper,
|
||||
k_EInputActionOrigin_XBoxOne_Share, // Xbox Series X controllers only
|
||||
k_EInputActionOrigin_XBoxOne_Reserved6,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved7,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved8,
|
||||
@ -450,6 +450,20 @@ enum ESteamControllerPad
|
||||
k_ESteamControllerPad_Right
|
||||
};
|
||||
|
||||
enum EControllerHapticLocation
|
||||
{
|
||||
k_EControllerHapticLocation_Left = ( 1 << k_ESteamControllerPad_Left ),
|
||||
k_EControllerHapticLocation_Right = ( 1 << k_ESteamControllerPad_Right ),
|
||||
k_EControllerHapticLocation_Both = ( 1 << k_ESteamControllerPad_Left | 1 << k_ESteamControllerPad_Right ),
|
||||
};
|
||||
|
||||
enum EControllerHapticType
|
||||
{
|
||||
k_EControllerHapticType_Off,
|
||||
k_EControllerHapticType_Tick,
|
||||
k_EControllerHapticType_Click,
|
||||
};
|
||||
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
@ -470,6 +484,16 @@ enum ESteamInputType
|
||||
k_ESteamInputType_MaximumPossibleValue = 255,
|
||||
};
|
||||
|
||||
// Individual values are used by the GetSessionInputConfigurationSettings bitmask
|
||||
enum ESteamInputConfigurationEnableType
|
||||
{
|
||||
k_ESteamInputConfigurationEnableType_None = 0x0000,
|
||||
k_ESteamInputConfigurationEnableType_Playstation = 0x0001,
|
||||
k_ESteamInputConfigurationEnableType_Xbox = 0x0002,
|
||||
k_ESteamInputConfigurationEnableType_Generic = 0x0004,
|
||||
k_ESteamInputConfigurationEnableType_Switch = 0x0008,
|
||||
};
|
||||
|
||||
// These values are passed into SetLEDColor
|
||||
enum ESteamInputLEDFlag
|
||||
{
|
||||
@ -479,11 +503,24 @@ enum ESteamInputLEDFlag
|
||||
k_ESteamInputLEDFlag_RestoreUserDefault
|
||||
};
|
||||
|
||||
// These values are passed into GetGlyphPNGForActionOrigin
|
||||
enum ESteamInputGlyphSize
|
||||
{
|
||||
k_ESteamInputGlyphSize_Small,
|
||||
k_ESteamInputGlyphSize_Medium,
|
||||
k_ESteamInputGlyphSize_Large,
|
||||
};
|
||||
|
||||
enum ESteamInputActionEventType
|
||||
{
|
||||
ESteamInputActionEventType_DigitalAction,
|
||||
ESteamInputActionEventType_AnalogAction,
|
||||
};
|
||||
|
||||
// InputHandle_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 InputHandle_t;
|
||||
|
||||
|
||||
// These handles are used to refer to a specific in-game action or action set
|
||||
// All action handles should be queried during initialization for performance reasons
|
||||
typedef uint64 InputActionSetHandle_t;
|
||||
@ -532,8 +569,29 @@ struct InputMotionData_t
|
||||
float rotVelZ;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: when callbacks are enabled this fires each time a controller action
|
||||
// state changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputActionEvent_t
|
||||
{
|
||||
InputHandle_t controllerHandle;
|
||||
ESteamInputActionEventType eEventType;
|
||||
union {
|
||||
struct {
|
||||
InputAnalogActionHandle_t actionHandle;
|
||||
InputAnalogActionData_t analogActionData;
|
||||
} analogAction;
|
||||
struct {
|
||||
InputDigitalActionHandle_t actionHandle;
|
||||
InputDigitalActionData_t digitalActionData;
|
||||
} digitalAction;
|
||||
};
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
typedef void ( *SteamInputActionEventCallbackPointer )( SteamInputActionEvent_t * );
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Input API
|
||||
@ -542,15 +600,33 @@ class ISteamInput
|
||||
{
|
||||
public:
|
||||
|
||||
// Init and Shutdown must be called when starting/ending use of this interface
|
||||
virtual bool Init() = 0;
|
||||
// Init and Shutdown must be called when starting/ending use of this interface.
|
||||
// if bExplicitlyCallRunFrame is called then you will need to manually call RunFrame
|
||||
// each frame, otherwise Steam Input will updated when SteamAPI_RunCallbacks() is called
|
||||
virtual bool Init( bool bExplicitlyCallRunFrame ) = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
||||
// Synchronize API state with the latest Steam Controller inputs available. This
|
||||
// Set the absolute path to the Input Action Manifest file containing the in-game actions
|
||||
// and file paths to the official configurations. Used in games that bundle Steam Input
|
||||
// configurations inside of the game depot instead of using the Steam Workshop
|
||||
virtual bool SetInputActionManifestFilePath( const char *pchInputActionManifestAbsolutePath ) = 0;
|
||||
|
||||
// Synchronize API state with the latest Steam Input action data available. This
|
||||
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
|
||||
// possible latency, you call this directly before reading controller state. This must
|
||||
// be called from somewhere before GetConnectedControllers will return any handles
|
||||
virtual void RunFrame() = 0;
|
||||
// possible latency, you call this directly before reading controller state.
|
||||
// Note: This must be called from somewhere before GetConnectedControllers will
|
||||
// return any handles
|
||||
virtual void RunFrame( bool bReservedValue = true ) = 0;
|
||||
|
||||
// Waits on an IPC event from Steam sent when there is new data to be fetched from
|
||||
// the data drop. Returns true when data was recievied before the timeout expires.
|
||||
// Useful for games with a dedicated input thread
|
||||
virtual bool BWaitForData( bool bWaitForever, uint32 unTimeout ) = 0;
|
||||
|
||||
// Returns true if new data has been received since the last time action data was accessed
|
||||
// via GetDigitalActionData or GetAnalogActionData. The game will still need to call
|
||||
// SteamInput()->RunFrame() or SteamAPI_RunCallbacks() before this to update the data stream
|
||||
virtual bool BNewDataAvailable() = 0;
|
||||
|
||||
// Enumerate currently connected Steam Input enabled devices - developers can opt in controller by type (ex: Xbox/Playstation/etc) via
|
||||
// the Steam Input settings in the Steamworks site or users can opt-in in their controller settings in Steam.
|
||||
@ -558,6 +634,32 @@ public:
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetConnectedControllers( STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_COUNT, Receives list of connected controllers ) InputHandle_t *handlesOut ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CALLBACKS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Controller configuration loaded - these callbacks will always fire if you have
|
||||
// a handler. Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
STEAM_CALL_BACK( SteamInputConfigurationLoaded_t )
|
||||
|
||||
// Enable SteamInputDeviceConnected_t and SteamInputDeviceDisconnected_t callbacks.
|
||||
// Each controller that is already connected will generate a device connected
|
||||
// callback when you enable them
|
||||
virtual void EnableDeviceCallbacks() = 0;
|
||||
|
||||
// Controller Connected - provides info about a single newly connected controller
|
||||
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
STEAM_CALL_BACK( SteamInputDeviceConnected_t )
|
||||
|
||||
// Controller Disconnected - provides info about a single disconnected controller
|
||||
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
STEAM_CALL_BACK( SteamInputDeviceDisconnected_t )
|
||||
|
||||
// Enable SteamInputActionEvent_t callbacks. Directly calls your callback function
|
||||
// for lower latency than standard Steam callbacks. Supports one callback at a time.
|
||||
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
virtual void EnableActionEventCallbacks( SteamInputActionEventCallbackPointer pCallback ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTION SETS
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -575,8 +677,9 @@ public:
|
||||
virtual void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Enumerate currently active layers.
|
||||
// handlesOut should point to a STEAM_INPUT_MAX_ACTIVE_LAYERS sized array of ControllerActionSetHandle_t handles
|
||||
// handlesOut should point to a STEAM_INPUT_MAX_ACTIVE_LAYERS sized array of InputActionSetHandle_t handles
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetActiveActionSetLayers( InputHandle_t inputHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ACTIVE_LAYERS, Receives list of active layers ) InputActionSetHandle_t *handlesOut ) = 0;
|
||||
|
||||
@ -595,6 +698,9 @@ public:
|
||||
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
|
||||
virtual int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
|
||||
virtual const char *GetStringForDigitalActionName( InputDigitalActionHandle_t eActionHandle ) = 0;
|
||||
|
||||
// Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual InputAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
@ -606,12 +712,21 @@ public:
|
||||
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
|
||||
virtual int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular origin
|
||||
virtual const char *GetGlyphForActionOrigin( EInputActionOrigin eOrigin ) = 0;
|
||||
// Get a local path to a PNG file for the provided origin's glyph.
|
||||
virtual const char *GetGlyphPNGForActionOrigin( EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags ) = 0;
|
||||
|
||||
// Get a local path to a SVG file for the provided origin's glyph.
|
||||
virtual const char *GetGlyphSVGForActionOrigin( EInputActionOrigin eOrigin, uint32 unFlags ) = 0;
|
||||
|
||||
// Get a local path to an older, Big Picture Mode-style PNG file for a particular origin
|
||||
virtual const char *GetGlyphForActionOrigin_Legacy( EInputActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified origin.
|
||||
virtual const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
|
||||
virtual const char *GetStringForAnalogActionName( InputAnalogActionHandle_t eActionHandle ) = 0;
|
||||
|
||||
// Stop analog momentum for the action if it is a mouse action in trackball mode
|
||||
virtual void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) = 0;
|
||||
|
||||
@ -625,20 +740,26 @@ public:
|
||||
// Trigger a vibration event on supported controllers - Steam will translate these commands into haptic pulses for Steam Controllers
|
||||
virtual void TriggerVibration( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0;
|
||||
|
||||
// Trigger a vibration event on supported controllers including Xbox trigger impulse rumble - Steam will translate these commands into haptic pulses for Steam Controllers
|
||||
virtual void TriggerVibrationExtended( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed ) = 0;
|
||||
|
||||
// Send a haptic pulse, works on Steam Deck and Steam Controller devices
|
||||
virtual void TriggerSimpleHapticEvent( InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB ) = 0;
|
||||
|
||||
// Set the controller LED color on supported controllers. nFlags is a bitmask of values from ESteamInputLEDFlag - 0 will default to setting a color. Steam will handle
|
||||
// the behavior on exit of your program so you don't need to try restore the default as you are shutting down
|
||||
virtual void SetLEDColor( InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
|
||||
|
||||
// Trigger a haptic pulse on a Steam Controller - if you are approximating rumble you may want to use TriggerVibration instead.
|
||||
// Good uses for Haptic pulses include chimes, noises, or directional gameplay feedback (taking damage, footstep locations, etc).
|
||||
virtual void TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
|
||||
virtual void Legacy_TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
|
||||
|
||||
// Trigger a haptic pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. If you are approximating rumble you may want to use TriggerVibration instead.
|
||||
// nFlags is currently unused and reserved for future use.
|
||||
virtual void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
|
||||
virtual void Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions availible without using the rest of Steam Input API
|
||||
// Utility functions available without using the rest of Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
|
||||
@ -677,12 +798,64 @@ public:
|
||||
// Get the Steam Remote Play session ID associated with a device, or 0 if there is no session associated with it
|
||||
// See isteamremoteplay.h for more information on Steam Remote Play sessions
|
||||
virtual uint32 GetRemotePlaySessionID( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Get a bitmask of the Steam Input Configuration types opted in for the current session. Returns ESteamInputConfigurationEnableType values.?
|
||||
// Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration
|
||||
virtual uint16 GetSessionInputConfigurationSettings() = 0;
|
||||
};
|
||||
|
||||
#define STEAMINPUT_INTERFACE_VERSION "SteamInput002"
|
||||
#define STEAMINPUT_INTERFACE_VERSION "SteamInput005"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamInput *SteamInput();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION );
|
||||
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a new controller has been connected, will fire once
|
||||
// per controller if multiple new controllers connect in the same frame
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputDeviceConnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 1 };
|
||||
InputHandle_t m_ulConnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a new controller has been connected, will fire once
|
||||
// per controller if multiple new controllers connect in the same frame
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputDeviceDisconnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 2 };
|
||||
InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a controller configuration has been loaded, will fire once
|
||||
// per controller per focus change for Steam Input enabled controllers
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputConfigurationLoaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 3 };
|
||||
AppId_t m_unAppID;
|
||||
InputHandle_t m_ulDeviceHandle; // Handle for device
|
||||
CSteamID m_ulMappingCreator; // May differ from local user when using
|
||||
// an unmodified community or official config
|
||||
uint32 m_unMajorRevision; // Binding revision from In-game Action File.
|
||||
// Same value as queried by GetDeviceBindingRevision
|
||||
uint32 m_unMinorRevision;
|
||||
bool m_bUsesSteamInputAPI; // Does the configuration contain any Analog/Digital actions?
|
||||
bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings?
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMINPUT_H
|
@ -86,12 +86,10 @@ public:
|
||||
// k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later
|
||||
// k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits
|
||||
// k_EResultFail - ERROR: unknown / generic error
|
||||
STEAM_METHOD_DESC(Find out the status of an asynchronous inventory result handle.)
|
||||
virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
// Copies the contents of a result set into a flat array. The specific
|
||||
// contents of the result set depend on which query which was used.
|
||||
STEAM_METHOD_DESC(Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.)
|
||||
virtual bool GetResultItems( SteamInventoryResult_t resultHandle,
|
||||
STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray,
|
||||
uint32 *punOutItemsArraySize ) = 0;
|
||||
@ -115,17 +113,14 @@ public:
|
||||
|
||||
// Returns the server time at which the result was generated. Compare against
|
||||
// the value of IClientUtils::GetServerRealTime() to determine age.
|
||||
STEAM_METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.)
|
||||
virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
// Returns true if the result belongs to the target steam ID, false if the
|
||||
// result does not. This is important when using DeserializeResult, to verify
|
||||
// that a remote player is not pretending to have a different user's inventory.
|
||||
STEAM_METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.)
|
||||
virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0;
|
||||
|
||||
// Destroys a result handle and frees all associated memory.
|
||||
STEAM_METHOD_DESC(Destroys a result handle and frees all associated memory.)
|
||||
virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
|
||||
@ -139,7 +134,6 @@ public:
|
||||
// cached results if called too frequently. It is suggested that you call
|
||||
// this function only when you are about to display the user's full inventory,
|
||||
// or if you expect that the inventory may have changed.
|
||||
STEAM_METHOD_DESC(Captures the entire state of the current users Steam inventory.)
|
||||
virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0;
|
||||
|
||||
|
||||
@ -150,7 +144,6 @@ public:
|
||||
// For example, you could call GetItemsByID with the IDs of the user's
|
||||
// currently equipped cosmetic items and serialize this to a buffer, and
|
||||
// then transmit this buffer to other players upon joining a game.
|
||||
STEAM_METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.)
|
||||
virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0;
|
||||
|
||||
|
||||
@ -205,7 +198,6 @@ public:
|
||||
// and grants the items (one time only). On success, the result set will include items which
|
||||
// were granted, if any. If no items were granted because the user isn't eligible for any
|
||||
// promotions, this is still considered a success.
|
||||
STEAM_METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).)
|
||||
virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0;
|
||||
|
||||
// AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of
|
||||
@ -218,7 +210,6 @@ 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.
|
||||
STEAM_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 item generation and consumption.
|
||||
@ -245,7 +236,6 @@ public:
|
||||
//
|
||||
|
||||
// Deprecated. Calling this method is not required for proper playtime accounting.
|
||||
STEAM_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
|
||||
@ -257,7 +247,6 @@ public:
|
||||
// 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.
|
||||
STEAM_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;
|
||||
|
||||
|
||||
@ -281,7 +270,6 @@ public:
|
||||
// Every time new item definitions are available (eg, from the dynamic addition of new
|
||||
// item types while players are still in-game), a SteamInventoryDefinitionUpdate_t
|
||||
// callback will be fired.
|
||||
STEAM_METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.)
|
||||
virtual bool LoadItemDefinitions() = 0;
|
||||
|
||||
// GetItemDefinitionIDs returns the set of all defined item definition IDs (which are
|
||||
@ -366,7 +354,6 @@ public:
|
||||
// Submit the update request by handle
|
||||
virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0;
|
||||
|
||||
STEAM_METHOD_DESC(Look up the given token and return a pseudo-Inventory item.)
|
||||
virtual bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) = 0;
|
||||
};
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
#error "This file isn't used any more"
|
@ -15,10 +15,13 @@ class ISteamNetworkingSignalingRecvContext;
|
||||
/// Lower level networking API.
|
||||
///
|
||||
/// - Connection-oriented API (like TCP, not UDP). When sending and receiving
|
||||
/// messages, a connection handle is used. (For a UDP-style interface, see
|
||||
/// ISteamNetworkingMessages.) In this TCP-style interface, the "server" will
|
||||
/// "listen" on a "listen socket." A "client" will "connect" to the server,
|
||||
/// and the server will "accept" the connection.
|
||||
/// messages, a connection handle is used. (For a UDP-style interface, where
|
||||
/// the peer is identified by their address with each send/recv call, see
|
||||
/// ISteamNetworkingMessages.) The typical pattern is for a "server" to "listen"
|
||||
/// on a "listen socket." A "client" will "connect" to the server, and the
|
||||
/// server will "accept" the connection. If you have a symmetric situation
|
||||
/// where either peer may initiate the connection and server/client roles are
|
||||
/// not clearly defined, check out k_ESteamNetworkingConfig_SymmetricConnect.
|
||||
/// - But unlike TCP, it's message-oriented, not stream-oriented.
|
||||
/// - Mix of reliable and unreliable messages
|
||||
/// - Fragmentation and reassembly
|
||||
@ -192,7 +195,23 @@ public:
|
||||
/// Set connection user data. the data is returned in the following places
|
||||
/// - You can query it using GetConnectionUserData.
|
||||
/// - The SteamNetworkingmessage_t structure.
|
||||
/// - The SteamNetConnectionInfo_t structure. (Which is a member of SteamNetConnectionStatusChangedCallback_t.)
|
||||
/// - The SteamNetConnectionInfo_t structure.
|
||||
/// (Which is a member of SteamNetConnectionStatusChangedCallback_t -- but see WARNINGS below!!!!)
|
||||
///
|
||||
/// Do you need to set this atomically when the connection is created?
|
||||
/// See k_ESteamNetworkingConfig_ConnectionUserData.
|
||||
///
|
||||
/// WARNING: Be *very careful* when using the value provided in callbacks structs.
|
||||
/// Callbacks are queued, and the value that you will receive in your
|
||||
/// callback is the userdata that was effective at the time the callback
|
||||
/// was queued. There are subtle race conditions that can happen if you
|
||||
/// don't understand this!
|
||||
///
|
||||
/// If any incoming messages for this connection are queued, the userdata
|
||||
/// field is updated, so that when when you receive messages (e.g. with
|
||||
/// ReceiveMessagesOnConnection), they will always have the very latest
|
||||
/// userdata. So the tricky race conditions that can happen with callbacks
|
||||
/// do not apply to retrieving messages.
|
||||
///
|
||||
/// Returns false if the handle is invalid.
|
||||
virtual bool SetConnectionUserData( HSteamNetConnection hPeer, int64 nUserData ) = 0;
|
||||
@ -258,7 +277,7 @@ public:
|
||||
/// m_pData at your buffer and set the callback to the appropriate function
|
||||
/// to free it. Note that if you use your own buffer, it MUST remain valid
|
||||
/// until the callback is executed. And also note that your callback can be
|
||||
/// invoked at ant time from any thread (perhaps even before SendMessages
|
||||
/// invoked at any time from any thread (perhaps even before SendMessages
|
||||
/// returns!), so it MUST be fast and threadsafe.
|
||||
///
|
||||
/// You MUST also fill in:
|
||||
@ -654,15 +673,15 @@ public:
|
||||
/// to call ISteamNetworkingUtils::InitRelayNetworkAccess() when your app initializes
|
||||
virtual bool ReceivedP2PCustomSignal( const void *pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext *pContext ) = 0;
|
||||
|
||||
//
|
||||
// Certificate provision by the application. On Steam, we normally handle all this automatically
|
||||
// and you will not need to use these advanced functions.
|
||||
//
|
||||
//
|
||||
// Certificate provision by the application. On Steam, we normally handle all this automatically
|
||||
// and you will not need to use these advanced functions.
|
||||
//
|
||||
|
||||
/// Get blob that describes a certificate request. You can send this to your game coordinator.
|
||||
/// Upon entry, *pcbBlob should contain the size of the buffer. On successful exit, it will
|
||||
/// return the number of bytes that were populated. You can pass pBlob=NULL to query for the required
|
||||
/// size. (256 bytes is a very conservative estimate.)
|
||||
/// size. (512 bytes is a conservative estimate.)
|
||||
///
|
||||
/// Pass this blob to your game coordinator and call SteamDatagram_CreateCert.
|
||||
virtual bool GetCertificateRequest( int *pcbBlob, void *pBlob, SteamNetworkingErrMsg &errMsg ) = 0;
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
/// currently answer the question for some other reason.
|
||||
///
|
||||
/// Do you need to be able to do this from a backend/matchmaking server?
|
||||
/// You are looking for the "ticketgen" library.
|
||||
/// You are looking for the "game coordinator" library.
|
||||
virtual int EstimatePingTimeBetweenTwoLocations( const SteamNetworkPingLocation_t &location1, const SteamNetworkPingLocation_t &location2 ) = 0;
|
||||
|
||||
/// Same as EstimatePingTime, but assumes that one location is the local host.
|
||||
|
@ -156,6 +156,28 @@ enum EUGCReadAction
|
||||
k_EUGCRead_Close = 2,
|
||||
};
|
||||
|
||||
enum ERemoteStorageLocalFileChange
|
||||
{
|
||||
k_ERemoteStorageLocalFileChange_Invalid = 0,
|
||||
|
||||
// The file was updated from another device
|
||||
k_ERemoteStorageLocalFileChange_FileUpdated = 1,
|
||||
|
||||
// The file was deleted by another device
|
||||
k_ERemoteStorageLocalFileChange_FileDeleted = 2,
|
||||
};
|
||||
|
||||
enum ERemoteStorageFilePathType
|
||||
{
|
||||
k_ERemoteStorageFilePathType_Invalid = 0,
|
||||
|
||||
// The file is directly accessed by the game and this is the full path
|
||||
k_ERemoteStorageFilePathType_Absolute = 1,
|
||||
|
||||
// The file is accessed via the ISteamRemoteStorage API and this is the filename
|
||||
k_ERemoteStorageFilePathType_APIFilename = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing, reading and writing files stored remotely
|
||||
@ -238,24 +260,6 @@ class ISteamRemoteStorage
|
||||
virtual int32 GetCachedUGCCount() = 0;
|
||||
virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0;
|
||||
|
||||
// The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you
|
||||
// On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget.
|
||||
|
||||
#if defined(_SERVER)
|
||||
// Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback
|
||||
virtual void GetFileListFromServer() = 0;
|
||||
// Indicate this file should be downloaded in the next sync
|
||||
virtual bool FileFetch( const char *pchFile ) = 0;
|
||||
// Indicate this file should be persisted in the next sync
|
||||
virtual bool FilePersist( const char *pchFile ) = 0;
|
||||
// Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback
|
||||
virtual bool SynchronizeToClient() = 0;
|
||||
// Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback
|
||||
virtual bool SynchronizeToServer() = 0;
|
||||
// Reset any fetch/persist/etc requests
|
||||
virtual bool ResetFileRequestState() = 0;
|
||||
#endif
|
||||
|
||||
// publishing UGC
|
||||
STEAM_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;
|
||||
@ -305,9 +309,18 @@ class ISteamRemoteStorage
|
||||
|
||||
STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t )
|
||||
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
|
||||
|
||||
// Cloud dynamic state change notification
|
||||
virtual int32 GetLocalFileChangeCount() = 0;
|
||||
virtual const char *GetLocalFileChange( int iFile, ERemoteStorageLocalFileChange *pEChangeType, ERemoteStorageFilePathType *pEFilePathType ) = 0;
|
||||
|
||||
// Indicate to Steam the beginning / end of a set of local file
|
||||
// operations - for example, writing a game save that requires updating two files.
|
||||
virtual bool BeginFileWriteBatch() = 0;
|
||||
virtual bool EndFileWriteBatch() = 0;
|
||||
};
|
||||
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION014"
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION016"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamRemoteStorage *SteamRemoteStorage();
|
||||
@ -322,61 +335,13 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemoteStorage *, SteamRemoteStorage,
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent when the local file cache is fully synced with the server for an app
|
||||
// That means that an application can be started and has all latest files
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncedClient_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 1 };
|
||||
AppId_t m_nAppID;
|
||||
EResult m_eResult;
|
||||
int m_unNumDownloads;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent when the server is fully synced with the local file cache for an app
|
||||
// That means that we can shutdown Steam and our data is stored on the server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncedServer_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 2 };
|
||||
AppId_t m_nAppID;
|
||||
EResult m_eResult;
|
||||
int m_unNumUploads;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Status of up and downloads during a sync session
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncProgress_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 3 };
|
||||
char m_rgchCurrentFile[k_cchFilenameMax]; // Current file being transferred
|
||||
AppId_t m_nAppID; // App this info relates to
|
||||
uint32 m_uBytesTransferredThisChunk; // Bytes transferred this chunk
|
||||
double m_dAppPercentComplete; // Percent complete that this app's transfers are
|
||||
bool m_bUploading; // if false, downloading
|
||||
};
|
||||
|
||||
//
|
||||
// IMPORTANT! k_iClientRemoteStorageCallbacks + 4 is used, see iclientremotestorage.h
|
||||
// IMPORTANT! k_iClientRemoteStorageCallbacks 1 through 6 are used, see iclientremotestorage.h
|
||||
//
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sent after we've determined the list of files that are out of sync
|
||||
// with the server.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncStatusCheck_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 5 };
|
||||
AppId_t m_nAppID;
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to FileShare()
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -403,6 +368,9 @@ struct RemoteStoragePublishFileResult_t
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
};
|
||||
|
||||
// k_iClientRemoteStorageCallbacks + 10 is deprecated! Do not reuse
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to DeletePublishedFile()
|
||||
@ -682,6 +650,14 @@ struct RemoteStorageFileReadAsyncComplete_t
|
||||
uint32 m_cubRead; // amount read - will the <= the amount requested
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: one or more files for this app have changed locally after syncing
|
||||
// to remote session changes
|
||||
// Note: only posted if this happens DURING the local app session
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( RemoteStorageLocalFileChange_t, k_iClientRemoteStorageCallbacks + 33 )
|
||||
STEAM_CALLBACK_END( 0 )
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
@ -99,6 +99,7 @@ enum EUGCQuery
|
||||
k_EUGCQuery_RankedByLifetimeAveragePlaytime = 16,
|
||||
k_EUGCQuery_RankedByPlaytimeSessionsTrend = 17,
|
||||
k_EUGCQuery_RankedByLifetimePlaytimeSessions = 18,
|
||||
k_EUGCQuery_RankedByLastUpdatedDate = 19,
|
||||
};
|
||||
|
||||
enum EItemUpdateStatus
|
||||
@ -360,6 +361,12 @@ public:
|
||||
// delete the item without prompting the user
|
||||
STEAM_CALL_RESULT( DeleteItemResult_t )
|
||||
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
|
||||
// Show the app's latest Workshop EULA to the user in an overlay window, where they can accept it or not
|
||||
virtual bool ShowWorkshopEULA() = 0;
|
||||
// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA
|
||||
STEAM_CALL_RESULT( WorkshopEULAStatus_t )
|
||||
virtual SteamAPICall_t GetWorkshopEULAStatus() = 0;
|
||||
};
|
||||
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION015"
|
||||
@ -566,6 +573,31 @@ struct DeleteItemResult_t
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: signal that the list of subscribed items changed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserSubscribedItemsListChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 18 };
|
||||
AppId_t m_nAppID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA
|
||||
//-----------------------------------------------------------------------------
|
||||
struct WorkshopEULAStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 20 };
|
||||
EResult m_eResult;
|
||||
AppId_t m_nAppID;
|
||||
uint32 m_unVersion;
|
||||
RTime32 m_rtAction;
|
||||
bool m_bAccepted;
|
||||
bool m_bNeedsAction;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMUGC_H
|
||||
|
@ -47,11 +47,17 @@ public:
|
||||
//
|
||||
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
|
||||
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
|
||||
virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual int InitiateGameConnection_DEPRECATED( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
|
||||
|
||||
// notify of disconnect
|
||||
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
|
||||
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual void TerminateGameConnection_DEPRECATED( uint32 unIPServer, uint16 usPortServer ) = 0;
|
||||
|
||||
// Legacy functions
|
||||
|
||||
|
@ -210,8 +210,7 @@ public:
|
||||
// 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
|
||||
STEAM_METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers)
|
||||
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
|
||||
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
|
||||
virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard,
|
||||
STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0;
|
||||
|
||||
|
@ -41,6 +41,14 @@ enum EGamepadTextInputLineMode
|
||||
k_EGamepadTextInputLineModeMultipleLines = 1
|
||||
};
|
||||
|
||||
enum EFloatingGamepadTextInputMode
|
||||
{
|
||||
k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeEmail = 2,
|
||||
k_EFloatingGamepadTextInputModeModeNumeric = 3,
|
||||
|
||||
};
|
||||
|
||||
// The context where text filtering is being done
|
||||
enum ETextFilteringContext
|
||||
@ -146,7 +154,7 @@ public:
|
||||
STEAM_CALL_RESULT( CheckFileSignature_t )
|
||||
virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0;
|
||||
|
||||
// Activates the Big Picture text input dialog which only supports gamepad input
|
||||
// Activates the full-screen text input dialog which takes a initial text string and returns the text the user has typed
|
||||
virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0;
|
||||
|
||||
// Returns previously entered text & length
|
||||
@ -203,6 +211,16 @@ public:
|
||||
// Return what we believe your current ipv6 connectivity to "the internet" is on the specified protocol.
|
||||
// This does NOT tell you if the Steam client is currently connected to Steam via ipv6.
|
||||
virtual ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProtocol eProtocol ) = 0;
|
||||
|
||||
// returns true if currently running on the Steam Deck device
|
||||
virtual bool IsSteamRunningOnSteamDeck() = 0;
|
||||
|
||||
// Opens a floating keyboard over the game content and sends OS keyboard keys directly to the game.
|
||||
// The text field position is specified in pixels relative the origin of the game window and is used to position the floating keyboard in a way that doesn't cover the text field
|
||||
virtual bool ShowFloatingGamepadTextInput( EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight ) = 0;
|
||||
|
||||
// In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher
|
||||
virtual void SetGameLauncherMode( bool bLauncherMode ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils010"
|
||||
@ -289,7 +307,7 @@ struct CheckFileSignature_t
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Big Picture gamepad text input has been closed
|
||||
// Full Screen gamepad text input has been closed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GamepadTextInputDismissed_t
|
||||
{
|
||||
@ -298,7 +316,20 @@ struct GamepadTextInputDismissed_t
|
||||
uint32 m_unSubmittedText;
|
||||
};
|
||||
|
||||
// k_iSteamUtilsCallbacks + 15 is taken
|
||||
// k_iSteamUtilsCallbacks + 15 through 35 are taken
|
||||
|
||||
STEAM_CALLBACK_BEGIN( AppResumingFromSuspend_t, k_iSteamUtilsCallbacks + 36 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
// k_iSteamUtilsCallbacks + 37 is taken
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The floating on-screen keyboard has been closed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FloatingGamepadTextInputDismissed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 38 };
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -60,8 +60,8 @@ S_API ISteamUser *SteamAPI_SteamUser_v021();
|
||||
S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser( ISteamUser* self );
|
||||
S_API bool SteamAPI_ISteamUser_BLoggedOn( ISteamUser* self );
|
||||
S_API uint64_steamid SteamAPI_ISteamUser_GetSteamID( ISteamUser* self );
|
||||
S_API int SteamAPI_ISteamUser_InitiateGameConnection( ISteamUser* self, void * pAuthBlob, int cbMaxAuthBlob, uint64_steamid steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure );
|
||||
S_API void SteamAPI_ISteamUser_TerminateGameConnection( ISteamUser* self, uint32 unIPServer, uint16 usPortServer );
|
||||
S_API int SteamAPI_ISteamUser_InitiateGameConnection_DEPRECATED( ISteamUser* self, void * pAuthBlob, int cbMaxAuthBlob, uint64_steamid steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure );
|
||||
S_API void SteamAPI_ISteamUser_TerminateGameConnection_DEPRECATED( ISteamUser* self, uint32 unIPServer, uint16 usPortServer );
|
||||
S_API void SteamAPI_ISteamUser_TrackAppUsageEvent( ISteamUser* self, uint64_gameid gameID, int eAppUsageEvent, const char * pchExtraInfo );
|
||||
S_API bool SteamAPI_ISteamUser_GetUserDataFolder( ISteamUser* self, char * pchBuffer, int cubBuffer );
|
||||
S_API void SteamAPI_ISteamUser_StartVoiceRecording( ISteamUser* self );
|
||||
@ -204,6 +204,9 @@ S_API bool SteamAPI_ISteamUtils_IsSteamChinaLauncher( ISteamUtils* self );
|
||||
S_API bool SteamAPI_ISteamUtils_InitFilterText( ISteamUtils* self, uint32 unFilterOptions );
|
||||
S_API int SteamAPI_ISteamUtils_FilterText( ISteamUtils* self, ETextFilteringContext eContext, uint64_steamid sourceSteamID, const char * pchInputMessage, char * pchOutFilteredText, uint32 nByteSizeOutFilteredText );
|
||||
S_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6ConnectivityState( ISteamUtils* self, ESteamIPv6ConnectivityProtocol eProtocol );
|
||||
S_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck( ISteamUtils* self );
|
||||
S_API bool SteamAPI_ISteamUtils_ShowModalGamepadTextInput( ISteamUtils* self, EGamepadTextInputLineMode eLineInputMode );
|
||||
S_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode );
|
||||
|
||||
// ISteamMatchmaking
|
||||
S_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009();
|
||||
@ -318,7 +321,7 @@ S_API bool SteamAPI_ISteamParties_DestroyBeacon( ISteamParties* self, PartyBeaco
|
||||
S_API bool SteamAPI_ISteamParties_GetBeaconLocationData( ISteamParties* self, SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, char * pchDataStringOut, int cchDataStringOut );
|
||||
|
||||
// ISteamRemoteStorage
|
||||
S_API ISteamRemoteStorage *SteamAPI_SteamRemoteStorage_v014();
|
||||
S_API ISteamRemoteStorage *SteamAPI_SteamRemoteStorage_v016();
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_FileWrite( ISteamRemoteStorage* self, const char * pchFile, const void * pvData, int32 cubData );
|
||||
S_API int32 SteamAPI_ISteamRemoteStorage_FileRead( ISteamRemoteStorage* self, const char * pchFile, void * pvData, int32 cubDataToRead );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileWriteAsync( ISteamRemoteStorage* self, const char * pchFile, const void * pvData, uint32 cubData );
|
||||
@ -374,6 +377,10 @@ S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_SetUserPublishedFileAction( IS
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedFilesByUserAction( ISteamRemoteStorage* self, EWorkshopFileAction eAction, uint32 unStartIndex );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorkshopFiles( ISteamRemoteStorage* self, EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t * pTags, SteamParamStringArray_t * pUserTags );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation( ISteamRemoteStorage* self, UGCHandle_t hContent, const char * pchLocation, uint32 unPriority );
|
||||
S_API int32 SteamAPI_ISteamRemoteStorage_GetLocalFileChangeCount( ISteamRemoteStorage* self );
|
||||
S_API const char * SteamAPI_ISteamRemoteStorage_GetLocalFileChange( ISteamRemoteStorage* self, int iFile, ERemoteStorageLocalFileChange * pEChangeType, ERemoteStorageFilePathType * pEFilePathType );
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_BeginFileWriteBatch( ISteamRemoteStorage* self );
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_EndFileWriteBatch( ISteamRemoteStorage* self );
|
||||
|
||||
// ISteamUserStats
|
||||
S_API ISteamUserStats *SteamAPI_SteamUserStats_v012();
|
||||
@ -425,7 +432,6 @@ S_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat( ISteamUse
|
||||
|
||||
// ISteamApps
|
||||
S_API ISteamApps *SteamAPI_SteamApps_v008();
|
||||
S_API ISteamApps *SteamAPI_SteamGameServerApps_v008();
|
||||
S_API bool SteamAPI_ISteamApps_BIsSubscribed( ISteamApps* self );
|
||||
S_API bool SteamAPI_ISteamApps_BIsLowViolence( ISteamApps* self );
|
||||
S_API bool SteamAPI_ISteamApps_BIsCybercafe( ISteamApps* self );
|
||||
@ -571,11 +577,16 @@ S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( ISteamHTTP* self
|
||||
S_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( ISteamHTTP* self, HTTPRequestHandle hRequest, bool * pbWasTimedOut );
|
||||
|
||||
// ISteamInput
|
||||
S_API ISteamInput *SteamAPI_SteamInput_v002();
|
||||
S_API bool SteamAPI_ISteamInput_Init( ISteamInput* self );
|
||||
S_API ISteamInput *SteamAPI_SteamInput_v005();
|
||||
S_API bool SteamAPI_ISteamInput_Init( ISteamInput* self, bool bExplicitlyCallRunFrame );
|
||||
S_API bool SteamAPI_ISteamInput_Shutdown( ISteamInput* self );
|
||||
S_API void SteamAPI_ISteamInput_RunFrame( ISteamInput* self );
|
||||
S_API bool SteamAPI_ISteamInput_SetInputActionManifestFilePath( ISteamInput* self, const char * pchInputActionManifestAbsolutePath );
|
||||
S_API void SteamAPI_ISteamInput_RunFrame( ISteamInput* self, bool bReservedValue );
|
||||
S_API bool SteamAPI_ISteamInput_BWaitForData( ISteamInput* self, bool bWaitForever, uint32 unTimeout );
|
||||
S_API bool SteamAPI_ISteamInput_BNewDataAvailable( ISteamInput* self );
|
||||
S_API int SteamAPI_ISteamInput_GetConnectedControllers( ISteamInput* self, InputHandle_t * handlesOut );
|
||||
S_API void SteamAPI_ISteamInput_EnableDeviceCallbacks( ISteamInput* self );
|
||||
S_API void SteamAPI_ISteamInput_EnableActionEventCallbacks( ISteamInput* self, SteamInputActionEventCallbackPointer pCallback );
|
||||
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetActionSetHandle( ISteamInput* self, const char * pszActionSetName );
|
||||
S_API void SteamAPI_ISteamInput_ActivateActionSet( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
|
||||
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetCurrentActionSet( ISteamInput* self, InputHandle_t inputHandle );
|
||||
@ -586,17 +597,23 @@ S_API int SteamAPI_ISteamInput_GetActiveActionSetLayers( ISteamInput* self, Inpu
|
||||
S_API InputDigitalActionHandle_t SteamAPI_ISteamInput_GetDigitalActionHandle( ISteamInput* self, const char * pszActionName );
|
||||
S_API InputDigitalActionData_t SteamAPI_ISteamInput_GetDigitalActionData( ISteamInput* self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
S_API int SteamAPI_ISteamInput_GetDigitalActionOrigins( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin * originsOut );
|
||||
S_API const char * SteamAPI_ISteamInput_GetStringForDigitalActionName( ISteamInput* self, InputDigitalActionHandle_t eActionHandle );
|
||||
S_API InputAnalogActionHandle_t SteamAPI_ISteamInput_GetAnalogActionHandle( ISteamInput* self, const char * pszActionName );
|
||||
S_API InputAnalogActionData_t SteamAPI_ISteamInput_GetAnalogActionData( ISteamInput* self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
S_API int SteamAPI_ISteamInput_GetAnalogActionOrigins( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin * originsOut );
|
||||
S_API const char * SteamAPI_ISteamInput_GetGlyphForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin );
|
||||
S_API const char * SteamAPI_ISteamInput_GetGlyphPNGForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags );
|
||||
S_API const char * SteamAPI_ISteamInput_GetGlyphSVGForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin, uint32 unFlags );
|
||||
S_API const char * SteamAPI_ISteamInput_GetGlyphForActionOrigin_Legacy( ISteamInput* self, EInputActionOrigin eOrigin );
|
||||
S_API const char * SteamAPI_ISteamInput_GetStringForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin );
|
||||
S_API const char * SteamAPI_ISteamInput_GetStringForAnalogActionName( ISteamInput* self, InputAnalogActionHandle_t eActionHandle );
|
||||
S_API void SteamAPI_ISteamInput_StopAnalogActionMomentum( ISteamInput* self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
|
||||
S_API InputMotionData_t SteamAPI_ISteamInput_GetMotionData( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API void SteamAPI_ISteamInput_TriggerVibration( ISteamInput* self, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed );
|
||||
S_API void SteamAPI_ISteamInput_TriggerVibrationExtended( ISteamInput* self, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed );
|
||||
S_API void SteamAPI_ISteamInput_TriggerSimpleHapticEvent( ISteamInput* self, InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB );
|
||||
S_API void SteamAPI_ISteamInput_SetLEDColor( ISteamInput* self, InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags );
|
||||
S_API void SteamAPI_ISteamInput_TriggerHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec );
|
||||
S_API void SteamAPI_ISteamInput_TriggerRepeatedHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags );
|
||||
S_API void SteamAPI_ISteamInput_Legacy_TriggerHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec );
|
||||
S_API void SteamAPI_ISteamInput_Legacy_TriggerRepeatedHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags );
|
||||
S_API bool SteamAPI_ISteamInput_ShowBindingPanel( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API ESteamInputType SteamAPI_ISteamInput_GetInputTypeForHandle( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API InputHandle_t SteamAPI_ISteamInput_GetControllerForGamepadIndex( ISteamInput* self, int nIndex );
|
||||
@ -607,6 +624,7 @@ S_API EInputActionOrigin SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin( ISt
|
||||
S_API EInputActionOrigin SteamAPI_ISteamInput_TranslateActionOrigin( ISteamInput* self, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin );
|
||||
S_API bool SteamAPI_ISteamInput_GetDeviceBindingRevision( ISteamInput* self, InputHandle_t inputHandle, int * pMajor, int * pMinor );
|
||||
S_API uint32 SteamAPI_ISteamInput_GetRemotePlaySessionID( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API uint16 SteamAPI_ISteamInput_GetSessionInputConfigurationSettings( ISteamInput* self );
|
||||
|
||||
// ISteamController
|
||||
S_API ISteamController *SteamAPI_SteamController_v008();
|
||||
@ -730,6 +748,8 @@ S_API SteamAPICall_t SteamAPI_ISteamUGC_AddAppDependency( ISteamUGC* self, Publi
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveAppDependency( ISteamUGC* self, PublishedFileId_t nPublishedFileID, AppId_t nAppID );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
|
||||
S_API bool SteamAPI_ISteamUGC_ShowWorkshopEULA( ISteamUGC* self );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetWorkshopEULAStatus( ISteamUGC* self );
|
||||
|
||||
// ISteamAppList
|
||||
S_API ISteamAppList *SteamAPI_SteamAppList_v001();
|
||||
@ -858,8 +878,8 @@ S_API bool SteamAPI_ISteamNetworkingMessages_CloseChannelWithUser( ISteamNetwork
|
||||
S_API ESteamNetworkingConnectionState SteamAPI_ISteamNetworkingMessages_GetSessionConnectionInfo( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, SteamNetConnectionInfo_t * pConnectionInfo, SteamNetworkingQuickConnectionStatus * pQuickStatus );
|
||||
|
||||
// ISteamNetworkingSockets
|
||||
S_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v009();
|
||||
S_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009();
|
||||
S_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v011();
|
||||
S_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v011();
|
||||
S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & localAddress, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
|
||||
S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & address, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
|
||||
S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P( ISteamNetworkingSockets* self, int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
|
||||
@ -899,10 +919,11 @@ S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSigna
|
||||
S_API bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext * pContext );
|
||||
S_API bool SteamAPI_ISteamNetworkingSockets_GetCertificateRequest( ISteamNetworkingSockets* self, int * pcbBlob, void * pBlob, SteamNetworkingErrMsg & errMsg );
|
||||
S_API bool SteamAPI_ISteamNetworkingSockets_SetCertificate( ISteamNetworkingSockets* self, const void * pCertificate, int cbCertificate, SteamNetworkingErrMsg & errMsg );
|
||||
S_API void SteamAPI_ISteamNetworkingSockets_ResetIdentity( ISteamNetworkingSockets* self, const SteamNetworkingIdentity * pIdentity );
|
||||
S_API void SteamAPI_ISteamNetworkingSockets_RunCallbacks( ISteamNetworkingSockets* self );
|
||||
|
||||
// ISteamNetworkingUtils
|
||||
S_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_SteamAPI_v003();
|
||||
S_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_SteamAPI_v004();
|
||||
S_API SteamNetworkingMessage_t * SteamAPI_ISteamNetworkingUtils_AllocateMessage( ISteamNetworkingUtils* self, int cbAllocateBuffer );
|
||||
S_API void SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess( ISteamNetworkingUtils* self );
|
||||
S_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus( ISteamNetworkingUtils* self, SteamRelayNetworkStatus_t * pDetails );
|
||||
@ -933,15 +954,15 @@ S_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_MessagesSessionFaile
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType eDataType, const void * pArg );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct( ISteamNetworkingUtils* self, const SteamNetworkingConfigValue_t & opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj );
|
||||
S_API ESteamNetworkingGetConfigValueResult SteamAPI_ISteamNetworkingUtils_GetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType * pOutDataType, void * pResult, size_t * cbResult );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, const char ** pOutName, ESteamNetworkingConfigDataType * pOutDataType, ESteamNetworkingConfigScope * pOutScope, ESteamNetworkingConfigValue * pOutNextValue );
|
||||
S_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue( ISteamNetworkingUtils* self );
|
||||
S_API const char * SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType * pOutDataType, ESteamNetworkingConfigScope * pOutScope );
|
||||
S_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_IterateGenericEditableConfigValues( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eCurrent, bool bEnumerateDevVars );
|
||||
S_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIPAddr & addr, char * buf, uint32 cbBuf, bool bWithPort );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIPAddr * pAddr, const char * pszStr );
|
||||
S_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIdentity & identity, char * buf, uint32 cbBuf );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIdentity * pIdentity, const char * pszStr );
|
||||
|
||||
// ISteamGameServer
|
||||
S_API ISteamGameServer *SteamAPI_SteamGameServer_v013();
|
||||
S_API ISteamGameServer *SteamAPI_SteamGameServer_v014();
|
||||
S_API void SteamAPI_ISteamGameServer_SetProduct( ISteamGameServer* self, const char * pszProduct );
|
||||
S_API void SteamAPI_ISteamGameServer_SetGameDescription( ISteamGameServer* self, const char * pszGameDescription );
|
||||
S_API void SteamAPI_ISteamGameServer_SetModDir( ISteamGameServer* self, const char * pszModDir );
|
||||
@ -965,10 +986,7 @@ S_API void SteamAPI_ISteamGameServer_SetKeyValue( ISteamGameServer* self, const
|
||||
S_API void SteamAPI_ISteamGameServer_SetGameTags( ISteamGameServer* self, const char * pchGameTags );
|
||||
S_API void SteamAPI_ISteamGameServer_SetGameData( ISteamGameServer* self, const char * pchGameData );
|
||||
S_API void SteamAPI_ISteamGameServer_SetRegion( ISteamGameServer* self, const char * pszRegion );
|
||||
S_API bool SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate( ISteamGameServer* self, uint32 unIPClient, const void * pvAuthBlob, uint32 cubAuthBlobSize, CSteamID * pSteamIDUser );
|
||||
S_API uint64_steamid SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection( ISteamGameServer* self );
|
||||
S_API void SteamAPI_ISteamGameServer_SendUserDisconnect( ISteamGameServer* self, uint64_steamid steamIDUser );
|
||||
S_API bool SteamAPI_ISteamGameServer_BUpdateUserData( ISteamGameServer* self, uint64_steamid steamIDUser, const char * pchPlayerName, uint32 uScore );
|
||||
S_API void SteamAPI_ISteamGameServer_SetAdvertiseServerActive( ISteamGameServer* self, bool bActive );
|
||||
S_API HAuthTicket SteamAPI_ISteamGameServer_GetAuthSessionTicket( ISteamGameServer* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket );
|
||||
S_API EBeginAuthSessionResult SteamAPI_ISteamGameServer_BeginAuthSession( ISteamGameServer* self, const void * pAuthTicket, int cbAuthTicket, uint64_steamid steamID );
|
||||
S_API void SteamAPI_ISteamGameServer_EndAuthSession( ISteamGameServer* self, uint64_steamid steamID );
|
||||
@ -980,11 +998,12 @@ S_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation( ISteamGameSe
|
||||
S_API SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP( ISteamGameServer* self );
|
||||
S_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket( ISteamGameServer* self, const void * pData, int cbData, uint32 srcIP, uint16 srcPort );
|
||||
S_API int SteamAPI_ISteamGameServer_GetNextOutgoingPacket( ISteamGameServer* self, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort );
|
||||
S_API void SteamAPI_ISteamGameServer_EnableHeartbeats( ISteamGameServer* self, bool bActive );
|
||||
S_API void SteamAPI_ISteamGameServer_SetHeartbeatInterval( ISteamGameServer* self, int iHeartbeatInterval );
|
||||
S_API void SteamAPI_ISteamGameServer_ForceHeartbeat( ISteamGameServer* self );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamGameServer_AssociateWithClan( ISteamGameServer* self, uint64_steamid steamIDClan );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility( ISteamGameServer* self, uint64_steamid steamIDNewPlayer );
|
||||
S_API bool SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate_DEPRECATED( ISteamGameServer* self, uint32 unIPClient, const void * pvAuthBlob, uint32 cubAuthBlobSize, CSteamID * pSteamIDUser );
|
||||
S_API uint64_steamid SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection( ISteamGameServer* self );
|
||||
S_API void SteamAPI_ISteamGameServer_SendUserDisconnect_DEPRECATED( ISteamGameServer* self, uint64_steamid steamIDUser );
|
||||
S_API bool SteamAPI_ISteamGameServer_BUpdateUserData( ISteamGameServer* self, uint64_steamid steamIDUser, const char * pchPlayerName, uint32 uScore );
|
||||
|
||||
// ISteamGameServerStats
|
||||
S_API ISteamGameServerStats *SteamAPI_SteamGameServerStats_v001();
|
||||
|
@ -310,11 +310,36 @@ enum { k_iClientSTARCallbacks = 5600 };
|
||||
enum { k_iSteamRemotePlayCallbacks = 5700 };
|
||||
enum { k_iClientCompatCallbacks = 5800 };
|
||||
enum { k_iSteamChatCallbacks = 5900 };
|
||||
enum { k_iClientNetworkingUtilsCallbacks = 6000 };
|
||||
enum { k_iClientSystemManagerCallbacks = 6100 };
|
||||
enum { k_iClientStorageDeviceManagerCallbacks = 6200 };
|
||||
|
||||
#ifdef _MSVC_VER
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
// Macros used to annotate various Steamworks interfaces to generate the
|
||||
// flat API
|
||||
#ifdef API_GEN
|
||||
# define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
|
||||
#else
|
||||
# define STEAM_CLANG_ATTR(ATTR)
|
||||
#endif
|
||||
|
||||
#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR( "out_struct: ;" )
|
||||
#define STEAM_OUT_STRING() STEAM_CLANG_ATTR( "out_string: ;" )
|
||||
#define STEAM_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) STEAM_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
|
||||
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC )
|
||||
#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";" )
|
||||
#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
|
||||
#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
|
||||
#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
|
||||
#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
|
||||
#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
|
||||
#define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";")
|
||||
#define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";")
|
||||
#define STEAM_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";")
|
||||
|
||||
// CSteamAPIContext encapsulates the Steamworks API global accessors into
|
||||
// a single object.
|
||||
//
|
||||
@ -391,7 +416,6 @@ public:
|
||||
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;
|
||||
@ -402,7 +426,6 @@ private:
|
||||
ISteamHTTP *m_pSteamHTTP;
|
||||
ISteamInventory *m_pSteamInventory;
|
||||
ISteamUGC *m_pSteamUGC;
|
||||
ISteamApps *m_pSteamApps;
|
||||
};
|
||||
|
||||
|
||||
|
@ -23,10 +23,13 @@ enum EServerMode
|
||||
};
|
||||
|
||||
/// Pass to SteamGameServer_Init to indicate that the same UDP port will be used for game traffic
|
||||
/// UDP queries. In this case, Steam will not open up a socket to handle server browser queries,
|
||||
/// and you must use ISteamGameServer::HandleIncomingPacket and ISteamGameServer::GetNextOutgoingPacket
|
||||
/// to handle packets related to server discovery on your socket.
|
||||
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
|
||||
/// UDP queries for server browser pings and LAN discovery. In this case, Steam will not open up a
|
||||
/// socket to handle server browser queries, and you must use ISteamGameServer::HandleIncomingPacket
|
||||
/// and ISteamGameServer::GetNextOutgoingPacket to handle packets related to server discovery on your socket.
|
||||
const uint16 STEAMGAMESERVER_QUERY_PORT_SHARED = 0xffff;
|
||||
|
||||
// DEPRECATED: This old name was really confusing.
|
||||
const uint16 MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = STEAMGAMESERVER_QUERY_PORT_SHARED;
|
||||
|
||||
// Initialize SteamGameServer client and interface objects, and set server properties which may not be changed.
|
||||
//
|
||||
@ -39,9 +42,10 @@ enum EServerMode
|
||||
// - usGamePort is the port that clients will connect to for gameplay. You will usually open up your
|
||||
// own socket bound to this port.
|
||||
// - usQueryPort is the port that will manage server browser related duties and info
|
||||
// pings from clients. If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it
|
||||
// pings from clients. If you pass STEAMGAMESERVER_QUERY_PORT_SHARED for usQueryPort, then it
|
||||
// will use "GameSocketShare" mode, which means that the game is responsible for sending and receiving
|
||||
// UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h.
|
||||
// UDP packets for the master server updater. (See ISteamGameServer::HandleIncomingPacket and
|
||||
// ISteamGameServer::GetNextOutgoingPacket.)
|
||||
// - The version string should be 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.)
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
@ -89,9 +93,8 @@ inline bool CSteamGameServerAPIContext::Init()
|
||||
m_pSteamHTTP = ::SteamGameServerHTTP();
|
||||
m_pSteamInventory = ::SteamGameServerInventory();
|
||||
m_pSteamUGC = ::SteamGameServerUGC();
|
||||
m_pSteamApps = ::SteamGameServerApps();
|
||||
if ( !m_pSteamGameServer || !m_pSteamGameServerUtils || !m_pSteamGameServerNetworking || !m_pSteamGameServerStats
|
||||
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC || !m_pSteamApps )
|
||||
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -1,23 +1,11 @@
|
||||
//========= Copyright <20> 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
// Declare common types used by the Steamworks SDK.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef STEAMCLIENTPUBLIC_H
|
||||
#define STEAMCLIENTPUBLIC_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
//lint -save -e1931 -e1927 -e1924 -e613 -e726
|
||||
|
||||
// This header file defines the interface between the calling application and the code that
|
||||
// knows how to communicate with the connection manager (CM) from the Steam service
|
||||
|
||||
// This header file is intended to be portable; ideally this 1 header file plus a lib or dll
|
||||
// is all you need to integrate the client library into some other tree. So please avoid
|
||||
// including or requiring other header files if possible. This header should only describe the
|
||||
// interface layer, no need to include anything about the implementation.
|
||||
|
||||
#include "steamtypes.h"
|
||||
#include "steamuniverse.h"
|
||||
@ -145,6 +133,9 @@ enum EResult
|
||||
k_EResultNoLauncherSpecified = 117, // No launcher was specified, but a launcher was needed to choose correct realm for operation.
|
||||
k_EResultMustAgreeToSSA = 118, // User must agree to china SSA or global SSA before login
|
||||
k_EResultLauncherMigrated = 119, // The specified launcher type is no longer supported; the user should be directed elsewhere
|
||||
k_EResultSteamRealmMismatch = 120, // The user's realm does not match the realm of the requested resource
|
||||
k_EResultInvalidSignature = 121, // signature check did not match
|
||||
k_EResultParseFailure = 122, // Failed to parse input
|
||||
};
|
||||
|
||||
// Error codes for use with the voice functions
|
||||
@ -244,100 +235,6 @@ enum EAccountType
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EAppReleaseState
|
||||
{
|
||||
k_EAppReleaseState_Unknown = 0, // unknown, required appinfo or license info is missing
|
||||
k_EAppReleaseState_Unavailable = 1, // even owners can't see game in library yet, no AppInfo released
|
||||
k_EAppReleaseState_Prerelease = 2, // app can be purchased and is visible in library, nothing else. Only Common AppInfo section released
|
||||
k_EAppReleaseState_PreloadOnly = 3, // owners can preload app, but not play it. All AppInfo sections fully released
|
||||
k_EAppReleaseState_Released = 4, // owners can download and play app.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EAppOwnershipFlags
|
||||
{
|
||||
k_EAppOwnershipFlags_None = 0x0000, // unknown
|
||||
k_EAppOwnershipFlags_OwnsLicense = 0x0001, // owns license for this game
|
||||
k_EAppOwnershipFlags_FreeLicense = 0x0002, // not paid for game
|
||||
k_EAppOwnershipFlags_RegionRestricted = 0x0004, // owns app, but not allowed to play in current region
|
||||
k_EAppOwnershipFlags_LowViolence = 0x0008, // only low violence version
|
||||
k_EAppOwnershipFlags_InvalidPlatform = 0x0010, // app not supported on current platform
|
||||
k_EAppOwnershipFlags_SharedLicense = 0x0020, // license was granted by authorized local device
|
||||
k_EAppOwnershipFlags_FreeWeekend = 0x0040, // owned by a free weekend licenses
|
||||
k_EAppOwnershipFlags_RetailLicense = 0x0080, // has a retail license for game, (CD-Key etc)
|
||||
k_EAppOwnershipFlags_LicenseLocked = 0x0100, // shared license is locked (in use) by other user
|
||||
k_EAppOwnershipFlags_LicensePending = 0x0200, // owns app, but transaction is still pending. Can't install or play
|
||||
k_EAppOwnershipFlags_LicenseExpired = 0x0400, // doesn't own app anymore since license expired
|
||||
k_EAppOwnershipFlags_LicensePermanent = 0x0800, // permanent license, not borrowed, or guest or freeweekend etc
|
||||
k_EAppOwnershipFlags_LicenseRecurring = 0x1000, // Recurring license, user is charged periodically
|
||||
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
|
||||
k_EAppOwnershipFlags_LegacyFreeSub = 0x80000, // App only owned through Steam's legacy free sub
|
||||
k_EAppOwnershipFlags_InvalidOSType = 0x100000, // app not supported on current OS version, used to indicate a game is 32-bit on post-catalina. Currently it's own flag so the library will display a notice.
|
||||
k_EAppOwnershipFlags_TimedTrial = 0x200000, // App is playable only for limited time
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: designed as flags to allow filters masks
|
||||
// NOTE: If you add to this, please update PackageAppType (SteamConfig) as well as populatePackageAppType
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EAppType
|
||||
{
|
||||
k_EAppType_Invalid = 0x000, // unknown / invalid
|
||||
k_EAppType_Game = 0x001, // playable game, default type
|
||||
k_EAppType_Application = 0x002, // software application
|
||||
k_EAppType_Tool = 0x004, // SDKs, editors & dedicated servers
|
||||
k_EAppType_Demo = 0x008, // game demo
|
||||
k_EAppType_Media_DEPRECATED = 0x010, // legacy - was used for game trailers, which are now just videos on the web
|
||||
k_EAppType_DLC = 0x020, // down loadable content
|
||||
k_EAppType_Guide = 0x040, // game guide, PDF etc
|
||||
k_EAppType_Driver = 0x080, // hardware driver updater (ATI, Razor etc)
|
||||
k_EAppType_Config = 0x100, // hidden app used to config Steam features (backpack, sales, etc)
|
||||
k_EAppType_Hardware = 0x200, // a hardware device (Steam Machine, Steam Controller, Steam Link, etc.)
|
||||
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_MusicAlbum = 0x2000, // "Video game soundtrack album"
|
||||
k_EAppType_Series = 0x4000, // Container app for video series
|
||||
k_EAppType_Comic_UNUSED = 0x8000, // Comic Book
|
||||
k_EAppType_Beta = 0x10000, // this is a beta version of a game
|
||||
|
||||
k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only
|
||||
k_EAppType_DepotOnly_DEPRECATED = 0x80000000, // there shouldn't be any appinfo for depots
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// types of user game stats fields
|
||||
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN DATABASE
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ESteamUserStatType
|
||||
{
|
||||
k_ESteamUserStatTypeINVALID = 0,
|
||||
k_ESteamUserStatTypeINT = 1,
|
||||
k_ESteamUserStatTypeFLOAT = 2,
|
||||
// Read as FLOAT, set with count / session length
|
||||
k_ESteamUserStatTypeAVGRATE = 3,
|
||||
k_ESteamUserStatTypeACHIEVEMENTS = 4,
|
||||
k_ESteamUserStatTypeGROUPACHIEVEMENTS = 5,
|
||||
|
||||
// max, for sanity checks
|
||||
k_ESteamUserStatTypeMAX
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Chat Entry Types (previously was only friend-to-friend message types)
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -385,9 +282,6 @@ enum EChatRoomEnterResponse
|
||||
};
|
||||
|
||||
|
||||
typedef void (*PFNLegacyKeyRegistration)( const char *pchCDKey, const char *pchInstallPath );
|
||||
typedef bool (*PFNLegacyKeyInstalled)();
|
||||
|
||||
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
|
||||
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
|
||||
const unsigned int k_unSteamUserDefaultInstance = 1; // fixed instance for all individual users
|
||||
@ -406,26 +300,6 @@ enum EChatSteamIDInstanceFlags
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Marketing message flags that change how a client should handle them
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EMarketingMessageFlags
|
||||
{
|
||||
k_EMarketingMessageFlagsNone = 0,
|
||||
k_EMarketingMessageFlagsHighPriority = 1 << 0,
|
||||
k_EMarketingMessageFlagsPlatformWindows = 1 << 1,
|
||||
k_EMarketingMessageFlagsPlatformMac = 1 << 2,
|
||||
k_EMarketingMessageFlagsPlatformLinux = 1 << 3,
|
||||
|
||||
//aggregate flags
|
||||
k_EMarketingMessageFlagsPlatformRestrictions =
|
||||
k_EMarketingMessageFlagsPlatformWindows |
|
||||
k_EMarketingMessageFlagsPlatformMac |
|
||||
k_EMarketingMessageFlagsPlatformLinux,
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Possible positions to tell the overlay to show notifications in
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -470,151 +344,6 @@ enum EBroadcastUploadResult
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: codes for well defined launch options
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ELaunchOptionType
|
||||
{
|
||||
k_ELaunchOptionType_None = 0, // unknown what launch option does
|
||||
k_ELaunchOptionType_Default = 1, // runs the game, app, whatever in default mode
|
||||
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_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
|
||||
k_ELaunchOptionType_Benchmark = 9, // runs game benchmark
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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: true if this launch option is any of the vr launching types
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsLaunchOptionTypeExemptFromGameTheater( const ELaunchOptionType eType )
|
||||
{
|
||||
return eType == k_ELaunchOptionType_Config
|
||||
|| eType == k_ELaunchOptionType_Server
|
||||
|| eType == k_ELaunchOptionType_Editor
|
||||
|| eType == k_ELaunchOptionType_Manual;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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_VivePro = 4, // htc vive pro release
|
||||
k_eEVRHMDType_HTC_ViveCosmos = 5, // HTC Vive Cosmos
|
||||
|
||||
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_RiftS = 24, // Oculus Rift S
|
||||
k_eEVRHMDType_Oculus_Quest = 25, // Oculus Quest
|
||||
|
||||
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_HP_Reverb = 82, // HP Reverb Windows MR headset
|
||||
k_eEVRHMDType_HP_ReverbG2 = 1463, // HP Reverb G2 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
|
||||
|
||||
k_eEVRHMDType_vridge = 110, // VRIDGE tool
|
||||
|
||||
k_eEVRHMDType_Huawei_Unknown = 120, // Huawei unknown HMD
|
||||
k_eEVRHMDType_Huawei_VR2 = 121, // Huawei VR2 3DOF headset
|
||||
k_eEVRHMDType_Huawei_EndOfRange = 129, // end of Huawei HMD range
|
||||
|
||||
k_eEVRHmdType_Valve_Unknown = 130, // Valve Unknown HMD
|
||||
k_eEVRHmdType_Valve_Index = 131, // Valve Index HMD
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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_RiftS || eType == k_eEVRHMDType_Oculus_Quest || 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 a Hauwei HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsHuaweiHeadset( EVRHMDType eType )
|
||||
{
|
||||
return eType >= k_eEVRHMDType_Huawei_Unknown && eType <= k_eEVRHMDType_Huawei_EndOfRange;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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 || eType == k_eEVRHMDType_HTC_VivePro;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Reasons a user may not use the Community Market.
|
||||
// Used in MarketEligibilityResponse_t.
|
||||
@ -1225,72 +954,6 @@ public:
|
||||
const char *Render() const; // render this Game ID to string
|
||||
static const char *Render( uint64 ulGameID ); // static method to render a uint64 representation of a Game ID to a string
|
||||
|
||||
// must include checksum_crc.h first to get this functionality
|
||||
#if defined( CHECKSUM_CRC_H )
|
||||
CGameID( uint32 nAppID, const char *pchModPath )
|
||||
{
|
||||
m_ulGameID = 0;
|
||||
m_gameID.m_nAppID = nAppID;
|
||||
m_gameID.m_nType = k_EGameIDTypeGameMod;
|
||||
|
||||
char rgchModDir[MAX_PATH];
|
||||
V_FileBase( pchModPath, rgchModDir, sizeof( rgchModDir ) );
|
||||
CRC32_t crc32;
|
||||
CRC32_Init( &crc32 );
|
||||
CRC32_ProcessBuffer( &crc32, rgchModDir, V_strlen( rgchModDir ) );
|
||||
CRC32_Final( &crc32 );
|
||||
|
||||
// set the high-bit on the mod-id
|
||||
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
|
||||
// replacement for appID's
|
||||
m_gameID.m_nModID = crc32 | (0x80000000);
|
||||
}
|
||||
|
||||
CGameID( const char *pchExePath, const char *pchAppName )
|
||||
{
|
||||
m_ulGameID = 0;
|
||||
m_gameID.m_nAppID = k_uAppIdInvalid;
|
||||
m_gameID.m_nType = k_EGameIDTypeShortcut;
|
||||
|
||||
CRC32_t crc32;
|
||||
CRC32_Init( &crc32 );
|
||||
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
|
||||
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
|
||||
// replacement for appID's
|
||||
m_gameID.m_nModID = crc32 | (0x80000000);
|
||||
}
|
||||
|
||||
#if defined( VSTFILEID_H )
|
||||
|
||||
CGameID( VstFileID vstFileID )
|
||||
{
|
||||
m_ulGameID = 0;
|
||||
m_gameID.m_nAppID = k_uAppIdInvalid;
|
||||
m_gameID.m_nType = k_EGameIDTypeP2P;
|
||||
|
||||
CRC32_t crc32;
|
||||
CRC32_Init( &crc32 );
|
||||
const char *pchFileId = vstFileID.Render();
|
||||
CRC32_ProcessBuffer( &crc32, pchFileId, V_strlen( pchFileId ) );
|
||||
CRC32_Final( &crc32 );
|
||||
|
||||
// set the high-bit on the mod-id
|
||||
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
|
||||
// replacement for appID's
|
||||
m_gameID.m_nModID = crc32 | (0x80000000);
|
||||
}
|
||||
|
||||
#endif /* VSTFILEID_H */
|
||||
|
||||
#endif /* CHECKSUM_CRC_H */
|
||||
|
||||
|
||||
uint64 ToUint64() const
|
||||
{
|
||||
return m_ulGameID;
|
||||
@ -1379,9 +1042,9 @@ public:
|
||||
m_ulGameID = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
//
|
||||
// Internal stuff. Use the accessors above if possible
|
||||
//
|
||||
|
||||
enum EGameIDType
|
||||
{
|
||||
@ -1416,26 +1079,12 @@ private:
|
||||
const int k_cchGameExtraInfoMax = 64;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Constants used for query ports.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define QUERY_PORT_NOT_INITIALIZED 0xFFFF // We haven't asked the GS for this query port's actual value yet.
|
||||
#define QUERY_PORT_ERROR 0xFFFE // We were unable to get the query port for this server.
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Passed as argument to SteamAPI_UseBreakpadCrashHandler to enable optional callback
|
||||
// just before minidump file is captured after a crash has occurred. (Allows app to append additional comment data to the dump, etc.)
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef void (*PFNPreMinidumpCallback)(void *context);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Used by ICrashHandler interfaces to reference particular installed crash handlers
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef void *BREAKPAD_HANDLE;
|
||||
#define BREAKPAD_INVALID_HANDLE (BREAKPAD_HANDLE)0
|
||||
|
||||
enum EGameSearchErrorCode_t
|
||||
{
|
||||
k_EGameSearchErrorCode_OK = 1,
|
||||
|
@ -1,286 +0,0 @@
|
||||
//====== Copyright Valve Corporation, All rights reserved. ====================
|
||||
//
|
||||
// Types and utilities for handling steam datagram tickets. These are
|
||||
// useful for both the client and the backend ticket generating authority.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef STEAMDATAGRAM_TICKETS_H
|
||||
#define STEAMDATAGRAM_TICKETS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifndef assert
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "steamnetworkingtypes.h"
|
||||
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error "Must define VALVE_CALLBACK_PACK_SMALL or VALVE_CALLBACK_PACK_LARGE"
|
||||
#endif
|
||||
|
||||
/// Max length of serialized auth ticket. This is important so that we
|
||||
/// can ensure that we always fit into a single UDP datagram (along with
|
||||
/// other certs and signatures) and keep the implementation simple.
|
||||
const size_t k_cbSteamDatagramMaxSerializedTicket = 512;
|
||||
|
||||
/// Network-routable identifier for a service. This is an intentionally
|
||||
/// opaque byte blob. The relays know how to use this to forward it on
|
||||
/// to the intended destination, but otherwise clients really should not
|
||||
/// need to know what's inside. (Indeed, we don't really want them to
|
||||
/// know, as it could reveal information useful to an attacker.)
|
||||
struct SteamDatagramHostedAddress
|
||||
{
|
||||
|
||||
// Size of data blob.
|
||||
int m_cbSize;
|
||||
|
||||
// Opaque data
|
||||
char m_data[ 128 ];
|
||||
|
||||
// Reset to empty state
|
||||
void Clear() { memset( this, 0, sizeof(*this) ); }
|
||||
|
||||
// Parse the data center out of the blob.
|
||||
SteamNetworkingPOPID GetPopID() const { return CalculateSteamNetworkingPOPIDFromString( m_data ); }
|
||||
|
||||
/// Set a dummy routing blob with a hardcoded IP:port. You should only use
|
||||
/// this in a dev environment, since the address is in plaintext!
|
||||
/// In production this information should come from the server,
|
||||
/// using ISteamNetworkingSockets::GetHostedDedicatedServerAddress
|
||||
void SetDevAddress( uint32 nIP, uint16 nPort, SteamNetworkingPOPID popid = 0 )
|
||||
{
|
||||
GetSteamNetworkingLocationPOPStringFromID( popid, m_data );
|
||||
m_cbSize = 4;
|
||||
m_data[m_cbSize++] = 1;
|
||||
m_data[m_cbSize++] = 1;
|
||||
m_data[m_cbSize++] = char(nPort);
|
||||
m_data[m_cbSize++] = char(nPort>>8);
|
||||
m_data[m_cbSize++] = char(nIP);
|
||||
m_data[m_cbSize++] = char(nIP>>8);
|
||||
m_data[m_cbSize++] = char(nIP>>16);
|
||||
m_data[m_cbSize++] = char(nIP>>24);
|
||||
}
|
||||
|
||||
/// Convert to/from std::string (or anything that acts like it).
|
||||
/// Useful for interfacing with google protobuf. It's a template
|
||||
/// mainly so that we don't have to include <string> in the header.
|
||||
/// Note: by "string", we don't mean that it's text. It's a binary
|
||||
/// blob, and it might have zeros in it. (std::string can handle that.)
|
||||
template <typename T> bool SetFromStdString( const T &str )
|
||||
{
|
||||
if ( str.length() >= sizeof(m_data) )
|
||||
{
|
||||
m_cbSize = 0;
|
||||
return false;
|
||||
}
|
||||
m_cbSize = (int)str.length();
|
||||
memcpy( m_data, str.c_str(), m_cbSize );
|
||||
return true;
|
||||
}
|
||||
template <typename T> void GetAsStdString( T *str ) const
|
||||
{
|
||||
str->assign( m_data, m_cbSize );
|
||||
}
|
||||
};
|
||||
|
||||
/// Ticket used to gain access to the relay network.
|
||||
struct SteamDatagramRelayAuthTicket
|
||||
{
|
||||
SteamDatagramRelayAuthTicket() { Clear(); }
|
||||
|
||||
/// Reset all fields
|
||||
void Clear() { memset( this, 0, sizeof(*this) ); m_nRestrictToVirtualPort = -1; }
|
||||
|
||||
/// Identity of the gameserver we want to talk to. This is required.
|
||||
SteamNetworkingIdentity m_identityGameserver;
|
||||
|
||||
/// Identity of the person who was authorized. This is required.
|
||||
SteamNetworkingIdentity m_identityAuthorizedClient;
|
||||
|
||||
/// SteamID is authorized to send from a particular public IP. If this
|
||||
/// is 0, then the sender is not restricted to a particular IP.
|
||||
///
|
||||
/// Recommend to leave this set to zero.
|
||||
uint32 m_unPublicIP;
|
||||
|
||||
/// Time when the ticket expires. Recommended: take the current
|
||||
/// time and add 6 hours, or maybe a bit longer if your gameplay
|
||||
/// sessions are longer.
|
||||
///
|
||||
/// NOTE: relays may reject tickets with expiry times excessively
|
||||
/// far in the future, so contact us if you wish to use an expiry
|
||||
/// longer than, say, 24 hours.
|
||||
RTime32 m_rtimeTicketExpiry;
|
||||
|
||||
/// Routing information where the gameserver is listening for
|
||||
/// relayed traffic. You should fill this in when generating
|
||||
/// a ticket.
|
||||
///
|
||||
/// When generating tickets on your backend:
|
||||
/// - In production: The gameserver knows the proper routing
|
||||
/// information, so you need to call
|
||||
/// ISteamNetworkingSockets::GetHostedDedicatedServerAddress
|
||||
/// and send the info to your backend.
|
||||
/// - In development, you will need to provide public IP
|
||||
/// of the server using SteamDatagramServiceNetID::SetDevAddress.
|
||||
/// Relays need to be able to send UDP
|
||||
/// packets to this server. Since it's very likely that
|
||||
/// your server is behind a firewall/NAT, make sure that
|
||||
/// the address is the one that the outside world can use.
|
||||
/// The traffic from the relays will be "unsolicited", so
|
||||
/// stateful firewalls won't work -- you will probably have
|
||||
/// to set up an explicit port forward.
|
||||
/// On the client:
|
||||
/// - this field will always be blank.
|
||||
SteamDatagramHostedAddress m_routing;
|
||||
|
||||
/// App ID this is for. This is required, and should be the
|
||||
/// App ID the client is running. (Even if your gameserver
|
||||
/// uses a different App ID.)
|
||||
uint32 m_nAppID;
|
||||
|
||||
/// Restrict this ticket to be used for a particular virtual port?
|
||||
/// Set to -1 to allow any virtual port.
|
||||
///
|
||||
/// This is useful as a security measure, and also so the client will
|
||||
/// use the right ticket (which might have extra fields that are useful
|
||||
/// for proper analytics), if the client happens to have more than one
|
||||
/// appropriate ticket.
|
||||
///
|
||||
/// Note: if a client has more that one acceptable ticket, they will
|
||||
/// always use the one expiring the latest.
|
||||
int m_nRestrictToVirtualPort;
|
||||
|
||||
//
|
||||
// Extra fields.
|
||||
//
|
||||
// These are collected for backend analytics. For example, you might
|
||||
// send a MatchID so that all of the records for a particular match can
|
||||
// be located. Or send a game mode field so that you can compare
|
||||
// the network characteristics of different game modes.
|
||||
//
|
||||
// (At the time of this writing we don't have a way to expose the data
|
||||
// we collect to partners, but we hope to in the future so that you can
|
||||
// get visibility into network conditions.)
|
||||
//
|
||||
|
||||
struct ExtraField
|
||||
{
|
||||
enum EType
|
||||
{
|
||||
k_EType_String,
|
||||
k_EType_Int, // For most small integral values. Uses google protobuf sint64, so it's small on the wire. WARNING: In some places this value may be transmitted in JSON, in which case precision may be lost in backend analytics. Don't use this for an "identifier", use it for a scalar quantity.
|
||||
k_EType_Fixed64, // 64 arbitrary bits. This value is treated as an "identifier". In places where JSON format is used, it will be serialized as a string. No aggregation / analytics can be performed on this value.
|
||||
};
|
||||
int /* EType */ m_eType;
|
||||
char m_szName[28];
|
||||
|
||||
union {
|
||||
char m_szStringValue[128];
|
||||
int64 m_nIntValue;
|
||||
uint64 m_nFixed64Value;
|
||||
};
|
||||
};
|
||||
enum { k_nMaxExtraFields = 16 };
|
||||
int m_nExtraFields;
|
||||
ExtraField m_vecExtraFields[ k_nMaxExtraFields ];
|
||||
|
||||
/// Helper to add an extra field in a single call
|
||||
void AddExtraField_Int( const char *pszName, int64 val )
|
||||
{
|
||||
ExtraField *p = AddExtraField( pszName, ExtraField::k_EType_Int );
|
||||
if ( p )
|
||||
p->m_nIntValue = val;
|
||||
}
|
||||
void AddExtraField_Fixed64( const char *pszName, uint64 val )
|
||||
{
|
||||
ExtraField *p = AddExtraField( pszName, ExtraField::k_EType_Fixed64 );
|
||||
if ( p )
|
||||
p->m_nFixed64Value = val;
|
||||
}
|
||||
void AddExtraField_String( const char *pszName, const char *val )
|
||||
{
|
||||
ExtraField *p = AddExtraField( pszName, ExtraField::k_EType_String );
|
||||
if ( p )
|
||||
{
|
||||
size_t l = strlen( val );
|
||||
if ( l > sizeof(p->m_szStringValue)-1 )
|
||||
l = sizeof(p->m_szStringValue)-1;
|
||||
memcpy( p->m_szStringValue, val, l );
|
||||
p->m_szStringValue[l] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ExtraField *AddExtraField( const char *pszName, ExtraField::EType eType )
|
||||
{
|
||||
if ( m_nExtraFields >= k_nMaxExtraFields )
|
||||
{
|
||||
assert( false );
|
||||
return NULL;
|
||||
}
|
||||
ExtraField *p = &m_vecExtraFields[ m_nExtraFields++ ];
|
||||
p->m_eType = eType;
|
||||
|
||||
size_t l = strlen( pszName );
|
||||
if ( l > sizeof(p->m_szName)-1 )
|
||||
l = sizeof(p->m_szName)-1;
|
||||
memcpy( p->m_szName, pszName, l );
|
||||
p->m_szName[l] = '\0';
|
||||
return p;
|
||||
}
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
/// Max size of user data blob
|
||||
const size_t k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048;
|
||||
|
||||
/// Max size of serialized data blob
|
||||
const size_t k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096;
|
||||
|
||||
/// Structure that describes a gameserver attempting to authenticate
|
||||
/// with your central server allocator / matchmaking service ("game coordinator").
|
||||
/// This is useful because the game coordinator needs to know:
|
||||
///
|
||||
/// - What data center is the gameserver running in?
|
||||
/// - The routing blob of the gameserver
|
||||
/// - Is the gameserver actually trusted?
|
||||
///
|
||||
/// Using this structure, you can securely communicate this information
|
||||
/// to your server, and you can do this WITHOUT maintaining any
|
||||
/// whitelists or tables of IP addresses.
|
||||
///
|
||||
/// See ISteamNetworkingSockets::GetGameCoordinatorServerLogin
|
||||
struct SteamDatagramGameCoordinatorServerLogin
|
||||
{
|
||||
/// Server's identity
|
||||
SteamNetworkingIdentity m_identity;
|
||||
|
||||
/// Routing info. Note that this includes the POPID
|
||||
SteamDatagramHostedAddress m_routing;
|
||||
|
||||
/// AppID that the server thinks it is running
|
||||
AppId_t m_nAppID;
|
||||
|
||||
/// Unix timestamp when this was generated
|
||||
RTime32 m_rtime;
|
||||
|
||||
/// Size of application data
|
||||
int m_cbAppData;
|
||||
|
||||
/// Application data. This is any additional information
|
||||
/// that you need to identify the server not contained above.
|
||||
/// (E.g. perhaps a public IP as seen by the coordinator service.)
|
||||
char m_appData[ k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData ];
|
||||
};
|
||||
|
||||
#endif // STEAMDATAGRAM_TICKETS_H
|
@ -132,7 +132,7 @@ enum ESteamNetworkingAvailability
|
||||
enum ESteamNetworkingIdentityType
|
||||
{
|
||||
// Dummy/empty/invalid.
|
||||
// Plese note that if we parse a string that we don't recognize
|
||||
// Please note that if we parse a string that we don't recognize
|
||||
// but that appears reasonable, we will NOT use this type. Instead
|
||||
// we'll use k_ESteamNetworkingIdentityType_UnknownType.
|
||||
k_ESteamNetworkingIdentityType_Invalid = 0,
|
||||
@ -535,13 +535,9 @@ enum ESteamNetConnectionEnd
|
||||
// - etc
|
||||
k_ESteamNetConnectionEnd_Remote_BadCert = 4003,
|
||||
|
||||
// We couldn't rendezvous with the remote host because
|
||||
// they aren't logged into Steam
|
||||
k_ESteamNetConnectionEnd_Remote_NotLoggedIn = 4004,
|
||||
|
||||
// We couldn't rendezvous with the remote host because
|
||||
// they aren't running the right application.
|
||||
k_ESteamNetConnectionEnd_Remote_NotRunningApp = 4005,
|
||||
// These will never be returned
|
||||
//k_ESteamNetConnectionEnd_Remote_NotLoggedIn_DEPRECATED = 4004,
|
||||
//k_ESteamNetConnectionEnd_Remote_NotRunningApp_DEPRECATED = 4005,
|
||||
|
||||
// Something wrong with the protocol version you are using.
|
||||
// (Probably the code you are running is too old.)
|
||||
@ -575,10 +571,7 @@ enum ESteamNetConnectionEnd
|
||||
// or on their end.
|
||||
k_ESteamNetConnectionEnd_Misc_Timeout = 5003,
|
||||
|
||||
// We're having trouble talking to the relevant relay.
|
||||
// We don't have enough information to say whether the
|
||||
// problem is on our end or not.
|
||||
k_ESteamNetConnectionEnd_Misc_RelayConnectivity = 5004,
|
||||
//k_ESteamNetConnectionEnd_Misc_RelayConnectivity_DEPRECATED = 5004,
|
||||
|
||||
// There's some trouble talking to Steam.
|
||||
k_ESteamNetConnectionEnd_Misc_SteamConnectivity = 5005,
|
||||
@ -1057,31 +1050,9 @@ enum ESteamNetworkingConfigValue
|
||||
{
|
||||
k_ESteamNetworkingConfig_Invalid = 0,
|
||||
|
||||
/// [global float, 0--100] Randomly discard N pct of packets instead of sending/recv
|
||||
/// This is a global option only, since it is applied at a low level
|
||||
/// where we don't have much context
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Send = 2,
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Recv = 3,
|
||||
|
||||
/// [global int32]. Delay all outbound/inbound packets by N ms
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Send = 4,
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Recv = 5,
|
||||
|
||||
/// [global float] 0-100 Percentage of packets we will add additional delay
|
||||
/// to (causing them to be reordered)
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Send = 6,
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7,
|
||||
|
||||
/// [global int32] Extra delay, in ms, to apply to reordered packets.
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Time = 8,
|
||||
|
||||
/// [global float 0--100] Globally duplicate some percentage of packets we send
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Send = 26,
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Recv = 27,
|
||||
|
||||
/// [global int32] Amount of delay, in ms, to delay duplicated packets.
|
||||
/// (We chose a random delay between 0 and this value)
|
||||
k_ESteamNetworkingConfig_FakePacketDup_TimeMax = 28,
|
||||
//
|
||||
// Connection options
|
||||
//
|
||||
|
||||
/// [connection int32] Timeout value (in ms) to use when first connecting
|
||||
k_ESteamNetworkingConfig_TimeoutInitial = 24,
|
||||
@ -1094,6 +1065,41 @@ enum ESteamNetworkingConfigValue
|
||||
/// Default is 512k (524288 bytes)
|
||||
k_ESteamNetworkingConfig_SendBufferSize = 9,
|
||||
|
||||
/// [connection int64] Get/set userdata as a configuration option.
|
||||
/// The default value is -1. You may want to set the user data as
|
||||
/// a config value, instead of using ISteamNetworkingSockets::SetConnectionUserData
|
||||
/// in two specific instances:
|
||||
///
|
||||
/// - You wish to set the userdata atomically when creating
|
||||
/// an outbound connection, so that the userdata is filled in properly
|
||||
/// for any callbacks that happen. However, note that this trick
|
||||
/// only works for connections initiated locally! For incoming
|
||||
/// connections, multiple state transitions may happen and
|
||||
/// callbacks be queued, before you are able to service the first
|
||||
/// callback! Be careful!
|
||||
///
|
||||
/// - You can set the default userdata for all newly created connections
|
||||
/// by setting this value at a higher level (e.g. on the listen
|
||||
/// socket or at the global level.) Then this default
|
||||
/// value will be inherited when the connection is created.
|
||||
/// This is useful in case -1 is a valid userdata value, and you
|
||||
/// wish to use something else as the default value so you can
|
||||
/// tell if it has been set or not.
|
||||
///
|
||||
/// HOWEVER: once a connection is created, the effective value is
|
||||
/// then bound to the connection. Unlike other connection options,
|
||||
/// if you change it again at a higher level, the new value will not
|
||||
/// be inherited by connections.
|
||||
///
|
||||
/// Using the userdata field in callback structs is not advised because
|
||||
/// of tricky race conditions. Instead, you might try one of these methods:
|
||||
///
|
||||
/// - Use a separate map with the HSteamNetConnection as the key.
|
||||
/// - Fetch the userdata from the connection in your callback
|
||||
/// using ISteamNetworkingSockets::GetConnectionUserData, to
|
||||
// ensure you have the current value.
|
||||
k_ESteamNetworkingConfig_ConnectionUserData = 40,
|
||||
|
||||
/// [connection int32] Minimum/maximum send rate clamp, 0 is no limit.
|
||||
/// This value will control the min/max allowed sending rate that
|
||||
/// bandwidth estimation is allowed to reach. Default is 0 (no-limit)
|
||||
@ -1253,9 +1259,62 @@ enum ESteamNetworkingConfigValue
|
||||
/// This value should not be read or written in any other context.
|
||||
k_ESteamNetworkingConfig_LocalVirtualPort = 38,
|
||||
|
||||
//
|
||||
// Callbacks
|
||||
//
|
||||
|
||||
//
|
||||
// Simulating network conditions
|
||||
//
|
||||
// These are global (not per-connection) because they apply at
|
||||
// a relatively low UDP layer.
|
||||
//
|
||||
|
||||
/// [global float, 0--100] Randomly discard N pct of packets instead of sending/recv
|
||||
/// This is a global option only, since it is applied at a low level
|
||||
/// where we don't have much context
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Send = 2,
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Recv = 3,
|
||||
|
||||
/// [global int32]. Delay all outbound/inbound packets by N ms
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Send = 4,
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Recv = 5,
|
||||
|
||||
/// [global float] 0-100 Percentage of packets we will add additional delay
|
||||
/// to (causing them to be reordered)
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Send = 6,
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7,
|
||||
|
||||
/// [global int32] Extra delay, in ms, to apply to reordered packets.
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Time = 8,
|
||||
|
||||
/// [global float 0--100] Globally duplicate some percentage of packets we send
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Send = 26,
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Recv = 27,
|
||||
|
||||
/// [global int32] Amount of delay, in ms, to delay duplicated packets.
|
||||
/// (We chose a random delay between 0 and this value)
|
||||
k_ESteamNetworkingConfig_FakePacketDup_TimeMax = 28,
|
||||
|
||||
/// [global int32] Trace every UDP packet, similar to Wireshark or tcpdump.
|
||||
/// Value is max number of bytes to dump. -1 disables tracing.
|
||||
// 0 only traces the info but no actual data bytes
|
||||
k_ESteamNetworkingConfig_PacketTraceMaxBytes = 41,
|
||||
|
||||
|
||||
// [global int32] Global UDP token bucket rate limits.
|
||||
// "Rate" refers to the steady state rate. (Bytes/sec, the
|
||||
// rate that tokens are put into the bucket.) "Burst"
|
||||
// refers to the max amount that could be sent in a single
|
||||
// burst. (In bytes, the max capacity of the bucket.)
|
||||
// Rate=0 disables the limiter entirely, which is the default.
|
||||
// Burst=0 disables burst. (This is not realistic. A
|
||||
// burst of at least 4K is recommended; the default is higher.)
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Send_Rate = 42,
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Send_Burst = 43,
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44,
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45,
|
||||
|
||||
//
|
||||
// Callbacks
|
||||
//
|
||||
|
||||
// On Steam, you may use the default Steam callback dispatch mechanism. If you prefer
|
||||
// to not use this dispatch mechanism (or you are not running with Steam), or you want
|
||||
@ -1320,9 +1379,9 @@ enum ESteamNetworkingConfigValue
|
||||
/// ISteamNetworkingMessages.
|
||||
k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling = 206,
|
||||
|
||||
//
|
||||
// P2P settings
|
||||
//
|
||||
//
|
||||
// P2P connection settings
|
||||
//
|
||||
|
||||
// /// [listen socket int32] When you create a P2P listen socket, we will automatically
|
||||
// /// open up a UDP port to listen for LAN connections. LAN connections can be made
|
||||
@ -1353,9 +1412,9 @@ enum ESteamNetworkingConfigValue
|
||||
k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106,
|
||||
//k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107,
|
||||
|
||||
//
|
||||
// Settings for SDR relayed connections
|
||||
//
|
||||
//
|
||||
// Settings for SDR relayed connections
|
||||
//
|
||||
|
||||
/// [int32 global] If the first N pings to a port all fail, mark that port as unavailable for
|
||||
/// a while, and try a different one. Some ISPs and routers may drop the first
|
||||
@ -1402,14 +1461,14 @@ enum ESteamNetworkingConfigValue
|
||||
/// in production.
|
||||
k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
|
||||
|
||||
//
|
||||
// Log levels for debugging information of various subsystems.
|
||||
// Higher numeric values will cause more stuff to be printed.
|
||||
// See ISteamNetworkingUtils::SetDebugOutputFunction for more
|
||||
// information
|
||||
//
|
||||
// The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning.
|
||||
//
|
||||
//
|
||||
// Log levels for debugging information of various subsystems.
|
||||
// Higher numeric values will cause more stuff to be printed.
|
||||
// See ISteamNetworkingUtils::SetDebugOutputFunction for more
|
||||
// information
|
||||
//
|
||||
// The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning.
|
||||
//
|
||||
k_ESteamNetworkingConfig_LogLevel_AckRTT = 13, // [connection int32] RTT calculations for inline pings and replies
|
||||
k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send/recv
|
||||
k_ESteamNetworkingConfig_LogLevel_Message = 15, // [connection int32] log each message send/recv
|
||||
|
@ -17,26 +17,31 @@
|
||||
typedef unsigned char uint8;
|
||||
#endif
|
||||
|
||||
#if defined( __GNUC__ ) && !defined(POSIX)
|
||||
#if defined( __GNUC__ ) && !defined(_WIN32) && !defined(POSIX)
|
||||
#if __GNUC__ < 4
|
||||
#error "Steamworks requires GCC 4.X (4.2 or 4.4 have been tested)"
|
||||
#endif
|
||||
#define POSIX 1
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__)
|
||||
#if defined(__LP64__) || defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__) || defined(__s390x__)
|
||||
#define X64BITS
|
||||
#endif
|
||||
|
||||
#if !defined(VALVE_BIG_ENDIAN)
|
||||
#if defined(_PS3)
|
||||
// Make sure VALVE_BIG_ENDIAN gets set on PS3, may already be set previously in Valve internal code.
|
||||
#if !defined(VALVE_BIG_ENDIAN) && defined(_PS3)
|
||||
#define VALVE_BIG_ENDIAN
|
||||
#define VALVE_BIG_ENDIAN 1
|
||||
#endif
|
||||
#if defined( __GNUC__ ) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define VALVE_BIG_ENDIAN 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#if defined( _WIN32 ) && !defined( __GNUC__ )
|
||||
|
||||
typedef __int16 int16;
|
||||
typedef unsigned __int16 uint16;
|
||||
@ -84,102 +89,23 @@ typedef unsigned int uintp;
|
||||
|
||||
#endif // else _WIN32
|
||||
|
||||
#ifdef API_GEN
|
||||
# define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
|
||||
#else
|
||||
# define STEAM_CLANG_ATTR(ATTR)
|
||||
#endif
|
||||
|
||||
#define STEAM_METHOD_DESC(DESC) STEAM_CLANG_ATTR( "desc:" #DESC ";" )
|
||||
#define STEAM_IGNOREATTR() STEAM_CLANG_ATTR( "ignore" )
|
||||
#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR( "out_struct: ;" )
|
||||
#define STEAM_OUT_STRING() STEAM_CLANG_ATTR( "out_string: ;" )
|
||||
#define STEAM_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) STEAM_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
|
||||
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC )
|
||||
#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";" )
|
||||
#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
|
||||
#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
|
||||
#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
|
||||
#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
|
||||
#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
|
||||
#define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";")
|
||||
#define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";")
|
||||
#define STEAM_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";")
|
||||
|
||||
const int k_cubSaltSize = 8;
|
||||
typedef uint8 Salt_t[ k_cubSaltSize ];
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GID (GlobalID) stuff
|
||||
// This is a globally unique identifier. It's guaranteed to be unique across all
|
||||
// racks and servers for as long as a given universe persists.
|
||||
//-----------------------------------------------------------------------------
|
||||
// NOTE: for GID parsing/rendering and other utils, see gid.h
|
||||
typedef uint64 GID_t;
|
||||
|
||||
const GID_t k_GIDNil = 0xffffffffffffffffull;
|
||||
|
||||
// For convenience, we define a number of types that are just new names for GIDs
|
||||
typedef uint64 JobID_t; // Each Job has a unique ID
|
||||
typedef GID_t TxnID_t; // Each financial transaction has a unique ID
|
||||
|
||||
const GID_t k_TxnIDNil = k_GIDNil;
|
||||
const GID_t k_TxnIDUnknown = 0;
|
||||
|
||||
const JobID_t k_JobIDNil = 0xffffffffffffffffull;
|
||||
|
||||
// this is baked into client messages and interfaces as an int,
|
||||
// make sure we never break this.
|
||||
typedef uint32 PackageId_t;
|
||||
const PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF;
|
||||
|
||||
typedef uint32 BundleId_t;
|
||||
const BundleId_t k_uBundleIdInvalid = 0;
|
||||
|
||||
// this is baked into client messages and interfaces as an int,
|
||||
// make sure we never break this.
|
||||
typedef uint32 AppId_t;
|
||||
const AppId_t k_uAppIdInvalid = 0x0;
|
||||
|
||||
typedef uint64 AssetClassId_t;
|
||||
const AssetClassId_t k_ulAssetClassIdInvalid = 0x0;
|
||||
|
||||
typedef uint32 PhysicalItemId_t;
|
||||
const PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0;
|
||||
|
||||
|
||||
// this is baked into client messages and interfaces as an int,
|
||||
// make sure we never break this. AppIds and DepotIDs also presently
|
||||
// share the same namespace, but since we'd like to change that in the future
|
||||
// I've defined it seperately here.
|
||||
// AppIds and DepotIDs also presently share the same namespace
|
||||
typedef uint32 DepotId_t;
|
||||
const DepotId_t k_uDepotIdInvalid = 0x0;
|
||||
|
||||
// RTime32
|
||||
// We use this 32 bit time representing real world time.
|
||||
// It offers 1 second resolution beginning on January 1, 1970 (Unix time)
|
||||
// RTime32. Seconds elapsed since Jan 1 1970, i.e. unix timestamp.
|
||||
// It's the same as time_t, but it is always 32-bit and unsigned.
|
||||
typedef uint32 RTime32;
|
||||
|
||||
typedef uint32 CellID_t;
|
||||
const CellID_t k_uCellIDInvalid = 0xFFFFFFFF;
|
||||
|
||||
// handle to a Steam API call
|
||||
typedef uint64 SteamAPICall_t;
|
||||
const SteamAPICall_t k_uAPICallInvalid = 0x0;
|
||||
|
||||
typedef uint32 AccountID_t;
|
||||
|
||||
typedef uint32 PartnerId_t;
|
||||
const PartnerId_t k_uPartnerIdInvalid = 0;
|
||||
|
||||
// ID for a depot content manifest
|
||||
typedef uint64 ManifestId_t;
|
||||
const ManifestId_t k_uManifestIdInvalid = 0;
|
||||
|
||||
// ID for cafe sites
|
||||
typedef uint64 SiteId_t;
|
||||
const SiteId_t k_ulSiteIdInvalid = 0;
|
||||
|
||||
// Party Beacon ID
|
||||
typedef uint64 PartyBeaconID_t;
|
||||
const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
|
||||
@ -259,5 +185,4 @@ struct SteamIPAddress_t
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // STEAMTYPES_H
|
||||
|
Loading…
Reference in New Issue
Block a user