Update to sdk 1.51
parent
4cb55c52e2
commit
294c8e8124
@ -0,0 +1,138 @@
|
||||
|
||||
#ifndef ISTEAMCONTROLLER007_H
|
||||
#define ISTEAMCONTROLLER007_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
class ISteamController007
|
||||
{
|
||||
public:
|
||||
|
||||
// Init and Shutdown must be called when starting/ending use of this interface
|
||||
virtual bool Init() = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
||||
// Synchronize API state with the latest Steam Controller inputs available. This
|
||||
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
|
||||
// possible latency, you call this directly before reading controller state. This must
|
||||
// be called from somewhere before GetConnectedControllers will return any handles
|
||||
virtual void RunFrame() = 0;
|
||||
|
||||
// Enumerate currently connected controllers
|
||||
// handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetConnectedControllers( STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_COUNT, Receives list of connected controllers ) ControllerHandle_t *handlesOut ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTION SETS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0;
|
||||
|
||||
// Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive')
|
||||
// This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in
|
||||
// your state loops, instead of trying to place it in all of your state transitions.
|
||||
virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0;
|
||||
virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
// ACTION SET LAYERS
|
||||
virtual void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) = 0;
|
||||
// Enumerate currently active layers
|
||||
// handlesOut should point to a STEAM_CONTROLLER_MAX_ACTIVE_LAYERS sized array of ControllerActionSetHandle_t handles.
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_ACTIVE_LAYERS, Receives list of active layers ) ControllerActionSetHandle_t *handlesOut ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTIONS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
// Returns the current state of the supplied digital game action
|
||||
virtual ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// 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( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_ORIGINS, Receives list of aciton origins ) EControllerActionOrigin *originsOut ) = 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 ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
// Returns the current state of these supplied analog game action
|
||||
virtual ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// 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( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_ORIGINS, Receives list of action origins ) EControllerActionOrigin *originsOut ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular origin - this call is cheap
|
||||
virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified origin - this call is serialized
|
||||
virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0;
|
||||
|
||||
virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0;
|
||||
|
||||
// Returns raw motion data from the specified controller
|
||||
virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// OUTPUTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Trigger a haptic pulse on a controller
|
||||
virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
|
||||
|
||||
// Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times.
|
||||
// nFlags is currently unused and reserved for future use.
|
||||
virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
|
||||
|
||||
// Trigger a vibration event on supported controllers.
|
||||
virtual void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0;
|
||||
|
||||
// Set the controller LED color on supported controllers.
|
||||
virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions availible 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
|
||||
// If the user is not in Big Picture Mode it will open up the binding in a new window
|
||||
virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
// Returns the input type for a particular handle
|
||||
virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
// Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions
|
||||
// to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input
|
||||
virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0;
|
||||
|
||||
// Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index
|
||||
virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified Xbox controller origin.
|
||||
virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular Xbox controller origin.
|
||||
virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for
|
||||
// non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration
|
||||
virtual EControllerActionOrigin GetActionOriginFromXboxOrigin_( ControllerHandle_t controllerHandle, EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EControllerActionOrigin_None
|
||||
virtual EControllerActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin ) = 0;
|
||||
|
||||
// Get the binding revision for a given device. Returns false if the handle was not valid or if a mapping is not yet loaded for the device
|
||||
virtual bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, int *pMajor, int *pMinor ) = 0;
|
||||
};
|
||||
|
||||
#endif //ISTEAMCONTROLLER007_H
|
@ -0,0 +1,148 @@
|
||||
|
||||
#ifndef ISTEAMINPUT001_H
|
||||
#define ISTEAMINPUT001_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
class ISteamInput001
|
||||
{
|
||||
public:
|
||||
|
||||
// Init and Shutdown must be called when starting/ending use of this interface
|
||||
virtual bool Init() = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
||||
// Synchronize API state with the latest Steam Controller inputs available. This
|
||||
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
|
||||
// possible latency, you call this directly before reading controller state. This must
|
||||
// be called from somewhere before GetConnectedControllers will return any handles
|
||||
virtual void RunFrame() = 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.
|
||||
// handlesOut should point to a STEAM_INPUT_MAX_COUNT sized array of InputHandle_t handles
|
||||
// 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;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTION SETS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual InputActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0;
|
||||
|
||||
// Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive')
|
||||
// This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in
|
||||
// your state loops, instead of trying to place it in all of your state transitions.
|
||||
virtual void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ) = 0;
|
||||
virtual InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// ACTION SET LAYERS
|
||||
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
|
||||
// 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;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTIONS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual InputDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
// Returns the current state of the supplied digital game action
|
||||
virtual InputDigitalActionData_t GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// 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;
|
||||
|
||||
// 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;
|
||||
|
||||
// Returns the current state of these supplied analog game action
|
||||
virtual InputAnalogActionData_t GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// 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;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified origin.
|
||||
virtual const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) = 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;
|
||||
|
||||
// Returns raw motion data from the specified device
|
||||
virtual InputMotionData_t GetMotionData( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// OUTPUTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// 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;
|
||||
|
||||
// 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;
|
||||
|
||||
// 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;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions availible 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
|
||||
// If the user is not in Big Picture Mode it will open up the binding in a new window
|
||||
virtual bool ShowBindingPanel( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Returns the input type for a particular handle
|
||||
virtual ESteamInputType GetInputTypeForHandle( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions
|
||||
// to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input
|
||||
virtual InputHandle_t GetControllerForGamepadIndex( int nIndex ) = 0;
|
||||
|
||||
// Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index
|
||||
virtual int GetGamepadIndexForController( InputHandle_t ulinputHandle ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified Xbox controller origin.
|
||||
virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular Xbox controller origin
|
||||
virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for
|
||||
// non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration
|
||||
virtual EInputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EInputActionOrigin_None
|
||||
// When a new input type is added you will be able to pass in k_ESteamInputType_Unknown and the closest origin that your version of the SDK recognized will be returned
|
||||
// ex: if a Playstation 5 controller was released this function would return Playstation 4 origins.
|
||||
virtual EInputActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin ) = 0;
|
||||
|
||||
// Get the binding revision for a given device. Returns false if the handle was not valid or if a mapping is not yet loaded for the device
|
||||
virtual bool GetDeviceBindingRevision( InputHandle_t inputHandle, int *pMajor, int *pMinor ) = 0;
|
||||
|
||||
// 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;
|
||||
};
|
||||
|
||||
#endif //ISTEAMINPUT001_H
|
@ -0,0 +1,172 @@
|
||||
|
||||
#ifndef ISTEAMUGC014_H
|
||||
#define ISTEAMUGC014_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
class ISteamUGC014
|
||||
{
|
||||
public:
|
||||
|
||||
// Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
|
||||
virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
|
||||
|
||||
// Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
|
||||
STEAM_FLAT_NAME( CreateQueryAllUGCRequestPage )
|
||||
virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
|
||||
|
||||
// Query for all matching UGC using the new deep paging interface. Creator app id or consumer app id must be valid and be set to the current running app. pchCursor should be set to NULL or "*" to get the first result set.
|
||||
STEAM_FLAT_NAME( CreateQueryAllUGCRequestCursor )
|
||||
virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char *pchCursor = NULL ) = 0;
|
||||
|
||||
// Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this)
|
||||
virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
|
||||
|
||||
// Send the query to Steam
|
||||
STEAM_CALL_RESULT( SteamUGCQueryCompleted_t )
|
||||
virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
|
||||
|
||||
// Retrieve an individual result after receiving the callback for querying UGC
|
||||
virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0;
|
||||
virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0;
|
||||
virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0;
|
||||
virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0;
|
||||
virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 *pStatValue ) = 0;
|
||||
virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0;
|
||||
virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0;
|
||||
virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0;
|
||||
|
||||
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, STEAM_OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, STEAM_OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0;
|
||||
|
||||
// Return the first value matching the pchKey. Note that a key may map to multiple values. Returns false if there was an error or no matching value was found.
|
||||
STEAM_FLAT_NAME( GetQueryFirstUGCKeyValueTag )
|
||||
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, const char *pchKey, STEAM_OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0;
|
||||
|
||||
// Release the request to free up memory, after retrieving results
|
||||
virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
|
||||
|
||||
// Options to set for querying UGC
|
||||
virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
|
||||
virtual bool AddRequiredTagGroup( UGCQueryHandle_t handle, const SteamParamStringArray_t *pTagGroups ) = 0; // match any of the tags in this group
|
||||
virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
|
||||
virtual bool SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0;
|
||||
virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0;
|
||||
virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0;
|
||||
virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0;
|
||||
virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0;
|
||||
virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0;
|
||||
virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0;
|
||||
virtual bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint32 unDays ) = 0;
|
||||
virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0;
|
||||
virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0;
|
||||
|
||||
// Options only for querying user UGC
|
||||
virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0;
|
||||
|
||||
// Options only for querying all UGC
|
||||
virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0;
|
||||
virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0;
|
||||
virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0;
|
||||
virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0;
|
||||
|
||||
// DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead!
|
||||
STEAM_CALL_RESULT( SteamUGCRequestUGCDetailsResult_t )
|
||||
virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0;
|
||||
|
||||
// Steam Workshop Creator API
|
||||
STEAM_CALL_RESULT( CreateItemResult_t )
|
||||
virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet
|
||||
|
||||
virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate()
|
||||
|
||||
virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item
|
||||
virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item
|
||||
virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set
|
||||
virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax)
|
||||
virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item
|
||||
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item
|
||||
virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder
|
||||
virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size
|
||||
virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size.
|
||||
virtual bool RemoveAllItemKeyValueTags( UGCUpdateHandle_t handle ) = 0; // remove all existing key-value tags (you can add new ones via the AddItemKeyValueTag function)
|
||||
virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key
|
||||
virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag.
|
||||
virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
|
||||
virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; // add preview video for this item
|
||||
virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
|
||||
virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; // updates an existing preview video for this item
|
||||
virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted)
|
||||
|
||||
STEAM_CALL_RESULT( SubmitItemUpdateResult_t )
|
||||
virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate()
|
||||
virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0;
|
||||
|
||||
// Steam Workshop Consumer API
|
||||
STEAM_CALL_RESULT( SetUserItemVoteResult_t )
|
||||
virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0;
|
||||
STEAM_CALL_RESULT( GetUserItemVoteResult_t )
|
||||
virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
|
||||
virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
|
||||
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
|
||||
virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
|
||||
STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
|
||||
virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP
|
||||
STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
|
||||
virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits
|
||||
virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items
|
||||
virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs
|
||||
|
||||
// get EItemState flags about item on this client
|
||||
virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
|
||||
// get info about currently installed content on disc for items that have k_EItemStateInstalled set
|
||||
// if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder)
|
||||
virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, STEAM_OUT_STRING_COUNT( cchFolderSize ) char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0;
|
||||
|
||||
// get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once
|
||||
virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0;
|
||||
|
||||
// download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed,
|
||||
// then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time.
|
||||
// If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP.
|
||||
virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0;
|
||||
|
||||
// game servers can set a specific workshop folder before issuing any UGC commands.
|
||||
// This is helpful if you want to support multiple game servers running out of the same install folder
|
||||
virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0;
|
||||
|
||||
// SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends
|
||||
virtual void SuspendDownloads( bool bSuspend ) = 0;
|
||||
|
||||
// usage tracking
|
||||
STEAM_CALL_RESULT( StartPlaytimeTrackingResult_t )
|
||||
virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
|
||||
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
|
||||
virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
|
||||
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
|
||||
virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0;
|
||||
|
||||
// parent-child relationship or dependency management
|
||||
STEAM_CALL_RESULT( AddUGCDependencyResult_t )
|
||||
virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
|
||||
STEAM_CALL_RESULT( RemoveUGCDependencyResult_t )
|
||||
virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
|
||||
|
||||
// add/remove app dependence/requirements (usually DLC)
|
||||
STEAM_CALL_RESULT( AddAppDependencyResult_t )
|
||||
virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
|
||||
STEAM_CALL_RESULT( RemoveAppDependencyResult_t )
|
||||
virtual SteamAPICall_t RemoveAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
|
||||
// request app dependencies. note that whatever callback you register for GetAppDependenciesResult_t may be called multiple times
|
||||
// until all app dependencies have been returned
|
||||
STEAM_CALL_RESULT( GetAppDependenciesResult_t )
|
||||
virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
|
||||
// delete the item without prompting the user
|
||||
STEAM_CALL_RESULT( DeleteItemResult_t )
|
||||
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
|
||||
};
|
||||
|
||||
#endif // ISTEAMUGC014_H
|
Loading…
Reference in New Issue