mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
Update steamSDK to v1.60
This commit is contained in:
parent
1af521facc
commit
586716d646
@ -1,6 +1,7 @@
|
||||
// GENERATED FILE DO NOT EDIT
|
||||
// TO REGENERATE run ScreenPlayInternal\SteamSDK
|
||||
// TO REGENERATE:
|
||||
// > python.exe generate_qt_enums.py
|
||||
// Copy to ScreenPlayUtil/inc/public/ScreenPlayUtil/steamenumsgenerated.h
|
||||
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
@ -161,6 +162,8 @@ public:
|
||||
K_EResultChargerRequired = 125,
|
||||
K_EResultCachedCredentialInvalid = 126,
|
||||
K_EResultPhoneNumberIsVOIP = 127,
|
||||
K_EResultNotSupported = 128,
|
||||
K_EResultFamilySizeLimitExceeded = 129,
|
||||
};
|
||||
Q_ENUM(EResult)
|
||||
|
||||
@ -374,6 +377,16 @@ public:
|
||||
};
|
||||
Q_ENUM(EDurationControlOnlineState)
|
||||
|
||||
enum class EBetaBranchFlags {
|
||||
K_EBetaBranch_None = 0,
|
||||
K_EBetaBranch_Default = 1,
|
||||
K_EBetaBranch_Available = 2,
|
||||
K_EBetaBranch_Private = 4,
|
||||
K_EBetaBranch_Selected = 8,
|
||||
K_EBetaBranch_Installed = 16,
|
||||
};
|
||||
Q_ENUM(EBetaBranchFlags)
|
||||
|
||||
enum class EGameSearchErrorCode_t {
|
||||
K_EGameSearchErrorCode_OK = 1,
|
||||
K_EGameSearchErrorCode_Failed_Search_Already_In_Progress = 2,
|
||||
@ -665,7 +678,8 @@ public:
|
||||
K_EWorkshopFileTypeSteamworksAccessInvite = 13,
|
||||
K_EWorkshopFileTypeSteamVideo = 14,
|
||||
K_EWorkshopFileTypeGameManagedItem = 15,
|
||||
K_EWorkshopFileTypeMax = 16,
|
||||
K_EWorkshopFileTypeClip = 16,
|
||||
K_EWorkshopFileTypeMax = 17,
|
||||
};
|
||||
Q_ENUM(EWorkshopFileType)
|
||||
|
||||
@ -1898,6 +1912,7 @@ public:
|
||||
K_EItemStateNeedsUpdate = 8,
|
||||
K_EItemStateDownloading = 16,
|
||||
K_EItemStateDownloadPending = 32,
|
||||
K_EItemStateDisabledLocally = 64,
|
||||
};
|
||||
Q_ENUM(EItemState)
|
||||
|
||||
@ -1924,6 +1939,7 @@ public:
|
||||
K_EItemPreviewType_Sketchfab = 2,
|
||||
K_EItemPreviewType_EnvironmentMap_HorizontalCross = 3,
|
||||
K_EItemPreviewType_EnvironmentMap_LatLong = 4,
|
||||
K_EItemPreviewType_Clip = 5,
|
||||
K_EItemPreviewType_ReservedMax = 255,
|
||||
};
|
||||
Q_ENUM(EItemPreviewType)
|
||||
@ -1944,6 +1960,24 @@ public:
|
||||
};
|
||||
Q_ENUM(ESteamItemFlags)
|
||||
|
||||
enum class ETimelineGameMode {
|
||||
K_ETimelineGameMode_Invalid = 0,
|
||||
K_ETimelineGameMode_Playing = 1,
|
||||
K_ETimelineGameMode_Staging = 2,
|
||||
K_ETimelineGameMode_Menus = 3,
|
||||
K_ETimelineGameMode_LoadingScreen = 4,
|
||||
K_ETimelineGameMode_Max = 5,
|
||||
};
|
||||
Q_ENUM(ETimelineGameMode)
|
||||
|
||||
enum class ETimelineEventClipPriority {
|
||||
K_ETimelineEventClipPriority_Invalid = 0,
|
||||
K_ETimelineEventClipPriority_None = 1,
|
||||
K_ETimelineEventClipPriority_Standard = 2,
|
||||
K_ETimelineEventClipPriority_Featured = 3,
|
||||
};
|
||||
Q_ENUM(ETimelineEventClipPriority)
|
||||
|
||||
enum class EParentalFeature {
|
||||
K_EFeatureInvalid = 0,
|
||||
K_EFeatureStore = 1,
|
||||
@ -1959,8 +1993,9 @@ public:
|
||||
K_EFeatureLibrary = 11,
|
||||
K_EFeatureTest = 12,
|
||||
K_EFeatureSiteLicense = 13,
|
||||
K_EFeatureKioskMode = 14,
|
||||
K_EFeatureMax = 15,
|
||||
K_EFeatureKioskMode_Deprecated = 14,
|
||||
K_EFeatureBlockAlways = 15,
|
||||
K_EFeatureMax = 16,
|
||||
};
|
||||
Q_ENUM(EParentalFeature)
|
||||
|
||||
@ -1970,6 +2005,7 @@ public:
|
||||
K_ESteamDeviceFormFactorTablet = 2,
|
||||
K_ESteamDeviceFormFactorComputer = 3,
|
||||
K_ESteamDeviceFormFactorTV = 4,
|
||||
K_ESteamDeviceFormFactorVRHeadset = 5,
|
||||
};
|
||||
Q_ENUM(ESteamDeviceFormFactor)
|
||||
|
||||
@ -2085,11 +2121,16 @@ public:
|
||||
K_ESteamNetworkingConfig_TimeoutInitial = 24,
|
||||
K_ESteamNetworkingConfig_TimeoutConnected = 25,
|
||||
K_ESteamNetworkingConfig_SendBufferSize = 9,
|
||||
K_ESteamNetworkingConfig_RecvBufferSize = 47,
|
||||
K_ESteamNetworkingConfig_RecvBufferMessages = 48,
|
||||
K_ESteamNetworkingConfig_RecvMaxMessageSize = 49,
|
||||
K_ESteamNetworkingConfig_RecvMaxSegmentsPerPacket = 50,
|
||||
K_ESteamNetworkingConfig_ConnectionUserData = 40,
|
||||
K_ESteamNetworkingConfig_SendRateMin = 10,
|
||||
K_ESteamNetworkingConfig_SendRateMax = 11,
|
||||
K_ESteamNetworkingConfig_NagleTime = 12,
|
||||
K_ESteamNetworkingConfig_IP_AllowWithoutAuth = 23,
|
||||
K_ESteamNetworkingConfig_IPLocalHost_AllowWithoutAuth = 52,
|
||||
K_ESteamNetworkingConfig_MTU_PacketSize = 32,
|
||||
K_ESteamNetworkingConfig_MTU_DataSize = 33,
|
||||
K_ESteamNetworkingConfig_Unencrypted = 34,
|
||||
@ -2112,6 +2153,7 @@ public:
|
||||
K_ESteamNetworkingConfig_FakeRateLimit_Send_Burst = 43,
|
||||
K_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44,
|
||||
K_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45,
|
||||
K_ESteamNetworkingConfig_OutOfOrderCorrectionWindowMicroseconds = 51,
|
||||
K_ESteamNetworkingConfig_Callback_ConnectionStatusChanged = 201,
|
||||
K_ESteamNetworkingConfig_Callback_AuthStatusChanged = 202,
|
||||
K_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged = 203,
|
||||
@ -2132,15 +2174,17 @@ public:
|
||||
K_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate = 21,
|
||||
K_ESteamNetworkingConfig_SDRClient_SingleSocket = 22,
|
||||
K_ESteamNetworkingConfig_SDRClient_ForceRelayCluster = 29,
|
||||
K_ESteamNetworkingConfig_SDRClient_DebugTicketAddress = 30,
|
||||
K_ESteamNetworkingConfig_SDRClient_DevTicket = 30,
|
||||
K_ESteamNetworkingConfig_SDRClient_ForceProxyAddr = 31,
|
||||
K_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
|
||||
K_ESteamNetworkingConfig_SDRClient_LimitPingProbesToNearestN = 60,
|
||||
K_ESteamNetworkingConfig_LogLevel_AckRTT = 13,
|
||||
K_ESteamNetworkingConfig_LogLevel_PacketDecode = 14,
|
||||
K_ESteamNetworkingConfig_LogLevel_Message = 15,
|
||||
K_ESteamNetworkingConfig_LogLevel_PacketGaps = 16,
|
||||
K_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17,
|
||||
K_ESteamNetworkingConfig_LogLevel_SDRRelayPings = 18,
|
||||
K_ESteamNetworkingConfig_ECN = 999,
|
||||
K_ESteamNetworkingConfig_DELETED_EnumerateDevVars = 35,
|
||||
K_ESteamNetworkingConfigValue__Force32Bit = 2147483647,
|
||||
};
|
||||
@ -2170,6 +2214,14 @@ public:
|
||||
};
|
||||
Q_ENUM(ESteamNetworkingSocketsDebugOutputType)
|
||||
|
||||
enum class ESteamAPIInitResult {
|
||||
K_ESteamAPIInitResult_OK = 0,
|
||||
K_ESteamAPIInitResult_FailedGeneric = 1,
|
||||
K_ESteamAPIInitResult_NoSteamClient = 2,
|
||||
K_ESteamAPIInitResult_VersionMismatch = 3,
|
||||
};
|
||||
Q_ENUM(ESteamAPIInitResult)
|
||||
|
||||
enum class EServerMode {
|
||||
EServerModeInvalid = 0,
|
||||
EServerModeNoAuthentication = 1,
|
||||
|
@ -1,6 +1,6 @@
|
||||
================================================================
|
||||
|
||||
Copyright © 1996-2022, Valve Corporation, All rights reserved.
|
||||
Copyright © 1996-2024, Valve Corporation, All rights reserved.
|
||||
|
||||
================================================================
|
||||
|
||||
@ -8,6 +8,71 @@ Copyright
|
||||
Welcome to the Steamworks SDK. For documentation please see our partner
|
||||
website at: http://partner.steamgames.com
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.60 19th June 2024
|
||||
----------------------------------------------------------------
|
||||
|
||||
General
|
||||
* CSteamAPIContext has been removed. Please switch to using the Steam<interface> accessors where appropriate.
|
||||
|
||||
ISteamTimeline
|
||||
* Added this new interface to allow games to provide information that supports the new Game Recording feature. See the [url=https://partner.steamgames.com/doc/features/timeline]Timeline[/url] documentation for more information.
|
||||
|
||||
ISteamUGC
|
||||
* Added 64 bit m_ulTotalFilesSize to SteamUGCDetails_t which is the correct size of the content for Workshop items are larger than 2,147,483,647 bytes.
|
||||
* Added GetNumSupportedGameVersions() and GetSupportedGameVersionData() which can be used to determine what game beta branches a Workshop item supports/is valid for.
|
||||
* Added SetAdminQuery() to allow ISteamUGC to be used in a tools like environment for users who have the appropriate privileges for the calling appid.
|
||||
|
||||
ISteamApps
|
||||
* Added API to allow the game to manage active beta branches.
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.59 9th February 2024
|
||||
----------------------------------------------------------------
|
||||
General
|
||||
* Added new initialization method, SteamAPI_InitFlat
|
||||
|
||||
ISteamUtils
|
||||
* Added DismissGamepadTextInput
|
||||
|
||||
ISteamAppList
|
||||
* This interface has been removed from the SDK
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.58a 26th October 2023
|
||||
----------------------------------------------------------------
|
||||
Fixes to steam_api_flat.h
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.58 15th September 2023
|
||||
----------------------------------------------------------------
|
||||
ISteamRemotePlay
|
||||
* Added BStartRemotePlayTogether to start Remote Play Together and optionally show the UI in the overlay
|
||||
|
||||
ISteamUGC
|
||||
* The function SetItemTags now takes in a parameter to allow the modification of admin tags through the SDK if the logged-in user has the appropriate permissions
|
||||
* Added GetUserContentDescriptorPreferences, which can be used to show the user their current set of preferences and then direct them to Steam to modify them at https://store.steampowered.com/account/preferences/
|
||||
|
||||
Misc.
|
||||
* Added SteamAPI_InitEx and SteamGameServer_InitEx, which will return k_ESteamAPIInitResult_OK upon success or an error code specified in in ESteamAPIInitResult. An optional, non-localized error message can also be returned.
|
||||
* SteamAPI_Init() will now return false if the installed Steam client needs to be updated to support the game’s version of the SDK
|
||||
* Improved handling of corrupted tickets via updated sdkencryptedappticket.lib
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.57 28th April 2022
|
||||
----------------------------------------------------------------
|
||||
User
|
||||
* Updated ISteamUser::GetAuthTicketForWebApi(), To create a ticket for use by the AuthenticateUserTicket Web API
|
||||
* Updated ISteamUser::GetAuthSessionTicket(), No longer to be used to create a ticket for use by the AuthenticateUserTicket Web API
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.56 30th March 2023
|
||||
----------------------------------------------------------------
|
||||
User
|
||||
* Updated ISteamUser::GetAuthSessionTicket(), Add parameter SteamNetworkingIdentity
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.55 29th July 2022
|
||||
----------------------------------------------------------------
|
||||
|
@ -1,3 +1,3 @@
|
||||
### Steam SDK
|
||||
Version: 1.53a - 23.11.2021
|
||||
Version: 1.60 - 23.08.2024
|
||||
Download from: https://partner.steamgames.com/home
|
@ -28,8 +28,9 @@ if __name__ == '__main__':
|
||||
path = os.path.join(my_path, "public/steam/steam_api.json")
|
||||
|
||||
file_begin = """// GENERATED FILE DO NOT EDIT
|
||||
// TO REGENERATE run ScreenPlayInternal\SteamSDK
|
||||
// > python.exe updateEnums.py
|
||||
// TO REGENERATE:
|
||||
// > python.exe generate_qt_enums.py
|
||||
// Copy to ScreenPlayUtil/inc/public/ScreenPlayUtil/steamenumsgenerated.h
|
||||
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
|
@ -1,64 +0,0 @@
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to app data in Steam
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMAPPLIST_H
|
||||
#define ISTEAMAPPLIST_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: This is a restricted interface that can only be used by previously approved apps,
|
||||
// contact your Steam Account Manager if you believe you need access to this API.
|
||||
// This interface lets you detect installed apps for the local Steam client, useful for debugging tools
|
||||
// to offer lists of apps to debug via Steam.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamAppList {
|
||||
public:
|
||||
virtual uint32 GetNumInstalledApps() = 0;
|
||||
virtual uint32 GetInstalledApps(AppId_t* pvecAppID, uint32 unMaxAppIDs) = 0;
|
||||
|
||||
virtual int GetAppName(AppId_t nAppID, STEAM_OUT_STRING() char* pchName, int cchNameMax) = 0; // returns -1 if no name was found
|
||||
virtual int GetAppInstallDir(AppId_t nAppID, char* pchDirectory, int cchNameMax) = 0; // returns -1 if no dir was found
|
||||
|
||||
virtual int GetAppBuildId(AppId_t nAppID) = 0; // return the buildid of this app, may change at any time based on backend updates to the game
|
||||
};
|
||||
|
||||
#define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamAppList* SteamAppList();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamAppList*, SteamAppList, STEAMAPPLIST_INTERFACE_VERSION);
|
||||
|
||||
// callbacks
|
||||
#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: Sent when a new app is installed (not downloaded yet)
|
||||
//---------------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN(SteamAppInstalled_t, k_iSteamAppListCallbacks + 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_MEMBER(1, int, m_iInstallFolderIndex) // library folder the app was installed
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif // ISTEAMAPPLIST_H
|
@ -14,10 +14,12 @@
|
||||
|
||||
const int k_cubAppProofOfPurchaseKeyMax = 240; // max supported length of a legacy cd key
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to app data
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamApps {
|
||||
class ISteamApps
|
||||
{
|
||||
public:
|
||||
virtual bool BIsSubscribed() = 0;
|
||||
virtual bool BIsLowViolence() = 0;
|
||||
@ -82,7 +84,7 @@ public:
|
||||
// return the buildid of this app, may change at any time based on backend updates to the game
|
||||
virtual int GetAppBuildId() = 0;
|
||||
|
||||
// Request all proof of purchase keys for the calling appid and asociated DLC.
|
||||
// Request all proof of purchase keys for the calling appid and associated DLC.
|
||||
// A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with
|
||||
// appropriate appid values, ending with a final callback where the m_nAppId
|
||||
// member is k_uAppIdInvalid (zero).
|
||||
@ -109,6 +111,15 @@ public:
|
||||
|
||||
// set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions
|
||||
virtual bool SetDlcContext( AppId_t nAppID ) = 0;
|
||||
|
||||
// returns total number of known app beta branches (including default "public" branch )
|
||||
virtual int GetNumBetas( int *pnAvailable, int *pnPrivate ) = 0; //
|
||||
|
||||
// return beta branch details, name, description, current BuildID and state flags (EBetaBranchFlags)
|
||||
virtual bool GetBetaInfo( int iBetaIndex, uint32 *punFlags, uint32 *punBuildID, char *pchBetaName, int cchBetaName, char *pchDescription, int cchDescription ) = 0; // iterate through
|
||||
|
||||
// select this beta branch for this app as active, might need the game to restart so Steam can update to that branch
|
||||
virtual bool SetActiveBeta( const char *pchBetaName ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
|
||||
@ -128,26 +139,31 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamApps*, SteamApps, STEAMAPPS_INTERFACE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains ownership of DLC & that DLC is installed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DlcInstalled_t {
|
||||
struct DlcInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 5 };
|
||||
AppId_t m_nAppID; // AppID of the DLC
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains executes a Steam URL with command line or query parameters
|
||||
// such as steam://run/<appid>//-commandline/?param1=value1¶m2=value2¶m3=value3 etc
|
||||
// while the game is already running. The new params can be queried
|
||||
// with GetLaunchQueryParam and GetLaunchCommandLine
|
||||
//---------------------------------------------------------------------------------
|
||||
struct NewUrlLaunchParameters_t {
|
||||
struct NewUrlLaunchParameters_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 14 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys
|
||||
// for supporting third-party CD keys, or other proof-of-purchase systems.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AppProofOfPurchaseKeyResponse_t {
|
||||
struct AppProofOfPurchaseKeyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 21 };
|
||||
EResult m_eResult;
|
||||
uint32 m_nAppID;
|
||||
@ -155,10 +171,12 @@ struct AppProofOfPurchaseKeyResponse_t {
|
||||
char m_rgchKey[k_cubAppProofOfPurchaseKeyMax];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to GetFileDetails
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FileDetailsResult_t {
|
||||
struct FileDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 23 };
|
||||
EResult m_eResult;
|
||||
uint64 m_ulFileSize; // original file size in bytes
|
||||
@ -166,10 +184,12 @@ struct FileDetailsResult_t {
|
||||
uint32 m_unFlags; //
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called for games in Timed Trial mode
|
||||
//-----------------------------------------------------------------------------
|
||||
struct TimedTrialStatus_t {
|
||||
struct TimedTrialStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 30 };
|
||||
AppId_t m_unAppID; // appID
|
||||
bool m_bIsOffline; // if true, time allowed / played refers to offline time, not total time
|
||||
|
@ -16,11 +16,13 @@
|
||||
// steamid are located. the sizes of the appid and steamid are implicit in
|
||||
// (each version of) the interface - currently uin32 appid and uint64 steamid
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamAppTicket {
|
||||
class ISteamAppTicket
|
||||
{
|
||||
public:
|
||||
virtual uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPTICKET_INTERFACE_VERSION "STEAMAPPTICKET_INTERFACE_VERSION001"
|
||||
|
||||
|
||||
#endif // ISTEAMAPPTICKET_H
|
||||
|
@ -24,7 +24,8 @@
|
||||
// or if you want to implement a multiplexed gameserver where a single process
|
||||
// is handling multiple games at once with independent gameserver SteamIDs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamClient {
|
||||
class ISteamClient
|
||||
{
|
||||
public:
|
||||
// Creates a communication pipe to the Steam client.
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
@ -114,18 +115,12 @@ public:
|
||||
// Expose HTTP interface
|
||||
virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption.
|
||||
STEAM_PRIVATE_API(virtual void* DEPRECATED_GetISteamUnifiedMessages(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0;)
|
||||
|
||||
// Exposes the ISteamController interface - deprecated in favor of Steam Input
|
||||
virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Exposes the ISteamUGC interface
|
||||
virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns app list interface, only available on specially registered apps
|
||||
virtual ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0;
|
||||
|
||||
// Music Player
|
||||
virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
@ -159,8 +154,9 @@ public:
|
||||
virtual ISteamRemotePlay *GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; )
|
||||
|
||||
};
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient020"
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient021"
|
||||
|
||||
#ifndef STEAM_API_EXPORTS
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteaminput.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteaminput.h"
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_COUNT 16
|
||||
|
||||
@ -36,7 +36,8 @@
|
||||
#define STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA 1.0f
|
||||
|
||||
#ifndef ISTEAMINPUT_H
|
||||
enum ESteamControllerPad {
|
||||
enum ESteamControllerPad
|
||||
{
|
||||
k_ESteamControllerPad_Left,
|
||||
k_ESteamControllerPad_Right
|
||||
};
|
||||
@ -46,7 +47,8 @@ enum ESteamControllerPad {
|
||||
// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead
|
||||
// Versions of Steam that add new controller types in the future will extend this enum if you're
|
||||
// using a lookup table please check the bounds of any origins returned by Steam.
|
||||
enum EControllerActionOrigin {
|
||||
enum EControllerActionOrigin
|
||||
{
|
||||
// Steam Controller
|
||||
k_EControllerActionOrigin_None,
|
||||
k_EControllerActionOrigin_A,
|
||||
@ -461,7 +463,8 @@ enum EControllerActionOrigin {
|
||||
};
|
||||
|
||||
#ifndef ISTEAMINPUT_H
|
||||
enum EXboxOrigin {
|
||||
enum EXboxOrigin
|
||||
{
|
||||
k_EXboxOrigin_A,
|
||||
k_EXboxOrigin_B,
|
||||
k_EXboxOrigin_X,
|
||||
@ -492,7 +495,8 @@ enum EXboxOrigin {
|
||||
k_EXboxOrigin_DPad_East,
|
||||
};
|
||||
|
||||
enum ESteamInputType {
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
k_ESteamInputType_SteamController,
|
||||
k_ESteamInputType_XBox360Controller,
|
||||
@ -512,7 +516,8 @@ enum ESteamInputType {
|
||||
};
|
||||
#endif
|
||||
|
||||
enum ESteamControllerLEDFlag {
|
||||
enum ESteamControllerLEDFlag
|
||||
{
|
||||
k_ESteamControllerLEDFlag_SetColor,
|
||||
k_ESteamControllerLEDFlag_RestoreUserDefault
|
||||
};
|
||||
@ -521,6 +526,7 @@ enum ESteamControllerLEDFlag {
|
||||
// This handle will consistently identify a controller, even if it is disconnected and re-connected
|
||||
typedef uint64 ControllerHandle_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 ControllerActionSetHandle_t;
|
||||
@ -533,9 +539,9 @@ typedef uint64 ControllerAnalogActionHandle_t;
|
||||
#define ControllerAnalogActionData_t InputAnalogActionData_t
|
||||
#define ControllerDigitalActionData_t InputDigitalActionData_t
|
||||
#define ControllerMotionData_t InputMotionData_t
|
||||
#define ControllerMotionDataV2_t InputMotionDataV2_t
|
||||
#else
|
||||
struct ControllerAnalogActionData_t {
|
||||
struct ControllerAnalogActionData_t
|
||||
{
|
||||
// Type of data coming from this action, this will match what got specified in the action set
|
||||
EControllerSourceMode eMode;
|
||||
|
||||
@ -546,7 +552,8 @@ struct ControllerAnalogActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct ControllerDigitalActionData_t {
|
||||
struct ControllerDigitalActionData_t
|
||||
{
|
||||
// The current state of this action; will be true if currently pressed
|
||||
bool bState;
|
||||
|
||||
@ -554,7 +561,8 @@ struct ControllerDigitalActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct ControllerMotionData_t {
|
||||
struct ControllerMotionData_t
|
||||
{
|
||||
// Sensor-fused absolute rotation; will drift in heading
|
||||
float rotQuatX;
|
||||
float rotQuatY;
|
||||
@ -574,11 +582,14 @@ struct ControllerMotionData_t {
|
||||
#endif
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamController {
|
||||
class ISteamController
|
||||
{
|
||||
public:
|
||||
|
||||
// Init and Shutdown must be called when starting/ending use of this interface
|
||||
virtual bool Init() = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
@ -4,9 +4,11 @@
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SCE_PAD_TRIGGER_EFFECT_H
|
||||
#define _SCE_PAD_TRIGGER_EFFECT_H
|
||||
|
||||
|
||||
#define SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_L2 0x01
|
||||
#define SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_R2 0x02
|
||||
|
||||
|
@ -15,7 +15,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: set of relationships to other users
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EFriendRelationship {
|
||||
enum EFriendRelationship
|
||||
{
|
||||
k_EFriendRelationshipNone = 0,
|
||||
k_EFriendRelationshipBlocked = 1, // this doesn't get stored; the user has just done an Ignore on an friendship invite
|
||||
k_EFriendRelationshipRequestRecipient = 2,
|
||||
@ -43,10 +44,12 @@ const FriendsGroupID_t k_FriendsGroupID_Invalid = -1;
|
||||
|
||||
const int k_cEnumerateFollowersMax = 50;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: list of states a friend can be in
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EPersonaState {
|
||||
enum EPersonaState
|
||||
{
|
||||
k_EPersonaStateOffline = 0, // friend is not currently logged on
|
||||
k_EPersonaStateOnline = 1, // friend is logged on
|
||||
k_EPersonaStateBusy = 2, // user is on, but busy
|
||||
@ -58,10 +61,12 @@ enum EPersonaState {
|
||||
k_EPersonaStateMax,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: flags for enumerating friends list, or quickly checking a the relationship between users
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EFriendFlags {
|
||||
enum EFriendFlags
|
||||
{
|
||||
k_EFriendFlagNone = 0x00,
|
||||
k_EFriendFlagBlocked = 0x01,
|
||||
k_EFriendFlagFriendshipRequested = 0x02,
|
||||
@ -79,6 +84,7 @@ enum EFriendFlags {
|
||||
k_EFriendFlagAll = 0xFFFF,
|
||||
};
|
||||
|
||||
|
||||
// friend game played information
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
@ -87,7 +93,8 @@ enum EFriendFlags {
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct FriendGameInfo_t {
|
||||
struct FriendGameInfo_t
|
||||
{
|
||||
CGameID m_gameID;
|
||||
uint32 m_unGameIP;
|
||||
uint16 m_usGamePort;
|
||||
@ -96,10 +103,15 @@ struct FriendGameInfo_t {
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
// special values for FriendGameInfo_t::m_usQueryPort
|
||||
const uint16 k_usFriendGameInfoQueryPort_NotInitialized = 0xFFFF; // We haven't asked the GS for this query port's actual value yet. Was #define QUERY_PORT_NOT_INITIALIZED in older versions of Steamworks SDK.
|
||||
const uint16 k_usFriendGameInfoQueryPort_Error = 0xFFFE; // We were unable to get the query port for this server. Was #define QUERY_PORT_ERROR in older versions of Steamworks SDK.
|
||||
|
||||
// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
|
||||
// The UTF-8 version has to be very generous to accomodate characters that get large when encoded
|
||||
// in UTF-8.
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
k_cchPersonaNameMax = 128,
|
||||
k_cwchPersonaNameMax = 32,
|
||||
};
|
||||
@ -107,7 +119,8 @@ enum {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: user restriction flags
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EUserRestriction {
|
||||
enum EUserRestriction
|
||||
{
|
||||
k_nUserRestrictionNone = 0, // no known chat/content restriction
|
||||
k_nUserRestrictionUnknown = 1, // we don't know yet (user offline)
|
||||
k_nUserRestrictionAnyChat = 2, // user is not allowed to (or can't) send/recv any chat
|
||||
@ -127,16 +140,19 @@ enum { k_cchMaxRichPresenceKeyLength = 64 };
|
||||
enum { k_cchMaxRichPresenceValueLength = 256 };
|
||||
|
||||
// These values are passed as parameters to the store
|
||||
enum EOverlayToStoreFlag {
|
||||
enum EOverlayToStoreFlag
|
||||
{
|
||||
k_EOverlayToStoreFlag_None = 0,
|
||||
k_EOverlayToStoreFlag_AddToCart = 1,
|
||||
k_EOverlayToStoreFlag_AddToCartAndShow = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Tells Steam where to place the browser window inside the overlay
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EActivateGameOverlayToWebPageMode {
|
||||
enum EActivateGameOverlayToWebPageMode
|
||||
{
|
||||
k_EActivateGameOverlayToWebPageMode_Default = 0, // Browser will open next to all other windows that the user has open in the overlay.
|
||||
// The window will remain open, even if the user closes then re-opens the overlay.
|
||||
|
||||
@ -148,14 +164,16 @@ enum EActivateGameOverlayToWebPageMode {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: See GetProfileItemPropertyString and GetProfileItemPropertyUint
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ECommunityProfileItemType {
|
||||
enum ECommunityProfileItemType
|
||||
{
|
||||
k_ECommunityProfileItemType_AnimatedAvatar = 0,
|
||||
k_ECommunityProfileItemType_AvatarFrame = 1,
|
||||
k_ECommunityProfileItemType_ProfileModifier = 2,
|
||||
k_ECommunityProfileItemType_ProfileBackground = 3,
|
||||
k_ECommunityProfileItemType_MiniProfileBackground = 4,
|
||||
};
|
||||
enum ECommunityProfileItemProperty {
|
||||
enum ECommunityProfileItemProperty
|
||||
{
|
||||
k_ECommunityProfileItemProperty_ImageSmall = 0, // string
|
||||
k_ECommunityProfileItemProperty_ImageLarge = 1, // string
|
||||
k_ECommunityProfileItemProperty_InternalName = 2, // string
|
||||
@ -174,7 +192,8 @@ enum ECommunityProfileItemProperty {
|
||||
// Purpose: interface to accessing information about individual users,
|
||||
// that can be a friend, in a group, on a game server or in a lobby with the local user
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamFriends {
|
||||
class ISteamFriends
|
||||
{
|
||||
public:
|
||||
// returns the local players name - guaranteed to not be NULL.
|
||||
// this is the same name as on the users community profile page
|
||||
@ -461,16 +480,19 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamFriends*, SteamFriends, STEAMFRIENDS_
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a friends' status changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PersonaStateChange_t {
|
||||
struct PersonaStateChange_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 4 };
|
||||
|
||||
uint64 m_ulSteamID; // steamID of the friend who changed
|
||||
int m_nChangeFlags; // what's changed
|
||||
};
|
||||
|
||||
|
||||
// used in PersonaStateChange_t::m_nChangeFlags to describe what's changed about a user
|
||||
// these flags describe what the client has learned has changed recently, so on startup you'll see a name, avatar & relationship change for every friend
|
||||
enum EPersonaChange {
|
||||
enum EPersonaChange
|
||||
{
|
||||
k_EPersonaChangeName = 0x0001,
|
||||
k_EPersonaChangeStatus = 0x0002,
|
||||
k_EPersonaChangeComeOnline = 0x0004,
|
||||
@ -488,32 +510,39 @@ enum EPersonaChange {
|
||||
k_EPersonaChangeRichPresence = 0x4000,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted when game overlay activates or deactivates
|
||||
// the game can use this to be pause or resume single player games
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameOverlayActivated_t {
|
||||
struct GameOverlayActivated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 31 };
|
||||
uint8 m_bActive; // true if it's just been activated, false otherwise
|
||||
bool m_bUserInitiated; // true if the user asked for the overlay to be activated/deactivated
|
||||
AppId_t m_nAppID; // the appID of the game (should always be the current game)
|
||||
uint32 m_dwOverlayPID; // used internally
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a different game server from their friends list
|
||||
// game client should attempt to connect to specified server when this is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameServerChangeRequested_t {
|
||||
struct GameServerChangeRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 32 };
|
||||
char m_rgchServer[64]; // server address ("127.0.0.1:27015", "tf2.valvesoftware.com")
|
||||
char m_rgchPassword[64]; // server password, if any
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a lobby from their friends list
|
||||
// game client should attempt to connect to specified lobby when this is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameLobbyJoinRequested_t {
|
||||
struct GameLobbyJoinRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 33 };
|
||||
CSteamID m_steamIDLobby;
|
||||
|
||||
@ -525,11 +554,13 @@ struct GameLobbyJoinRequested_t {
|
||||
CSteamID m_steamIDFriend;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call
|
||||
// if the image wasn't already available
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AvatarImageLoaded_t {
|
||||
struct AvatarImageLoaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 34 };
|
||||
CSteamID m_steamID; // steamid the avatar has been loaded for
|
||||
int m_iImage; // the image index of the now loaded image
|
||||
@ -537,58 +568,70 @@ struct AvatarImageLoaded_t {
|
||||
int m_iTall; // height of the loaded image
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: marks the return of a request officer list call
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ClanOfficerListResponse_t {
|
||||
struct ClanOfficerListResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 35 };
|
||||
CSteamID m_steamIDClan;
|
||||
int m_cOfficers;
|
||||
uint8 m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating updated data about friends rich presence information
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FriendRichPresenceUpdate_t {
|
||||
struct FriendRichPresenceUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 36 };
|
||||
CSteamID m_steamIDFriend; // friend who's rich presence has changed
|
||||
AppId_t m_nAppID; // the appID of the game (should always be the current game)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a game from their friends list
|
||||
// rich presence will have been set with the "connect" key which is set here
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameRichPresenceJoinRequested_t {
|
||||
struct GameRichPresenceJoinRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 37 };
|
||||
CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend)
|
||||
char m_rgchConnect[k_cchMaxRichPresenceValueLength];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a chat message has been received for a clan chat the game has joined
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedClanChatMsg_t {
|
||||
struct GameConnectedClanChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 38 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has joined a clan chat
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatJoin_t {
|
||||
struct GameConnectedChatJoin_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 39 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has left the chat we're in
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatLeave_t {
|
||||
struct GameConnectedChatLeave_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 40 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
@ -596,18 +639,22 @@ struct GameConnectedChatLeave_t {
|
||||
bool m_bDropped; // true if Steam connection dropped
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a DownloadClanActivityCounts() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DownloadClanActivityCountsResult_t {
|
||||
struct DownloadClanActivityCountsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 41 };
|
||||
bool m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a JoinClanChatRoom() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct JoinClanChatRoomCompletionResult_t {
|
||||
struct JoinClanChatRoomCompletionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 42 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
EChatRoomEnterResponse m_eChatRoomEnterResponse;
|
||||
@ -616,27 +663,34 @@ struct JoinClanChatRoomCompletionResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a chat message has been received from a user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedFriendChatMsg_t {
|
||||
struct GameConnectedFriendChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 43 };
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
struct FriendsGetFollowerCount_t {
|
||||
|
||||
struct FriendsGetFollowerCount_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 44 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_steamID;
|
||||
int m_nCount;
|
||||
};
|
||||
|
||||
struct FriendsIsFollowing_t {
|
||||
|
||||
struct FriendsIsFollowing_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 45 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_steamID;
|
||||
bool m_bIsFollowing;
|
||||
};
|
||||
|
||||
struct FriendsEnumerateFollowingList_t {
|
||||
|
||||
struct FriendsEnumerateFollowingList_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 46 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_rgSteamID[ k_cEnumerateFollowersMax ];
|
||||
@ -647,7 +701,8 @@ struct FriendsEnumerateFollowingList_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: reports the result of an attempt to change the user's persona name
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SetPersonaNameResponse_t {
|
||||
struct SetPersonaNameResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 47 };
|
||||
|
||||
bool m_bSuccess; // true if name change succeeded completely.
|
||||
@ -658,14 +713,17 @@ struct SetPersonaNameResponse_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Invoked when the status of unread messages changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UnreadChatMessagesChanged_t {
|
||||
struct UnreadChatMessagesChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 48 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by RegisterProtocolInOverlayBrowser()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct OverlayBrowserProtocolNavigation_t {
|
||||
struct OverlayBrowserProtocolNavigation_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 49 };
|
||||
char rgchURI[ 1024 ];
|
||||
};
|
||||
@ -673,7 +731,8 @@ struct OverlayBrowserProtocolNavigation_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A user's equipped profile items have changed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct EquippedProfileItemsChanged_t {
|
||||
struct EquippedProfileItemsChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 50 };
|
||||
CSteamID m_steamID;
|
||||
};
|
||||
@ -681,7 +740,8 @@ struct EquippedProfileItemsChanged_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
struct EquippedProfileItems_t {
|
||||
struct EquippedProfileItems_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 51 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_steamID;
|
||||
|
@ -12,8 +12,10 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
// list of possible return values from the ISteamGameCoordinator API
|
||||
enum EGCResults {
|
||||
enum EGCResults
|
||||
{
|
||||
k_EGCResultOK = 0,
|
||||
k_EGCResultNoMessage = 1, // There is no message in the queue
|
||||
k_EGCResultBufferTooSmall = 2, // The buffer is too small for the requested message
|
||||
@ -21,12 +23,15 @@ enum EGCResults {
|
||||
k_EGCResultInvalidMessage = 4, // Something was wrong with the message being sent with SendMessage
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for sending and receiving messages from the Game Coordinator
|
||||
// for this application
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameCoordinator {
|
||||
class ISteamGameCoordinator
|
||||
{
|
||||
public:
|
||||
|
||||
// sends a message to the Game Coordinator
|
||||
virtual EGCResults SendMessage( uint32 unMsgType, const void *pubData, uint32 cubData ) = 0;
|
||||
|
||||
@ -38,6 +43,7 @@ public:
|
||||
// If the provided buffer is not large enough to fit the entire message, k_EGCResultBufferTooSmall is returned
|
||||
// and the message remains at the head of the queue.
|
||||
virtual EGCResults RetrieveMessage( uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0;
|
||||
|
||||
};
|
||||
#define STEAMGAMECOORDINATOR_INTERFACE_VERSION "SteamGameCoordinator001"
|
||||
|
||||
@ -51,13 +57,15 @@ public:
|
||||
#endif
|
||||
|
||||
// callback notification - A new message is available for reading from the message queue
|
||||
struct GCMessageAvailable_t {
|
||||
struct GCMessageAvailable_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 1 };
|
||||
uint32 m_nMessageSize;
|
||||
};
|
||||
|
||||
// callback notification - A message failed to make it to the GC. It may be down temporarily
|
||||
struct GCMessageFailed_t {
|
||||
struct GCMessageFailed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 2 };
|
||||
};
|
||||
|
||||
|
@ -15,8 +15,10 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameServer {
|
||||
class ISteamGameServer
|
||||
{
|
||||
public:
|
||||
|
||||
//
|
||||
// Basic server data. These properties, if set, must be set before before calling LogOn. They
|
||||
// may not be changed after logged in.
|
||||
@ -172,6 +174,7 @@ public:
|
||||
// returns false if we're not connected to the steam servers and thus cannot ask
|
||||
virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0;
|
||||
|
||||
|
||||
// these two functions s are deprecated, and will not return results
|
||||
// they will be removed in a future version of the SDK
|
||||
virtual void GetGameplayStats( ) = 0;
|
||||
@ -215,6 +218,9 @@ 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
|
||||
@ -256,7 +262,8 @@ public:
|
||||
|
||||
STEAM_PRIVATE_API(
|
||||
virtual void SetMasterServerHeartbeatInterval_DEPRECATED( int iHeartbeatInterval ) = 0;
|
||||
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;)
|
||||
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;
|
||||
)
|
||||
};
|
||||
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer015"
|
||||
@ -274,23 +281,29 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamGameServer*, SteamGameServer, S
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
// client has been approved to connect to this game server
|
||||
struct GSClientApprove_t {
|
||||
struct GSClientApprove_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 1 };
|
||||
CSteamID m_SteamID; // SteamID of approved player
|
||||
CSteamID m_OwnerSteamID; // SteamID of original owner for game license
|
||||
};
|
||||
|
||||
|
||||
// client has been denied to connection to this game server
|
||||
struct GSClientDeny_t {
|
||||
struct GSClientDeny_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 2 };
|
||||
CSteamID m_SteamID;
|
||||
EDenyReason m_eDenyReason;
|
||||
char m_rgchOptionalText[128];
|
||||
};
|
||||
|
||||
|
||||
// request the game server should kick the user
|
||||
struct GSClientKick_t {
|
||||
struct GSClientKick_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 3 };
|
||||
CSteamID m_SteamID;
|
||||
EDenyReason m_eDenyReason;
|
||||
@ -299,8 +312,10 @@ struct GSClientKick_t {
|
||||
// NOTE: callback values 4 and 5 are skipped because they are used for old deprecated callbacks,
|
||||
// do not reuse them here.
|
||||
|
||||
|
||||
// client achievement info
|
||||
struct GSClientAchievementStatus_t {
|
||||
struct GSClientAchievementStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 6 };
|
||||
uint64 m_SteamID;
|
||||
char m_pchAchievement[128];
|
||||
@ -309,13 +324,15 @@ struct GSClientAchievementStatus_t {
|
||||
|
||||
// received when the game server requests to be displayed as secure (VAC protected)
|
||||
// m_bSecure is true if the game server should display itself as secure to users, false otherwise
|
||||
struct GSPolicyResponse_t {
|
||||
struct GSPolicyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 15 };
|
||||
uint8 m_bSecure;
|
||||
};
|
||||
|
||||
// GS gameplay stats info
|
||||
struct GSGameplayStats_t {
|
||||
struct GSGameplayStats_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 7 };
|
||||
EResult m_eResult; // Result of the call
|
||||
int32 m_nRank; // Overall rank of the server (0-based)
|
||||
@ -324,7 +341,8 @@ struct GSGameplayStats_t {
|
||||
};
|
||||
|
||||
// send as a reply to RequestUserGroupStatus()
|
||||
struct GSClientGroupStatus_t {
|
||||
struct GSClientGroupStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 8 };
|
||||
CSteamID m_SteamIDUser;
|
||||
CSteamID m_SteamIDGroup;
|
||||
@ -333,7 +351,8 @@ struct GSClientGroupStatus_t {
|
||||
};
|
||||
|
||||
// Sent as a reply to GetServerReputation()
|
||||
struct GSReputation_t {
|
||||
struct GSReputation_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 9 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
uint32 m_unReputationScore; // The reputation score for the game server
|
||||
@ -352,13 +371,15 @@ struct GSReputation_t {
|
||||
};
|
||||
|
||||
// Sent as a reply to AssociateWithClan()
|
||||
struct AssociateWithClanResult_t {
|
||||
struct AssociateWithClanResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 10 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
};
|
||||
|
||||
// Sent as a reply to ComputeNewPlayerCompatibility()
|
||||
struct ComputeNewPlayerCompatibilityResult_t {
|
||||
struct ComputeNewPlayerCompatibilityResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 11 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
int m_cPlayersThatDontLikeCandidate;
|
||||
@ -367,6 +388,7 @@ struct ComputeNewPlayerCompatibilityResult_t {
|
||||
CSteamID m_SteamIDCandidate;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMGAMESERVER_H
|
||||
|
@ -15,7 +15,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameServerStats {
|
||||
class ISteamGameServerStats
|
||||
{
|
||||
public:
|
||||
// downloads stats for the user
|
||||
// returns a GSStatsReceived_t callback when completed
|
||||
@ -65,6 +66,7 @@ public:
|
||||
inline ISteamGameServerStats *SteamGameServerStats();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServerStats *, SteamGameServerStats, STEAMGAMESERVERSTATS_INTERFACE_VERSION );
|
||||
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
@ -78,16 +80,19 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamGameServerStats*, SteamGameServ
|
||||
// Purpose: called when the latests stats and achievements have been received
|
||||
// from the server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsReceived_t {
|
||||
struct GSStatsReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerStatsCallbacks };
|
||||
EResult m_eResult; // Success / error fetching the stats
|
||||
CSteamID m_steamIDUser; // The user for whom the stats are retrieved for
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of a request to store the user stats for a game
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsStored_t {
|
||||
struct GSStatsStored_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerStatsCallbacks + 1 };
|
||||
EResult m_eResult; // success / error
|
||||
CSteamID m_steamIDUser; // The user for whom the stats were stored
|
||||
@ -97,11 +102,13 @@ struct GSStatsStored_t {
|
||||
// Purpose: Callback indicating that a user's stats have been unloaded.
|
||||
// Call RequestUserStats again to access stats for this user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsUnloaded_t {
|
||||
struct GSStatsUnloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 };
|
||||
CSteamID m_steamIDUser; // User whose stats have been unloaded
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMGAMESERVERSTATS_H
|
||||
|
@ -18,7 +18,8 @@ const uint32 INVALID_HTMLBROWSER = 0;
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for displaying HTML pages and interacting with them
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamHTMLSurface {
|
||||
class ISteamHTMLSurface
|
||||
{
|
||||
public:
|
||||
virtual ~ISteamHTMLSurface() {}
|
||||
|
||||
@ -65,7 +66,8 @@ public:
|
||||
// run this javascript script in the currently loaded page
|
||||
virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0;
|
||||
|
||||
enum EHTMLMouseButton {
|
||||
enum EHTMLMouseButton
|
||||
{
|
||||
eHTMLMouseButton_Left = 0,
|
||||
eHTMLMouseButton_Right = 1,
|
||||
eHTMLMouseButton_Middle = 2,
|
||||
@ -80,7 +82,8 @@ public:
|
||||
// nDelta is pixels of scroll
|
||||
virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0;
|
||||
|
||||
enum EMouseCursor {
|
||||
enum EMouseCursor
|
||||
{
|
||||
dc_user = 0,
|
||||
dc_none,
|
||||
dc_arrow,
|
||||
@ -126,7 +129,8 @@ public:
|
||||
dc_last, // custom cursors start from this value and up
|
||||
};
|
||||
|
||||
enum EHTMLKeyModifiers {
|
||||
enum EHTMLKeyModifiers
|
||||
{
|
||||
k_eHTMLKeyModifier_None = 0,
|
||||
k_eHTMLKeyModifier_AltDown = 1 << 0,
|
||||
k_eHTMLKeyModifier_CtrlDown = 1 << 1,
|
||||
@ -215,6 +219,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamHTMLSurface*, SteamHTMLSurface, STEAM
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser is ready for use
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -222,6 +227,7 @@ STEAM_CALLBACK_BEGIN(HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1)
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the browser has a pending paint
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -240,6 +246,7 @@ STEAM_CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this p
|
||||
STEAM_CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages
|
||||
STEAM_CALLBACK_END(12)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser wanted to navigate to a new page
|
||||
// NOTE - you MUST call AllowStartRequest in response to this callback
|
||||
@ -252,6 +259,7 @@ STEAM_CALLBACK_MEMBER(3, const char*, pchPostData) // any posted data for the re
|
||||
STEAM_CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request
|
||||
STEAM_CALLBACK_END(5)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call)
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -259,6 +267,7 @@ STEAM_CALLBACK_BEGIN(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4)
|
||||
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the browser is navigating to a new url
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -271,6 +280,7 @@ STEAM_CALLBACK_MEMBER(4, const char*, pchPageTitle) // the title of the page
|
||||
STEAM_CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A page is finished loading
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -280,6 +290,7 @@ STEAM_CALLBACK_MEMBER(1, const char*, pchURL) //
|
||||
STEAM_CALLBACK_MEMBER( 2, const char *, pchPageTitle ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a request to load this url in a new tab
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -288,6 +299,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the page has a new title now
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -296,6 +308,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: results from a search
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -305,6 +318,7 @@ STEAM_CALLBACK_MEMBER(1, uint32, unResults) //
|
||||
STEAM_CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: page history status changed on the ability to go backwards and forward
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -314,6 +328,7 @@ STEAM_CALLBACK_MEMBER(1, bool, bCanGoBack) //
|
||||
STEAM_CALLBACK_MEMBER( 2, bool, bCanGoForward ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: details on the visibility and size of the horizontal scrollbar
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -326,6 +341,7 @@ STEAM_CALLBACK_MEMBER(4, bool, bVisible) //
|
||||
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: details on the visibility and size of the vertical scrollbar
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -338,6 +354,7 @@ STEAM_CALLBACK_MEMBER(4, bool, bVisible) //
|
||||
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to GetLinkAtPosition call
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -350,6 +367,8 @@ STEAM_CALLBACK_MEMBER(4, bool, bInput) //
|
||||
STEAM_CALLBACK_MEMBER( 5, bool, bLiveLink ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a Javascript alert dialog, call JSDialogResponse
|
||||
// when the user dismisses this dialog (or right away to ignore it)
|
||||
@ -359,6 +378,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a Javascript confirmation dialog, call JSDialogResponse
|
||||
// when the user dismisses this dialog (or right away to ignore it)
|
||||
@ -368,6 +388,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: when received show a file open dialog
|
||||
// then call FileLoadDialogResponse with the file(s) the user selected.
|
||||
@ -378,6 +399,7 @@ STEAM_CALLBACK_MEMBER(1, const char*, pchTitle) //
|
||||
STEAM_CALLBACK_MEMBER( 2, const char *, pchInitialFile ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a new html window is being created.
|
||||
//
|
||||
@ -397,6 +419,7 @@ STEAM_CALLBACK_MEMBER(5, uint32, unTall) // the total height of the pBGRA textur
|
||||
STEAM_CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle_IGNORE )
|
||||
STEAM_CALLBACK_END(7)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: change the cursor to display
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -405,6 +428,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: informational message from the browser
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -413,6 +437,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a tooltip
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -421,6 +446,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: update the text of an existing tooltip
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -429,6 +455,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: hide the tooltip you are showing
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -436,6 +463,7 @@ STEAM_CALLBACK_BEGIN(HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26)
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser has restarted due to an internal failure, use this new handle value
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -444,6 +472,8 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // this is the new brows
|
||||
STEAM_CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMHTMLSURFACE_H
|
||||
|
@ -23,8 +23,10 @@ typedef uint32 HTTPCookieContainerHandle;
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to http client
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamHTTP {
|
||||
class ISteamHTTP
|
||||
{
|
||||
public:
|
||||
|
||||
// Initializes a new HTTP request, returning a handle to use in further operations on it. Requires
|
||||
// the method (GET or POST) and the absolute URL for the request. Both http and https are supported,
|
||||
// so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/
|
||||
@ -157,7 +159,8 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamHTTP*, SteamGameServerHTTP, STE
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
struct HTTPRequestCompleted_t {
|
||||
struct HTTPRequestCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamHTTPCallbacks + 1 };
|
||||
|
||||
// Handle value for the request that has completed.
|
||||
@ -178,7 +181,9 @@ struct HTTPRequestCompleted_t {
|
||||
uint32 m_unBodySize; // Same as GetHTTPResponseBodySize()
|
||||
};
|
||||
|
||||
struct HTTPRequestHeadersReceived_t {
|
||||
|
||||
struct HTTPRequestHeadersReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamHTTPCallbacks + 2 };
|
||||
|
||||
// Handle value for the request that has received headers.
|
||||
@ -189,7 +194,8 @@ struct HTTPRequestHeadersReceived_t {
|
||||
uint64 m_ulContextValue;
|
||||
};
|
||||
|
||||
struct HTTPRequestDataReceived_t {
|
||||
struct HTTPRequestDataReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamHTTPCallbacks + 3 };
|
||||
|
||||
// Handle value for the request that has received data.
|
||||
@ -199,6 +205,7 @@ struct HTTPRequestDataReceived_t {
|
||||
// no context value was set.
|
||||
uint64 m_ulContextValue;
|
||||
|
||||
|
||||
// Offset to provide to GetHTTPStreamingResponseBodyData to get this chunk of data
|
||||
uint32 m_cOffset;
|
||||
|
||||
@ -206,6 +213,7 @@ struct HTTPRequestDataReceived_t {
|
||||
uint32 m_cBytesReceived;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMHTTP_H
|
@ -31,7 +31,8 @@
|
||||
#define STEAM_INPUT_MIN_ANALOG_ACTION_DATA -1.0f
|
||||
#define STEAM_INPUT_MAX_ANALOG_ACTION_DATA 1.0f
|
||||
|
||||
enum EInputSourceMode {
|
||||
enum EInputSourceMode
|
||||
{
|
||||
k_EInputSourceMode_None,
|
||||
k_EInputSourceMode_Dpad,
|
||||
k_EInputSourceMode_Buttons,
|
||||
@ -55,7 +56,8 @@ enum EInputSourceMode {
|
||||
// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead.
|
||||
// Versions of Steam that add new controller types in the future will extend this enum so if you're
|
||||
// using a lookup table please check the bounds of any origins returned by Steam.
|
||||
enum EInputActionOrigin {
|
||||
enum EInputActionOrigin
|
||||
{
|
||||
// Steam Controller
|
||||
k_EInputActionOrigin_None,
|
||||
k_EInputActionOrigin_SteamController_A,
|
||||
@ -256,6 +258,7 @@ enum EInputActionOrigin {
|
||||
k_EInputActionOrigin_XBox360_Reserved9,
|
||||
k_EInputActionOrigin_XBox360_Reserved10,
|
||||
|
||||
|
||||
// Switch - Pro or Joycons used as a single input device.
|
||||
// This does not apply to a single joycon
|
||||
k_EInputActionOrigin_Switch_A,
|
||||
@ -483,7 +486,8 @@ enum EInputActionOrigin {
|
||||
k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
|
||||
};
|
||||
|
||||
enum EXboxOrigin {
|
||||
enum EXboxOrigin
|
||||
{
|
||||
k_EXboxOrigin_A,
|
||||
k_EXboxOrigin_B,
|
||||
k_EXboxOrigin_X,
|
||||
@ -515,24 +519,28 @@ enum EXboxOrigin {
|
||||
k_EXboxOrigin_Count,
|
||||
};
|
||||
|
||||
enum ESteamControllerPad {
|
||||
enum ESteamControllerPad
|
||||
{
|
||||
k_ESteamControllerPad_Left,
|
||||
k_ESteamControllerPad_Right
|
||||
};
|
||||
|
||||
enum EControllerHapticLocation {
|
||||
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 {
|
||||
enum EControllerHapticType
|
||||
{
|
||||
k_EControllerHapticType_Off,
|
||||
k_EControllerHapticType_Tick,
|
||||
k_EControllerHapticType_Click,
|
||||
};
|
||||
|
||||
enum ESteamInputType {
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
k_ESteamInputType_SteamController,
|
||||
k_ESteamInputType_XBox360Controller,
|
||||
@ -553,7 +561,8 @@ enum ESteamInputType {
|
||||
};
|
||||
|
||||
// Individual values are used by the GetSessionInputConfigurationSettings bitmask
|
||||
enum ESteamInputConfigurationEnableType {
|
||||
enum ESteamInputConfigurationEnableType
|
||||
{
|
||||
k_ESteamInputConfigurationEnableType_None = 0x0000,
|
||||
k_ESteamInputConfigurationEnableType_Playstation = 0x0001,
|
||||
k_ESteamInputConfigurationEnableType_Xbox = 0x0002,
|
||||
@ -562,7 +571,8 @@ enum ESteamInputConfigurationEnableType {
|
||||
};
|
||||
|
||||
// These values are passed into SetLEDColor
|
||||
enum ESteamInputLEDFlag {
|
||||
enum ESteamInputLEDFlag
|
||||
{
|
||||
k_ESteamInputLEDFlag_SetColor,
|
||||
// Restore the LED color to the user's preference setting as set in the controller personalization menu.
|
||||
// This also happens automatically on exit of your game.
|
||||
@ -570,14 +580,16 @@ enum ESteamInputLEDFlag {
|
||||
};
|
||||
|
||||
// These values are passed into GetGlyphPNGForActionOrigin
|
||||
enum ESteamInputGlyphSize {
|
||||
enum ESteamInputGlyphSize
|
||||
{
|
||||
k_ESteamInputGlyphSize_Small, // 32x32 pixels
|
||||
k_ESteamInputGlyphSize_Medium, // 128x128 pixels
|
||||
k_ESteamInputGlyphSize_Large, // 256x256 pixels
|
||||
k_ESteamInputGlyphSize_Count,
|
||||
};
|
||||
|
||||
enum ESteamInputGlyphStyle {
|
||||
enum ESteamInputGlyphStyle
|
||||
{
|
||||
// Base-styles - cannot mix
|
||||
ESteamInputGlyphStyle_Knockout = 0x0, // Face buttons will have colored labels/outlines on a knocked out background
|
||||
// Rest of inputs will have white detail/borders on a knocked out background
|
||||
@ -590,7 +602,8 @@ enum ESteamInputGlyphStyle {
|
||||
ESteamInputGlyphStyle_SolidABXY = 0x20, // ABXY Buttons will have a solid fill
|
||||
};
|
||||
|
||||
enum ESteamInputActionEventType {
|
||||
enum ESteamInputActionEventType
|
||||
{
|
||||
ESteamInputActionEventType_DigitalAction,
|
||||
ESteamInputActionEventType_AnalogAction,
|
||||
};
|
||||
@ -607,7 +620,8 @@ typedef uint64 InputAnalogActionHandle_t;
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
struct InputAnalogActionData_t {
|
||||
struct InputAnalogActionData_t
|
||||
{
|
||||
// Type of data coming from this action, this will match what got specified in the action set
|
||||
EInputSourceMode eMode;
|
||||
|
||||
@ -618,7 +632,8 @@ struct InputAnalogActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct InputDigitalActionData_t {
|
||||
struct InputDigitalActionData_t
|
||||
{
|
||||
// The current state of this action; will be true if currently pressed
|
||||
bool bState;
|
||||
|
||||
@ -626,7 +641,8 @@ struct InputDigitalActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct InputMotionData_t {
|
||||
struct InputMotionData_t
|
||||
{
|
||||
// Sensor-fused absolute rotation; will drift in heading toward average
|
||||
float rotQuatX;
|
||||
float rotQuatY;
|
||||
@ -644,60 +660,12 @@ struct InputMotionData_t {
|
||||
float rotVelZ;
|
||||
};
|
||||
|
||||
struct InputMotionDataV2_t {
|
||||
//
|
||||
// Gyro post processing:
|
||||
//
|
||||
|
||||
// Drift Corrected Quaternion is calculated after steam input controller calibration values have been applied.
|
||||
// Rawest _useful_ version of a quaternion.
|
||||
// Most camera implementations should use this by comparing last rotation against current rotation, and applying the difference to the in game camera (plus your own sensitivity tweaks)
|
||||
// It is worth viewing
|
||||
float driftCorrectedQuatX;
|
||||
float driftCorrectedQuatY;
|
||||
float driftCorrectedQuatZ;
|
||||
float driftCorrectedQuatW;
|
||||
|
||||
// Sensor fusion corrects using accelerometer, and "average forward over time" for "forward".
|
||||
// This can "ouija" your aim, so it's not so appropriate for camera controls (sensor fusion was originally made for racing game steering )
|
||||
// Same result as from old InputMotionData_t::rotQuatX/Y/Z/W
|
||||
float sensorFusionQuatX;
|
||||
float sensorFusionQuatY;
|
||||
float sensorFusionQuatZ;
|
||||
float sensorFusionQuatW;
|
||||
|
||||
// Deferred Sensor fusion quaternion with deferred correction
|
||||
// Reduces perception of "ouija" effect by only applying correction when the controller is below "low noise" thresholds,
|
||||
// while the controller rotates fast - never when the user is attempting precision aim.
|
||||
float deferredSensorFusionQuatX;
|
||||
float deferredSensorFusionQuatY;
|
||||
float deferredSensorFusionQuatZ;
|
||||
float deferredSensorFusionQuatW;
|
||||
|
||||
// Same as accel but values are calibrated such that 1 unit = 1G.
|
||||
// X = Right
|
||||
// Y = Forward out through the joystick USB port.
|
||||
// Z = Up through the joystick axis.
|
||||
float gravityX;
|
||||
float gravityY;
|
||||
float gravityZ;
|
||||
|
||||
//
|
||||
// Same as rotVel values in GetMotionData but values are calibrated to degrees per second.
|
||||
// Local Space (controller relative)
|
||||
// X = Pitch = left to right axis
|
||||
// Y = Roll = axis through charging port
|
||||
// Z = Yaw = axis through sticks
|
||||
float degreesPerSecondX;
|
||||
float degreesPerSecondY;
|
||||
float degreesPerSecondZ;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: when callbacks are enabled this fires each time a controller action
|
||||
// state changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputActionEvent_t {
|
||||
struct SteamInputActionEvent_t
|
||||
{
|
||||
InputHandle_t controllerHandle;
|
||||
ESteamInputActionEventType eEventType;
|
||||
struct AnalogAction_t {
|
||||
@ -726,8 +694,10 @@ typedef void (*SteamInputActionEventCallbackPointer)(SteamInputActionEvent_t*);
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamInput {
|
||||
class ISteamInput
|
||||
{
|
||||
public:
|
||||
|
||||
// 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
|
||||
@ -783,6 +753,12 @@ public:
|
||||
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
STEAM_CALL_BACK( SteamInputDeviceDisconnected_t )
|
||||
|
||||
// Controllers using Gamepad emulation (XInput, DirectInput, etc) will be seated in the order that
|
||||
// input is sent by the device. This callback will fire on first input for each device and when the
|
||||
// a user has manually changed the order via the Steam overlay. This also has the device type info
|
||||
// so that you can change out glyph sets without making additional API calls
|
||||
STEAM_CALL_BACK( SteamInputGamepadSlotChange_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
|
||||
@ -953,7 +929,8 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamInput*, SteamInput, STEAMINPUT_INTERF
|
||||
// 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 {
|
||||
struct SteamInputDeviceConnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 1 };
|
||||
InputHandle_t m_ulConnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
@ -962,7 +939,8 @@ struct SteamInputDeviceConnected_t {
|
||||
// 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 {
|
||||
struct SteamInputDeviceDisconnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 2 };
|
||||
InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
@ -971,7 +949,8 @@ struct SteamInputDeviceDisconnected_t {
|
||||
// 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 {
|
||||
struct SteamInputConfigurationLoaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 3 };
|
||||
AppId_t m_unAppID;
|
||||
InputHandle_t m_ulDeviceHandle; // Handle for device
|
||||
@ -984,6 +963,20 @@ struct SteamInputConfigurationLoaded_t {
|
||||
bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings?
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when controller gamepad slots change - on Linux/macOS these
|
||||
// slots are shared for all running apps.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputGamepadSlotChange_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 4 };
|
||||
AppId_t m_unAppID;
|
||||
InputHandle_t m_ulDeviceHandle; // Handle for device
|
||||
ESteamInputType m_eDeviceType; // Type of device
|
||||
int m_nOldGamepadSlot; // Previous GamepadSlot - can be -1 controller doesn't uses gamepad bindings
|
||||
int m_nNewGamepadSlot; // New Gamepad Slot - can be -1 controller doesn't uses gamepad bindings
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMINPUT_H
|
||||
|
@ -21,6 +21,7 @@
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
// Every individual instance of an item has a globally-unique ItemInstanceID.
|
||||
// This ID is unique to the combination of (player, specific item instance)
|
||||
// and will not be transferred to another player or re-used for another item.
|
||||
@ -34,7 +35,9 @@ static const SteamItemInstanceID_t k_SteamItemInstanceIDInvalid = (SteamItemInst
|
||||
// reserved for internal Steam use.
|
||||
typedef int32 SteamItemDef_t;
|
||||
|
||||
enum ESteamItemFlags {
|
||||
|
||||
enum ESteamItemFlags
|
||||
{
|
||||
// Item status flags - these flags are permanently attached to specific item instances
|
||||
k_ESteamItemNoTrade = 1 << 0, // This item is account-locked and cannot be traded or given away.
|
||||
|
||||
@ -46,7 +49,8 @@ enum ESteamItemFlags {
|
||||
// Do not assume anything about the state of other flags which are not defined here.
|
||||
};
|
||||
|
||||
struct SteamItemDetails_t {
|
||||
struct SteamItemDetails_t
|
||||
{
|
||||
SteamItemInstanceID_t m_itemId;
|
||||
SteamItemDef_t m_iDefinition;
|
||||
uint16 m_unQuantity;
|
||||
@ -63,8 +67,10 @@ const SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xfffff
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Inventory query and manipulation API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamInventory {
|
||||
class ISteamInventory
|
||||
{
|
||||
public:
|
||||
|
||||
// INVENTORY ASYNC RESULT MANAGEMENT
|
||||
//
|
||||
// Asynchronous inventory queries always output a result handle which can be used with
|
||||
@ -86,8 +92,7 @@ public:
|
||||
// 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;
|
||||
uint32 *punOutItemsArraySize ) = 0;
|
||||
|
||||
// In combination with GetResultItems, you can use GetResultItemProperty to retrieve
|
||||
// dynamic string properties for a given item returned in the result set.
|
||||
@ -104,8 +109,7 @@ public:
|
||||
virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle,
|
||||
uint32 unItemIndex,
|
||||
const char *pchPropertyName,
|
||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char* pchValueBuffer, uint32* punValueBufferSizeOut)
|
||||
= 0;
|
||||
STEAM_OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Returns the server time at which the result was generated. Compare against
|
||||
// the value of IClientUtils::GetServerRealTime() to determine age.
|
||||
@ -119,6 +123,7 @@ public:
|
||||
// Destroys a result handle and frees all associated memory.
|
||||
virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
|
||||
// INVENTORY ASYNC QUERY
|
||||
//
|
||||
|
||||
@ -131,6 +136,7 @@ public:
|
||||
// or if you expect that the inventory may have changed.
|
||||
virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0;
|
||||
|
||||
|
||||
// Captures the state of a subset of the current user's Steam inventory,
|
||||
// identified by an array of item instance IDs. The results from this call
|
||||
// can be serialized and passed to other players to "prove" that the current
|
||||
@ -140,6 +146,7 @@ public:
|
||||
// then transmit this buffer to other players upon joining a game.
|
||||
virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0;
|
||||
|
||||
|
||||
// RESULT SERIALIZATION AND AUTHENTICATION
|
||||
//
|
||||
// Serialized result sets contain a short signature which can't be forged
|
||||
@ -175,6 +182,7 @@ public:
|
||||
// could challenge the player with expired data to send an updated result set.
|
||||
virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0;
|
||||
|
||||
|
||||
// INVENTORY ASYNC MODIFICATION
|
||||
//
|
||||
|
||||
@ -214,8 +222,8 @@ public:
|
||||
// exchange will fail.
|
||||
virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle,
|
||||
STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
|
||||
STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t* pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32* punArrayDestroyQuantity, uint32 unArrayDestroyLength)
|
||||
= 0;
|
||||
STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0;
|
||||
|
||||
|
||||
// TransferItemQuantity() is intended for use with items which are "stackable" (can have
|
||||
// quantity greater than one). It can be used to split a stack into two, or to transfer
|
||||
@ -223,6 +231,7 @@ public:
|
||||
// two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated.
|
||||
virtual bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) = 0;
|
||||
|
||||
|
||||
// TIMED DROPS AND PLAYTIME CREDIT
|
||||
//
|
||||
|
||||
@ -240,11 +249,12 @@ public:
|
||||
// The client library will suppress too-frequent calls to this method.
|
||||
virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0;
|
||||
|
||||
|
||||
// Deprecated. This method is not supported.
|
||||
virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner,
|
||||
STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
|
||||
STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t* pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32* pArrayGetQuantity, uint32 nArrayGetLength)
|
||||
= 0;
|
||||
STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0;
|
||||
|
||||
|
||||
// ITEM DEFINITIONS
|
||||
//
|
||||
@ -269,8 +279,7 @@ public:
|
||||
// return false if and only if there is not enough space in the output array.
|
||||
virtual bool GetItemDefinitionIDs(
|
||||
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32* punItemDefIDsArraySize)
|
||||
= 0;
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
|
||||
|
||||
// GetItemDefinitionProperty returns a string property from a given item definition.
|
||||
// Note that some properties (for example, "name") may be localized and will depend
|
||||
@ -282,8 +291,7 @@ public:
|
||||
// to pchValueBuffer. If the results do not fit in the given buffer, partial
|
||||
// results may be copied.
|
||||
virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName,
|
||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char* pchValueBuffer, uint32* punValueBufferSizeOut)
|
||||
= 0;
|
||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Request the list of "eligible" promo items that can be manually granted to the given
|
||||
// user. These are promo items of type "manual" that won't be granted automatically.
|
||||
@ -297,8 +305,7 @@ public:
|
||||
virtual bool GetEligiblePromoItemDefinitionIDs(
|
||||
CSteamID steamID,
|
||||
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32* punItemDefIDsArraySize)
|
||||
= 0;
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
|
||||
|
||||
// Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t
|
||||
// will be posted if Steam was able to initialize the transaction.
|
||||
@ -363,12 +370,14 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamInventory*, SteamGameServerInve
|
||||
// SteamInventoryResultReady_t callbacks are fired whenever asynchronous
|
||||
// results transition from "Pending" to "OK" or an error state. There will
|
||||
// always be exactly one callback per handle.
|
||||
struct SteamInventoryResultReady_t {
|
||||
struct SteamInventoryResultReady_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamInventoryCallbacks + 0 };
|
||||
SteamInventoryResult_t m_handle;
|
||||
EResult m_result;
|
||||
};
|
||||
|
||||
|
||||
// SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems
|
||||
// successfully returns a result which is newer / fresher than the last
|
||||
// known result. (It will not trigger if the inventory hasn't changed,
|
||||
@ -376,21 +385,25 @@ struct SteamInventoryResultReady_t {
|
||||
// the earlier result is already known to be stale/out-of-date.)
|
||||
// The normal ResultReady callback will still be triggered immediately
|
||||
// afterwards; this is an additional notification for your convenience.
|
||||
struct SteamInventoryFullUpdate_t {
|
||||
struct SteamInventoryFullUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamInventoryCallbacks + 1 };
|
||||
SteamInventoryResult_t m_handle;
|
||||
};
|
||||
|
||||
|
||||
// A SteamInventoryDefinitionUpdate_t callback is triggered whenever
|
||||
// item definitions have been updated, which could be in response to
|
||||
// LoadItemDefinitions() or any other async request which required
|
||||
// a definition update in order to process results from the server.
|
||||
struct SteamInventoryDefinitionUpdate_t {
|
||||
struct SteamInventoryDefinitionUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamInventoryCallbacks + 2 };
|
||||
};
|
||||
|
||||
// Returned
|
||||
struct SteamInventoryEligiblePromoItemDefIDs_t {
|
||||
struct SteamInventoryEligiblePromoItemDefIDs_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamInventoryCallbacks + 3 };
|
||||
EResult m_result;
|
||||
CSteamID m_steamID;
|
||||
@ -399,15 +412,18 @@ struct SteamInventoryEligiblePromoItemDefIDs_t {
|
||||
};
|
||||
|
||||
// Triggered from StartPurchase call
|
||||
struct SteamInventoryStartPurchaseResult_t {
|
||||
struct SteamInventoryStartPurchaseResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamInventoryCallbacks + 4 };
|
||||
EResult m_result;
|
||||
uint64 m_ulOrderID;
|
||||
uint64 m_ulTransID;
|
||||
};
|
||||
|
||||
|
||||
// Triggered from RequestPrices
|
||||
struct SteamInventoryRequestPricesResult_t {
|
||||
struct SteamInventoryRequestPricesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamInventoryCallbacks + 5 };
|
||||
EResult m_result;
|
||||
char m_rgchCurrency[4];
|
||||
@ -415,4 +431,5 @@ struct SteamInventoryRequestPricesResult_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMCONTROLLER_H
|
||||
|
@ -10,12 +10,13 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamfriends.h"
|
||||
#include "matchmakingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "matchmakingtypes.h"
|
||||
#include "isteamfriends.h"
|
||||
|
||||
// lobby type description
|
||||
enum ELobbyType {
|
||||
enum ELobbyType
|
||||
{
|
||||
k_ELobbyTypePrivate = 0, // only way to join the lobby is to invite to someone else
|
||||
k_ELobbyTypeFriendsOnly = 1, // shows for friends or invitees, but not in lobby list
|
||||
k_ELobbyTypePublic = 2, // visible for friends and in lobby list
|
||||
@ -27,7 +28,8 @@ enum ELobbyType {
|
||||
};
|
||||
|
||||
// lobby search filter tools
|
||||
enum ELobbyComparison {
|
||||
enum ELobbyComparison
|
||||
{
|
||||
k_ELobbyComparisonEqualToOrLessThan = -2,
|
||||
k_ELobbyComparisonLessThan = -1,
|
||||
k_ELobbyComparisonEqual = 0,
|
||||
@ -37,7 +39,8 @@ enum ELobbyComparison {
|
||||
};
|
||||
|
||||
// lobby search distance. Lobby results are sorted from closest to farthest.
|
||||
enum ELobbyDistanceFilter {
|
||||
enum ELobbyDistanceFilter
|
||||
{
|
||||
k_ELobbyDistanceFilterClose, // only lobbies in the same immediate region will be returned
|
||||
k_ELobbyDistanceFilterDefault, // only lobbies in the same region or near by regions
|
||||
k_ELobbyDistanceFilterFar, // for games that don't have many latency requirements, will return lobbies about half-way around the globe
|
||||
@ -51,7 +54,8 @@ enum ELobbyDistanceFilter {
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmaking {
|
||||
class ISteamMatchmaking
|
||||
{
|
||||
public:
|
||||
// game server favorites storage
|
||||
// saves basic details about a multiplayer game server locally
|
||||
@ -285,7 +289,8 @@ typedef void* HServerListRequest;
|
||||
// to cancel any in-progress queries so you don't get a callback into the destructed
|
||||
// object and crash.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingServerListResponse {
|
||||
class ISteamMatchmakingServerListResponse
|
||||
{
|
||||
public:
|
||||
// Server has responded ok with updated data
|
||||
virtual void ServerResponded( HServerListRequest hRequest, int iServer ) = 0;
|
||||
@ -297,6 +302,7 @@ public:
|
||||
virtual void RefreshComplete( HServerListRequest hRequest, EMatchMakingServerResponse response ) = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback interface for receiving responses after pinging an individual server
|
||||
//
|
||||
@ -307,7 +313,8 @@ public:
|
||||
// which is in progress. Failure to cancel in progress queries when destructing
|
||||
// a callback handler may result in a crash when a callback later occurs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingPingResponse {
|
||||
class ISteamMatchmakingPingResponse
|
||||
{
|
||||
public:
|
||||
// Server has responded successfully and has updated data
|
||||
virtual void ServerResponded( gameserveritem_t &server ) = 0;
|
||||
@ -316,6 +323,7 @@ public:
|
||||
virtual void ServerFailedToRespond() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback interface for receiving responses after requesting details on
|
||||
// who is playing on a particular server.
|
||||
@ -327,7 +335,8 @@ public:
|
||||
// which is in progress. Failure to cancel in progress queries when destructing
|
||||
// a callback handler may result in a crash when a callback later occurs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingPlayersResponse {
|
||||
class ISteamMatchmakingPlayersResponse
|
||||
{
|
||||
public:
|
||||
// Got data on a new player on the server -- you'll get this callback once per player
|
||||
// on the server which you have requested player data on.
|
||||
@ -341,6 +350,7 @@ public:
|
||||
virtual void PlayersRefreshComplete() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback interface for receiving responses after requesting rules
|
||||
// details on a particular server.
|
||||
@ -352,7 +362,8 @@ public:
|
||||
// which is in progress. Failure to cancel in progress queries when destructing
|
||||
// a callback handler may result in a crash when a callback later occurs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingRulesResponse {
|
||||
class ISteamMatchmakingRulesResponse
|
||||
{
|
||||
public:
|
||||
// Got data on a rule on the server -- you'll get one of these per rule defined on
|
||||
// the server you are querying
|
||||
@ -366,6 +377,7 @@ public:
|
||||
virtual void RulesRefreshComplete() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Typedef for handle type you will receive when querying details on an individual server.
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -375,7 +387,8 @@ const int HSERVERQUERY_INVALID = 0xffffffff;
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to game lists and details
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingServers {
|
||||
class ISteamMatchmakingServers
|
||||
{
|
||||
public:
|
||||
// Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values.
|
||||
// Each call allocates a new asynchronous request object.
|
||||
@ -490,6 +503,7 @@ public:
|
||||
// Refresh a single server inside of a query (rather than all the servers )
|
||||
virtual void RefreshServer( HServerListRequest hRequest, int iServer ) = 0;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Queries to individual servers directly via IP/Port
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -519,10 +533,12 @@ const uint32 k_unFavoriteFlagNone = 0x00;
|
||||
const uint32 k_unFavoriteFlagFavorite = 0x01; // this game favorite entry is for the favorites list
|
||||
const uint32 k_unFavoriteFlagHistory = 0x02; // this game favorite entry is for the history list
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Used in ChatInfo messages - fields specific to a chat member - must fit in a uint32
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EChatMemberStateChange {
|
||||
enum EChatMemberStateChange
|
||||
{
|
||||
// Specific to joining / leaving the chatroom
|
||||
k_EChatMemberStateChangeEntered = 0x0001, // This user has joined or is joining the chat room
|
||||
k_EChatMemberStateChangeLeft = 0x0002, // This user has left or is leaving the chat room
|
||||
@ -534,11 +550,14 @@ enum EChatMemberStateChange {
|
||||
// returns true of the flags indicate that a user has been removed from the chat
|
||||
#define BChatMemberStateChangeRemoved( rgfChatMemberStateChangeFlags ) ( rgfChatMemberStateChangeFlags & ( k_EChatMemberStateChangeDisconnected | k_EChatMemberStateChangeLeft | k_EChatMemberStateChangeKicked | k_EChatMemberStateChangeBanned ) )
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameSearch {
|
||||
class ISteamGameSearch
|
||||
{
|
||||
public:
|
||||
// =============================================================================================
|
||||
// Game Player APIs
|
||||
@ -598,6 +617,7 @@ public:
|
||||
// ends the game. no further SubmitPlayerResults for ullUniqueGameID will be accepted
|
||||
// any future requests will provide a new ullUniqueGameID
|
||||
virtual EGameSearchErrorCode_t EndGame( uint64 ullUniqueGameID ) = 0;
|
||||
|
||||
};
|
||||
#define STEAMGAMESEARCH_INTERFACE_VERSION "SteamMatchGameSearch001"
|
||||
|
||||
@ -605,17 +625,20 @@ public:
|
||||
inline ISteamGameSearch *SteamGameSearch();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamGameSearch *, SteamGameSearch, STEAMGAMESEARCH_INTERFACE_VERSION );
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for quickly creating a Party with friends or acquaintances,
|
||||
// EG from chat rooms.
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ESteamPartyBeaconLocationType {
|
||||
enum ESteamPartyBeaconLocationType
|
||||
{
|
||||
k_ESteamPartyBeaconLocationType_Invalid = 0,
|
||||
k_ESteamPartyBeaconLocationType_ChatGroup = 1,
|
||||
|
||||
k_ESteamPartyBeaconLocationType_Max,
|
||||
};
|
||||
|
||||
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
@ -624,12 +647,15 @@ enum ESteamPartyBeaconLocationType {
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
struct SteamPartyBeaconLocation_t {
|
||||
|
||||
struct SteamPartyBeaconLocation_t
|
||||
{
|
||||
ESteamPartyBeaconLocationType m_eType;
|
||||
uint64 m_ulLocationID;
|
||||
};
|
||||
|
||||
enum ESteamPartyBeaconLocationData {
|
||||
enum ESteamPartyBeaconLocationData
|
||||
{
|
||||
k_ESteamPartyBeaconLocationDataInvalid = 0,
|
||||
k_ESteamPartyBeaconLocationDataName = 1,
|
||||
k_ESteamPartyBeaconLocationDataIconURLSmall = 2,
|
||||
@ -637,8 +663,10 @@ enum ESteamPartyBeaconLocationData {
|
||||
k_ESteamPartyBeaconLocationDataIconURLLarge = 4,
|
||||
};
|
||||
|
||||
class ISteamParties {
|
||||
class ISteamParties
|
||||
{
|
||||
public:
|
||||
|
||||
// =============================================================================================
|
||||
// Party Client APIs
|
||||
|
||||
@ -686,6 +714,7 @@ public:
|
||||
|
||||
// Utils
|
||||
virtual bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, STEAM_OUT_STRING_COUNT(cchDataStringOut) char *pchDataStringOut, int cchDataStringOut ) = 0;
|
||||
|
||||
};
|
||||
#define STEAMPARTIES_INTERFACE_VERSION "SteamParties002"
|
||||
|
||||
@ -693,13 +722,15 @@ public:
|
||||
inline ISteamParties *SteamParties();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParties *, SteamParties, STEAMPARTIES_INTERFACE_VERSION );
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a server was added/removed from the favorites list, you should refresh now
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FavoritesListChanged_t {
|
||||
struct FavoritesListChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 2 };
|
||||
uint32 m_nIP; // an IP of 0 means reload the whole list, any other value means just one server
|
||||
uint32 m_nQueryPort;
|
||||
@ -710,6 +741,7 @@ struct FavoritesListChanged_t {
|
||||
AccountID_t m_unAccountId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Someone has invited you to join a Lobby
|
||||
// normally you don't need to do anything with this, since
|
||||
@ -718,7 +750,8 @@ struct FavoritesListChanged_t {
|
||||
// if the user outside a game chooses to join, your game will be launched with the parameter "+connect_lobby <64-bit lobby id>",
|
||||
// or with the callback GameLobbyJoinRequested_t if they're already in-game
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyInvite_t {
|
||||
struct LobbyInvite_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 3 };
|
||||
|
||||
uint64 m_ulSteamIDUser; // Steam ID of the person making the invite
|
||||
@ -726,12 +759,14 @@ struct LobbyInvite_t {
|
||||
uint64 m_ulGameID; // GameID of the Lobby
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sent on entering a lobby, or on failing to enter
|
||||
// m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success,
|
||||
// or a higher value on failure (see enum EChatRoomEnterResponse)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyEnter_t {
|
||||
struct LobbyEnter_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 4 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // SteamID of the Lobby you have entered
|
||||
@ -740,12 +775,14 @@ struct LobbyEnter_t {
|
||||
uint32 m_EChatRoomEnterResponse; // EChatRoomEnterResponse
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The lobby metadata has changed
|
||||
// if m_ulSteamIDMember is the steamID of a lobby member, use GetLobbyMemberData() to access per-user details
|
||||
// if m_ulSteamIDMember == m_ulSteamIDLobby, use GetLobbyData() to access lobby metadata
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyDataUpdate_t {
|
||||
struct LobbyDataUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 5 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // steamID of the Lobby
|
||||
@ -754,11 +791,13 @@ struct LobbyDataUpdate_t {
|
||||
// will only be false if RequestLobbyData() was called on a lobby that no longer exists
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The lobby chat room state has changed
|
||||
// this is usually sent when a user has joined or left the lobby
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyChatUpdate_t {
|
||||
struct LobbyChatUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 6 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // Lobby ID
|
||||
@ -768,11 +807,13 @@ struct LobbyChatUpdate_t {
|
||||
uint32 m_rgfChatMemberStateChange; // bitfield of EChatMemberStateChange values
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A chat message for this lobby has been sent
|
||||
// use GetLobbyChatEntry( m_iChatID ) to retrieve the contents of this message
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyChatMsg_t {
|
||||
struct LobbyChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 7 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // the lobby id this is in
|
||||
@ -781,13 +822,15 @@ struct LobbyChatMsg_t {
|
||||
uint32 m_iChatID; // index of the chat entry to lookup
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A game created a game for all the members of the lobby to join,
|
||||
// as triggered by a SetLobbyGameServer()
|
||||
// it's up to the individual clients to take action on this; the usual
|
||||
// game behavior is to leave the lobby and connect to the specified game server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyGameCreated_t {
|
||||
struct LobbyGameCreated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 9 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // the lobby we were in
|
||||
@ -796,33 +839,39 @@ struct LobbyGameCreated_t {
|
||||
uint16 m_usPort;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Number of matching lobbies found
|
||||
// iterate the returned lobbies with GetLobbyByIndex(), from values 0 to m_nLobbiesMatching-1
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyMatchList_t {
|
||||
struct LobbyMatchList_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 10 };
|
||||
uint32 m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted if a user is forcefully removed from a lobby
|
||||
// can occur if a user loses connection to Steam
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyKicked_t {
|
||||
struct LobbyKicked_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 12 };
|
||||
uint64 m_ulSteamIDLobby; // Lobby
|
||||
uint64 m_ulSteamIDAdmin; // User who kicked you - possibly the ID of the lobby itself
|
||||
uint8 m_bKickedDueToDisconnect; // true if you were kicked from the lobby due to the user losing connection to Steam (currently always true)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result of our request to create a Lobby
|
||||
// m_eResult == k_EResultOK on success
|
||||
// at this point, the lobby has been joined and is ready for use
|
||||
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyCreated_t {
|
||||
struct LobbyCreated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 13 };
|
||||
|
||||
EResult m_eResult; // k_EResultOK - the lobby was successfully created
|
||||
@ -838,35 +887,42 @@ struct LobbyCreated_t {
|
||||
// used by now obsolete RequestFriendsLobbiesResponse_t
|
||||
// enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 };
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result of CheckForPSNGameBootInvite
|
||||
// m_eResult == k_EResultOK on success
|
||||
// at this point, the local user may not have finishing joining this lobby;
|
||||
// game code should wait until the subsequent LobbyEnter_t callback is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PSNGameBootInviteResult_t {
|
||||
struct PSNGameBootInviteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 15 };
|
||||
|
||||
bool m_bGameBootInviteExists;
|
||||
CSteamID m_steamIDLobby; // Should be valid if m_bGameBootInviteExists == true
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result of our request to create a Lobby
|
||||
// m_eResult == k_EResultOK on success
|
||||
// at this point, the lobby has been joined and is ready for use
|
||||
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FavoritesListAccountsUpdated_t {
|
||||
struct FavoritesListAccountsUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 16 };
|
||||
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Callbacks for ISteamGameSearch (which go through the regular Steam callback registration system)
|
||||
|
||||
struct SearchForGameProgressCallback_t {
|
||||
struct SearchForGameProgressCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 1 };
|
||||
|
||||
uint64 m_ullSearchID; // all future callbacks referencing this search will include this Search ID
|
||||
@ -880,7 +936,8 @@ struct SearchForGameProgressCallback_t {
|
||||
};
|
||||
|
||||
// notification to all players searching that a game has been found
|
||||
struct SearchForGameResultCallback_t {
|
||||
struct SearchForGameResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 2 };
|
||||
|
||||
uint64 m_ullSearchID;
|
||||
@ -895,12 +952,14 @@ struct SearchForGameResultCallback_t {
|
||||
bool m_bFinalCallback;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ISteamGameSearch : Game Host API callbacks
|
||||
|
||||
// callback from RequestPlayersForGame when the matchmaking service has started or ended search
|
||||
// callback will also follow a call from CancelRequestPlayersForGame - m_bSearchInProgress will be false
|
||||
struct RequestPlayersForGameProgressCallback_t {
|
||||
struct RequestPlayersForGameProgressCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 11 };
|
||||
|
||||
EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK
|
||||
@ -910,7 +969,8 @@ struct RequestPlayersForGameProgressCallback_t {
|
||||
// callback from RequestPlayersForGame
|
||||
// one of these will be sent per player
|
||||
// followed by additional callbacks when players accept or decline the game
|
||||
struct RequestPlayersForGameResultCallback_t {
|
||||
struct RequestPlayersForGameResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 12 };
|
||||
|
||||
EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK
|
||||
@ -918,7 +978,8 @@ struct RequestPlayersForGameResultCallback_t {
|
||||
|
||||
CSteamID m_SteamIDPlayerFound; // player steamID
|
||||
CSteamID m_SteamIDLobby; // if the player is in a lobby, the lobby ID
|
||||
enum PlayerAcceptState_t {
|
||||
enum PlayerAcceptState_t
|
||||
{
|
||||
k_EStateUnknown = 0,
|
||||
k_EStatePlayerAccepted = 1,
|
||||
k_EStatePlayerDeclined = 2,
|
||||
@ -931,7 +992,9 @@ struct RequestPlayersForGameResultCallback_t {
|
||||
uint64 m_ullUniqueGameID;
|
||||
};
|
||||
|
||||
struct RequestPlayersForGameFinalResultCallback_t {
|
||||
|
||||
struct RequestPlayersForGameFinalResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 13 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -939,8 +1002,11 @@ struct RequestPlayersForGameFinalResultCallback_t {
|
||||
uint64 m_ullUniqueGameID;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// this callback confirms that results were received by the matchmaking service for this player
|
||||
struct SubmitPlayerResultResultCallback_t {
|
||||
struct SubmitPlayerResultResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 14 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -948,19 +1014,23 @@ struct SubmitPlayerResultResultCallback_t {
|
||||
CSteamID steamIDPlayer;
|
||||
};
|
||||
|
||||
|
||||
// this callback confirms that the game is recorded as complete on the matchmaking service
|
||||
// the next call to RequestPlayersForGame will generate a new unique game ID
|
||||
struct EndGameResultCallback_t {
|
||||
struct EndGameResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 15 };
|
||||
|
||||
EResult m_eResult;
|
||||
uint64 ullUniqueGameID;
|
||||
};
|
||||
|
||||
|
||||
// Steam has responded to the user request to join a party via the given Beacon ID.
|
||||
// If successful, the connect string contains game-specific instructions to connect
|
||||
// to the game with that party.
|
||||
struct JoinPartyCallback_t {
|
||||
struct JoinPartyCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 1 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -970,7 +1040,8 @@ struct JoinPartyCallback_t {
|
||||
};
|
||||
|
||||
// Response to CreateBeacon request. If successful, the beacon ID is provided.
|
||||
struct CreateBeaconCallback_t {
|
||||
struct CreateBeaconCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 2 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -981,7 +1052,8 @@ struct CreateBeaconCallback_t {
|
||||
// and we've reserved one of the open slots for them.
|
||||
// You should confirm when they join your party by calling OnReservationCompleted().
|
||||
// Otherwise, Steam may timeout their reservation eventually.
|
||||
struct ReservationNotificationCallback_t {
|
||||
struct ReservationNotificationCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 3 };
|
||||
|
||||
PartyBeaconID_t m_ulBeaconID;
|
||||
@ -989,22 +1061,27 @@ struct ReservationNotificationCallback_t {
|
||||
};
|
||||
|
||||
// Response to ChangeNumOpenSlots call
|
||||
struct ChangeNumOpenSlotsCallback_t {
|
||||
struct ChangeNumOpenSlotsCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 4 };
|
||||
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
// The list of possible Party beacon locations has changed
|
||||
struct AvailableBeaconLocationsUpdated_t {
|
||||
struct AvailableBeaconLocationsUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 5 };
|
||||
};
|
||||
|
||||
// The list of active beacons may have changed
|
||||
struct ActiveBeaconsUpdated_t {
|
||||
struct ActiveBeaconsUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 6 };
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMMATCHMAKING
|
||||
|
@ -11,17 +11,20 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
enum AudioPlayback_Status {
|
||||
enum AudioPlayback_Status
|
||||
{
|
||||
AudioPlayback_Undefined = 0,
|
||||
AudioPlayback_Playing = 1,
|
||||
AudioPlayback_Paused = 2,
|
||||
AudioPlayback_Idle = 3
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions to control music playback in the steam client
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMusic {
|
||||
class ISteamMusic
|
||||
{
|
||||
public:
|
||||
virtual bool BIsEnabled() = 0;
|
||||
virtual bool BIsPlaying() = 0;
|
||||
@ -36,6 +39,7 @@ public:
|
||||
// volume is between 0.0 and 1.0
|
||||
virtual void SetVolume( float flVolume ) = 0;
|
||||
virtual float GetVolume() = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMMUSIC_INTERFACE_VERSION "STEAMMUSIC_INTERFACE_VERSION001"
|
||||
@ -53,6 +57,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamMusic*, SteamMusic, STEAMMUSIC_INTERF
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
@ -62,4 +67,5 @@ STEAM_CALLBACK_END(1)
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // #define ISTEAMMUSIC_H
|
||||
|
@ -6,13 +6,15 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteammusic.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteammusic.h"
|
||||
|
||||
#define k_SteamMusicNameMaxLength 255
|
||||
#define k_SteamMusicPNGMaxLength 65535
|
||||
|
||||
class ISteamMusicRemote {
|
||||
|
||||
class ISteamMusicRemote
|
||||
{
|
||||
public:
|
||||
// Service Definition
|
||||
virtual bool RegisterSteamMusicRemote( const char *pchName ) = 0;
|
||||
@ -75,6 +77,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamMusicRemote*, SteamMusicRemote, STEAM
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1)
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
@ -125,4 +128,6 @@ STEAM_CALLBACK_END(1)
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
||||
#endif // #define ISTEAMMUSICREMOTE_H
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
// list of possible errors returned by SendP2PPacket() API
|
||||
// these will be posted in the P2PSessionConnectFail_t callback
|
||||
enum EP2PSessionError {
|
||||
enum EP2PSessionError
|
||||
{
|
||||
k_EP2PSessionErrorNone = 0,
|
||||
k_EP2PSessionErrorNoRightsToApp = 2, // local user doesn't own the app that is running
|
||||
k_EP2PSessionErrorTimeout = 4, // target isn't responding, perhaps not calling AcceptP2PSessionWithUser()
|
||||
@ -31,7 +32,8 @@ enum EP2PSessionError {
|
||||
|
||||
// SendP2PPacket() send types
|
||||
// Typically k_EP2PSendUnreliable is what you want for UDP-like packets, k_EP2PSendReliable for TCP-like packets
|
||||
enum EP2PSend {
|
||||
enum EP2PSend
|
||||
{
|
||||
// Basic UDP send. Packets can't be bigger than 1200 bytes (your typical MTU size). Can be lost, or arrive out of order (rare).
|
||||
// The sending API does have some knowledge of the underlying connection, so if there is no NAT-traversal accomplished or
|
||||
// there is a recognized adjustment happening on the connection, the packet will be batched until the connection is open again.
|
||||
@ -55,6 +57,7 @@ enum EP2PSend {
|
||||
|
||||
};
|
||||
|
||||
|
||||
// connection state to a specified user, returned by GetP2PSessionState()
|
||||
// this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
@ -64,7 +67,8 @@ enum EP2PSend {
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct P2PSessionState_t {
|
||||
struct P2PSessionState_t
|
||||
{
|
||||
uint8 m_bConnectionActive; // true if we've got an active open connection
|
||||
uint8 m_bConnecting; // true if we're currently trying to establish a connection
|
||||
uint8 m_eP2PSessionError; // last error recorded (see enum above)
|
||||
@ -76,12 +80,14 @@ struct P2PSessionState_t {
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
// handle to a socket
|
||||
typedef uint32 SNetSocket_t; // CreateP2PConnectionSocket()
|
||||
typedef uint32 SNetListenSocket_t; // CreateListenSocket()
|
||||
|
||||
// connection progress indicators, used by CreateP2PConnectionSocket()
|
||||
enum ESNetSocketState {
|
||||
enum ESNetSocketState
|
||||
{
|
||||
k_ESNetSocketStateInvalid = 0,
|
||||
|
||||
// communication is valid
|
||||
@ -107,12 +113,14 @@ enum ESNetSocketState {
|
||||
};
|
||||
|
||||
// describes how the socket is currently connected
|
||||
enum ESNetSocketConnectionType {
|
||||
enum ESNetSocketConnectionType
|
||||
{
|
||||
k_ESNetSocketConnectionTypeNotConnected = 0,
|
||||
k_ESNetSocketConnectionTypeUDP = 1,
|
||||
k_ESNetSocketConnectionTypeUDPRelay = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for making connections and sending data between clients,
|
||||
// traversing NAT's where possible
|
||||
@ -121,7 +129,8 @@ enum ESNetSocketConnectionType {
|
||||
/// the Steamworks SDK. Please see ISteamNetworkingSockets and
|
||||
/// ISteamNetworkingMessages
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamNetworking {
|
||||
class ISteamNetworking
|
||||
{
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -189,6 +198,7 @@ public:
|
||||
// to this function, to prevent revealing the client's IP address top another peer.
|
||||
virtual bool AllowP2PPacketRelay( bool bAllow ) = 0;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// LISTEN / CONNECT connection-oriented interface functions
|
||||
@ -208,6 +218,7 @@ public:
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// creates a socket and listens others to connect
|
||||
// will trigger a SocketStatusCallback_t callback on another client connecting
|
||||
// nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports
|
||||
@ -298,23 +309,28 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamNetworking*, SteamGameServerNet
|
||||
|
||||
// callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API
|
||||
// in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them
|
||||
struct P2PSessionRequest_t {
|
||||
struct P2PSessionRequest_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 2 };
|
||||
CSteamID m_steamIDRemote; // user who wants to talk to us
|
||||
};
|
||||
|
||||
|
||||
// callback notification - packets can't get through to the specified user via the SendP2PPacket() API
|
||||
// all packets queued packets unsent at this point will be dropped
|
||||
// further attempts to send will retry making the connection (but will be dropped if we fail again)
|
||||
struct P2PSessionConnectFail_t {
|
||||
struct P2PSessionConnectFail_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 3 };
|
||||
CSteamID m_steamIDRemote; // user we were sending packets to
|
||||
uint8 m_eP2PSessionError; // EP2PSessionError indicating why we're having trouble
|
||||
};
|
||||
|
||||
|
||||
// callback notification - status of a socket has changed
|
||||
// used as part of the CreateListenSocket() / CreateP2PConnectionSocket()
|
||||
struct SocketStatusCallback_t {
|
||||
struct SocketStatusCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 1 };
|
||||
SNetSocket_t m_hSocket; // the socket used to send/receive data to the remote host
|
||||
SNetListenSocket_t m_hListenSocket; // this is the server socket that we were listening on; NULL if this was an outgoing connection
|
||||
|
@ -4,8 +4,8 @@
|
||||
#define ISTEAMNETWORKINGMESSAGES
|
||||
#pragma once
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// The non-connection-oriented interface to send and receive messages
|
||||
@ -33,7 +33,8 @@
|
||||
/// you may find the symmetric connection mode of ISteamNetworkingSockets useful.
|
||||
/// (See k_ESteamNetworkingConfig_SymmetricConnect.)
|
||||
///
|
||||
class ISteamNetworkingMessages {
|
||||
class ISteamNetworkingMessages
|
||||
{
|
||||
public:
|
||||
/// Sends a message to the specified host. If we don't already have a session with that user,
|
||||
/// a session is implicitly created. There might be some handshaking that needs to happen
|
||||
@ -132,7 +133,8 @@ public:
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
/// Posted when a remote host is sending us a message, and we do not already have a session with them
|
||||
struct SteamNetworkingMessagesSessionRequest_t {
|
||||
struct SteamNetworkingMessagesSessionRequest_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 1 };
|
||||
SteamNetworkingIdentity m_identityRemote; // user who wants to talk to us
|
||||
};
|
||||
@ -148,7 +150,8 @@ struct SteamNetworkingMessagesSessionRequest_t {
|
||||
/// Also, if a session times out due to inactivity, no callbacks will be posted. The only
|
||||
/// way to detect that this is happening is that querying the session state may return
|
||||
/// none, connecting, and findingroute again.
|
||||
struct SteamNetworkingMessagesSessionFailed_t {
|
||||
struct SteamNetworkingMessagesSessionFailed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 2 };
|
||||
|
||||
/// Detailed info about the session that failed.
|
||||
@ -174,10 +177,7 @@ STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages* SteamGameServerNetwor
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib() { return SteamGameServerNetworkingMessages_LibV2(); }
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingMessages* SteamNetworkingMessages()
|
||||
{
|
||||
return SteamNetworkingMessages_LibV2();
|
||||
}
|
||||
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); }
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); }
|
||||
#endif
|
||||
#endif
|
||||
@ -190,10 +190,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamNetworkingMessages*, SteamNetworkingM
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamGameServerNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION );
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingMessages* SteamNetworkingMessages()
|
||||
{
|
||||
return SteamNetworkingMessages_SteamAPI();
|
||||
}
|
||||
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_SteamAPI(); }
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
|
@ -4,8 +4,8 @@
|
||||
#define ISTEAMNETWORKINGSOCKETS
|
||||
#pragma once
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
struct SteamNetAuthenticationStatus_t;
|
||||
struct SteamNetworkingFakeIPResult_t;
|
||||
@ -39,8 +39,10 @@ class ISteamNetworkingFakeUDPPort;
|
||||
///
|
||||
/// See also: ISteamNetworkingMessages, the UDP-style interface. This API might be
|
||||
/// easier to use, especially when porting existing UDP code.
|
||||
class ISteamNetworkingSockets {
|
||||
class ISteamNetworkingSockets
|
||||
{
|
||||
public:
|
||||
|
||||
/// Creates a "server" socket that listens for clients to connect to by
|
||||
/// calling ConnectByIPAddress, over ordinary UDP (IPv4 or IPv6)
|
||||
///
|
||||
@ -204,7 +206,7 @@ public:
|
||||
/// 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 hapen if you
|
||||
/// 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
|
||||
@ -349,8 +351,7 @@ public:
|
||||
/// - k_EResultNoConnection - connection handle is invalid or connection has been closed.
|
||||
/// - k_EResultInvalidParam - nLanes is bad
|
||||
virtual EResult GetConnectionRealTimeStatus( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus,
|
||||
int nLanes, SteamNetConnectionRealTimeLaneStatus_t* pLanes)
|
||||
= 0;
|
||||
int nLanes, SteamNetConnectionRealTimeLaneStatus_t *pLanes ) = 0;
|
||||
|
||||
/// Returns detailed connection stats in text format. Useful
|
||||
/// for dumping to a log, etc.
|
||||
@ -396,10 +397,9 @@ public:
|
||||
/// lanes may be sent out of order. Each lane has its own message number
|
||||
/// sequence. The first message sent on each lane will be assigned the number 1.
|
||||
///
|
||||
/// Each lane has a "priority". Lower priority lanes will only be processed
|
||||
/// when all higher-priority lanes are empty. The magnitudes of the priority
|
||||
/// values are not relevant, only their sort order. Higher numeric values
|
||||
/// take priority over lower numeric values.
|
||||
/// Each lane has a "priority". Lanes with higher numeric values will only be processed
|
||||
/// when all lanes with lower number values are empty. The magnitudes of the priority
|
||||
/// values are not relevant, only their sort order.
|
||||
///
|
||||
/// Each lane also is assigned a weight, which controls the approximate proportion
|
||||
/// of the bandwidth that will be consumed by the lane, relative to other lanes
|
||||
@ -687,6 +687,7 @@ public:
|
||||
/// and don't share it directly with clients.
|
||||
virtual EResult GetGameCoordinatorServerLogin( SteamDatagramGameCoordinatorServerLogin *pLoginInfo, int *pcbSignedBlob, void *pBlob ) = 0;
|
||||
|
||||
|
||||
//
|
||||
// Relayed connections using custom signaling protocol
|
||||
//
|
||||
@ -827,7 +828,7 @@ public:
|
||||
/// different types of traffic. Because these allocations come from a global
|
||||
/// namespace, there is a relatively strict limit on the maximum number of
|
||||
/// ports you may request. (At the time of this writing, the limit is 4.)
|
||||
/// The Port assignments are *not* guaranteed to have any particular order
|
||||
/// The port assignments are *not* guaranteed to have any particular order
|
||||
/// or relationship! Do *not* assume they are contiguous, even though that
|
||||
/// may often occur in practice.
|
||||
///
|
||||
@ -930,10 +931,7 @@ STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets* SteamGameServerNetwork
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV12(); }
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingSockets* SteamNetworkingSockets()
|
||||
{
|
||||
return SteamNetworkingSockets_LibV12();
|
||||
}
|
||||
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV12(); }
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV12(); }
|
||||
#endif
|
||||
#endif
|
||||
@ -944,10 +942,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamNetworkingSockets*, SteamNetworkingSo
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamGameServerNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION );
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingSockets* SteamNetworkingSockets()
|
||||
{
|
||||
return SteamNetworkingSockets_SteamAPI();
|
||||
}
|
||||
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_SteamAPI(); }
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
@ -996,7 +991,8 @@ inline ISteamNetworkingSockets* SteamGameServerNetworkingSockets() { return Stea
|
||||
/// state by the time you process this callback.
|
||||
///
|
||||
/// Also note that callbacks will be posted when connections are created and destroyed by your own API calls.
|
||||
struct SteamNetConnectionStatusChangedCallback_t {
|
||||
struct SteamNetConnectionStatusChangedCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 1 };
|
||||
|
||||
/// Connection handle
|
||||
@ -1017,7 +1013,8 @@ struct SteamNetConnectionStatusChangedCallback_t {
|
||||
/// - A valid certificate issued by a CA.
|
||||
///
|
||||
/// This callback is posted whenever the state of our readiness changes.
|
||||
struct SteamNetAuthenticationStatus_t {
|
||||
struct SteamNetAuthenticationStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 2 };
|
||||
|
||||
/// Status
|
||||
|
@ -8,8 +8,8 @@
|
||||
#define ISTEAMNETWORKINGUTILS
|
||||
#pragma once
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
struct SteamDatagramRelayAuthTicket;
|
||||
struct SteamRelayNetworkStatus_t;
|
||||
@ -17,7 +17,8 @@ struct SteamRelayNetworkStatus_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
/// Misc networking utilities for checking the local networking environment
|
||||
/// and estimating pings.
|
||||
class ISteamNetworkingUtils {
|
||||
class ISteamNetworkingUtils
|
||||
{
|
||||
public:
|
||||
//
|
||||
// Efficient message sending
|
||||
@ -303,8 +304,7 @@ public:
|
||||
/// NOTE: When setting pointers (e.g. callback functions), do not pass the function pointer directly.
|
||||
/// Your argument should be a pointer to a function pointer.
|
||||
virtual bool SetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
|
||||
ESteamNetworkingConfigDataType eDataType, const void* pArg)
|
||||
= 0;
|
||||
ESteamNetworkingConfigDataType eDataType, const void *pArg ) = 0;
|
||||
|
||||
/// Set a configuration value, using a struct to pass the value.
|
||||
/// (This is just a convenience shortcut; see below for the implementation and
|
||||
@ -320,15 +320,13 @@ public:
|
||||
/// - pResult: Where to put the result. Pass NULL to query the required buffer size. (k_ESteamNetworkingGetConfigValue_BufferTooSmall will be returned.)
|
||||
/// - cbResult: IN: the size of your buffer. OUT: the number of bytes filled in or required.
|
||||
virtual ESteamNetworkingGetConfigValueResult GetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
|
||||
ESteamNetworkingConfigDataType* pOutDataType, void* pResult, size_t* cbResult)
|
||||
= 0;
|
||||
ESteamNetworkingConfigDataType *pOutDataType, void *pResult, size_t *cbResult ) = 0;
|
||||
|
||||
/// Get info about a configuration value. Returns the name of the value,
|
||||
/// or NULL if the value doesn't exist. Other output parameters can be NULL
|
||||
/// if you do not need them.
|
||||
virtual const char *GetConfigValueInfo( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType *pOutDataType,
|
||||
ESteamNetworkingConfigScope* pOutScope)
|
||||
= 0;
|
||||
ESteamNetworkingConfigScope *pOutScope ) = 0;
|
||||
|
||||
/// Iterate the list of all configuration values in the current environment that it might
|
||||
/// be possible to display or edit using a generic UI. To get the first iterable value,
|
||||
@ -365,10 +363,7 @@ STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils* SteamNetworkingUtils_Lib
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils_Lib() { return SteamNetworkingUtils_LibV4(); }
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingUtils* SteamNetworkingUtils()
|
||||
{
|
||||
return SteamNetworkingUtils_LibV4();
|
||||
}
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_LibV4(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -377,22 +372,23 @@ inline ISteamNetworkingUtils* SteamNetworkingUtils()
|
||||
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamNetworkingUtils *, SteamNetworkingUtils_SteamAPI,
|
||||
/* Prefer user version of the interface. But if it isn't found, then use
|
||||
gameserver one. Yes, this is a completely terrible hack */
|
||||
SteamInternal_FindOrCreateUserInterface(0, STEAMNETWORKINGUTILS_INTERFACE_VERSION) ? SteamInternal_FindOrCreateUserInterface(0, STEAMNETWORKINGUTILS_INTERFACE_VERSION) : SteamInternal_FindOrCreateGameServerInterface(0, STEAMNETWORKINGUTILS_INTERFACE_VERSION),
|
||||
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) ?
|
||||
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) :
|
||||
SteamInternal_FindOrCreateGameServerInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ),
|
||||
"global",
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION)
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION
|
||||
)
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingUtils* SteamNetworkingUtils()
|
||||
{
|
||||
return SteamNetworkingUtils_SteamAPI();
|
||||
}
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/// A struct used to describe our readiness to use the relay network.
|
||||
/// To do this we first need to fetch the network configuration,
|
||||
/// which describes what POPs are available.
|
||||
struct SteamRelayNetworkStatus_t {
|
||||
struct SteamRelayNetworkStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingUtilsCallbacks + 1 };
|
||||
|
||||
/// Summary status. When this is "current", initialization has
|
||||
@ -427,19 +423,19 @@ struct SteamRelayNetworkStatus_t {
|
||||
|
||||
/// Utility class for printing a SteamNetworkingIdentity.
|
||||
/// E.g. printf( "Identity is '%s'\n", SteamNetworkingIdentityRender( identity ).c_str() );
|
||||
struct SteamNetworkingIdentityRender {
|
||||
struct SteamNetworkingIdentityRender
|
||||
{
|
||||
SteamNetworkingIdentityRender( const SteamNetworkingIdentity &x ) { x.ToString( buf, sizeof(buf) ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
|
||||
private:
|
||||
char buf[ SteamNetworkingIdentity::k_cchMaxString ];
|
||||
};
|
||||
|
||||
/// Utility class for printing a SteamNetworkingIPAddrRender.
|
||||
struct SteamNetworkingIPAddrRender {
|
||||
struct SteamNetworkingIPAddrRender
|
||||
{
|
||||
SteamNetworkingIPAddrRender( const SteamNetworkingIPAddr &x, bool bWithPort = true ) { x.ToString( buf, sizeof(buf), bWithPort ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
|
||||
private:
|
||||
char buf[ SteamNetworkingIPAddr::k_cchMaxString ];
|
||||
};
|
||||
|
@ -13,7 +13,8 @@
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// Feature types for parental settings
|
||||
enum EParentalFeature {
|
||||
enum EParentalFeature
|
||||
{
|
||||
k_EFeatureInvalid = 0,
|
||||
k_EFeatureStore = 1,
|
||||
k_EFeatureCommunity = 2,
|
||||
@ -28,11 +29,13 @@ enum EParentalFeature {
|
||||
k_EFeatureLibrary = 11,
|
||||
k_EFeatureTest = 12,
|
||||
k_EFeatureSiteLicense = 13,
|
||||
k_EFeatureKioskMode = 14,
|
||||
k_EFeatureKioskMode_Deprecated = 14,
|
||||
k_EFeatureBlockAlways = 15,
|
||||
k_EFeatureMax
|
||||
};
|
||||
|
||||
class ISteamParentalSettings {
|
||||
class ISteamParentalSettings
|
||||
{
|
||||
public:
|
||||
virtual bool BIsParentalLockEnabled() = 0;
|
||||
virtual bool BIsParentalLockLocked() = 0;
|
||||
@ -53,8 +56,10 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamParentalSettings*, SteamParentalSetti
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for querying UGC
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamParentalSettingsChanged_t {
|
||||
struct SteamParentalSettingsChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_ISteamParentalSettingsCallbacks + 1 };
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMPARENTALSETTINGS_H
|
||||
|
@ -16,7 +16,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Enum for supported gradient directions
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EOverlayGradientDirection {
|
||||
enum EOverlayGradientDirection
|
||||
{
|
||||
k_EOverlayGradientHorizontal = 1,
|
||||
k_EOverlayGradientVertical = 2,
|
||||
k_EOverlayGradientNone = 3,
|
||||
@ -35,11 +36,14 @@ enum EOverlayGradientDirection {
|
||||
#define STEAM_COLOR_ALPHA( color ) \
|
||||
(int)(((color)>>24)&0xff)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface the game must expose to Steam for rendering
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamPS3OverlayRenderHost {
|
||||
class ISteamPS3OverlayRenderHost
|
||||
{
|
||||
public:
|
||||
|
||||
// Interface for game engine to implement which Steam requires to render.
|
||||
|
||||
// Draw a textured rect. This may use only part of the texture and will pass texture coords, it will also possibly request a gradient and will specify colors for vertexes.
|
||||
@ -55,11 +59,14 @@ public:
|
||||
virtual void DeleteAllTextures() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface Steam exposes for the game to tell it when to render, etc.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamPS3OverlayRender {
|
||||
class ISteamPS3OverlayRender
|
||||
{
|
||||
public:
|
||||
|
||||
// Call once at startup to initialize the Steam overlay and pass it your host interface ptr
|
||||
virtual bool BHostInitialize( uint32 unScreenWidth, uint32 unScreenHeight, uint32 unRefreshRate, ISteamPS3OverlayRenderHost *pRenderHost, void *CellFontLib ) = 0;
|
||||
|
||||
@ -80,4 +87,5 @@ public:
|
||||
virtual bool BResetInputState() = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMPS3OVERLAYRENDERER_H
|
@ -8,24 +8,29 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The form factor of a device
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ESteamDeviceFormFactor {
|
||||
enum ESteamDeviceFormFactor
|
||||
{
|
||||
k_ESteamDeviceFormFactorUnknown = 0,
|
||||
k_ESteamDeviceFormFactorPhone = 1,
|
||||
k_ESteamDeviceFormFactorTablet = 2,
|
||||
k_ESteamDeviceFormFactorComputer = 3,
|
||||
k_ESteamDeviceFormFactorTV = 4,
|
||||
k_ESteamDeviceFormFactorVRHeadset = 5,
|
||||
};
|
||||
|
||||
// Steam Remote Play session ID
|
||||
typedef uint32 RemotePlaySessionID_t;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions to provide information about Steam Remote Play sessions
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamRemotePlay {
|
||||
class ISteamRemotePlay
|
||||
{
|
||||
public:
|
||||
// Get the number of currently connected Steam Remote Play sessions
|
||||
virtual uint32 GetSessionCount() = 0;
|
||||
@ -47,12 +52,17 @@ public:
|
||||
// This is set to 0x0 if the resolution is not available
|
||||
virtual bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0;
|
||||
|
||||
// Invite a friend to Remote Play Together
|
||||
// This returns false if the invite can't be sent
|
||||
// Start Remote Play Together and optionally show the UI in the overlay
|
||||
// This returns false if Remote Play Together can't be started or your game is not configured for Remote Play Together
|
||||
virtual bool BStartRemotePlayTogether( bool bShowOverlay = true ) = 0;
|
||||
|
||||
// Invite a friend to Remote Play Together, or create a guest invite if steamIDFriend is empty
|
||||
// This will automatically start Remote Play Together if it hasn't already been started
|
||||
// This returns false if the invite can't be sent or your game is not configured for Remote Play Together
|
||||
virtual bool BSendRemotePlayTogetherInvite( CSteamID steamIDFriend ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION001"
|
||||
#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION002"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamRemotePlay *SteamRemotePlay();
|
||||
@ -67,14 +77,23 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamRemotePlay*, SteamRemotePlay, STEAMRE
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionConnected_t, k_iSteamRemotePlayCallbacks + 1 )
|
||||
STEAM_CALLBACK_MEMBER( 0, RemotePlaySessionID_t, m_unSessionID )
|
||||
STEAM_CALLBACK_END( 0 )
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionDisconnected_t, k_iSteamRemotePlayCallbacks + 2 )
|
||||
STEAM_CALLBACK_MEMBER( 0, RemotePlaySessionID_t, m_unSessionID )
|
||||
STEAM_CALLBACK_END( 0 )
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( SteamRemotePlayTogetherGuestInvite_t, k_iSteamRemotePlayCallbacks + 3 )
|
||||
STEAM_CALLBACK_MEMBER_ARRAY( 0, char, m_szConnectURL, 1024 )
|
||||
STEAM_CALLBACK_END( 0 )
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // #define ISTEAMREMOTEPLAY_H
|
||||
|
@ -12,12 +12,14 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Defines the largest allowed file size. Cloud files cannot be written
|
||||
// in a single chunk over 100MB (and cannot be over 200MB total.)
|
||||
//-----------------------------------------------------------------------------
|
||||
const uint32 k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Structure that contains an array of const char * strings and the number of those strings
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -28,7 +30,8 @@ const uint32 k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct SteamParamStringArray_t {
|
||||
struct SteamParamStringArray_t
|
||||
{
|
||||
const char ** m_ppStrings;
|
||||
int32 m_nNumStrings;
|
||||
};
|
||||
@ -54,7 +57,9 @@ const uint32 k_cchTagListMax = 1024 + 1;
|
||||
const uint32 k_cchFilenameMax = 260;
|
||||
const uint32 k_cchPublishedFileURLMax = 256;
|
||||
|
||||
enum ERemoteStoragePlatform {
|
||||
|
||||
enum ERemoteStoragePlatform
|
||||
{
|
||||
k_ERemoteStoragePlatformNone = 0,
|
||||
k_ERemoteStoragePlatformWindows = (1 << 0),
|
||||
k_ERemoteStoragePlatformOSX = (1 << 1),
|
||||
@ -68,14 +73,17 @@ enum ERemoteStoragePlatform {
|
||||
k_ERemoteStoragePlatformAll = 0xffffffff
|
||||
};
|
||||
|
||||
enum ERemoteStoragePublishedFileVisibility {
|
||||
enum ERemoteStoragePublishedFileVisibility
|
||||
{
|
||||
k_ERemoteStoragePublishedFileVisibilityPublic = 0,
|
||||
k_ERemoteStoragePublishedFileVisibilityFriendsOnly = 1,
|
||||
k_ERemoteStoragePublishedFileVisibilityPrivate = 2,
|
||||
k_ERemoteStoragePublishedFileVisibilityUnlisted = 3,
|
||||
};
|
||||
|
||||
enum EWorkshopFileType {
|
||||
|
||||
enum EWorkshopFileType
|
||||
{
|
||||
k_EWorkshopFileTypeFirst = 0,
|
||||
|
||||
k_EWorkshopFileTypeCommunity = 0, // normal Workshop item that can be subscribed to
|
||||
@ -94,25 +102,29 @@ enum EWorkshopFileType {
|
||||
k_EWorkshopFileTypeSteamworksAccessInvite = 13, // internal
|
||||
k_EWorkshopFileTypeSteamVideo = 14, // Steam video
|
||||
k_EWorkshopFileTypeGameManagedItem = 15, // managed completely by the game, not the user, and not shown on the web
|
||||
k_EWorkshopFileTypeClip = 16, // internal
|
||||
|
||||
// Update k_EWorkshopFileTypeMax if you add values.
|
||||
k_EWorkshopFileTypeMax = 16
|
||||
k_EWorkshopFileTypeMax = 17
|
||||
|
||||
};
|
||||
|
||||
enum EWorkshopVote {
|
||||
enum EWorkshopVote
|
||||
{
|
||||
k_EWorkshopVoteUnvoted = 0,
|
||||
k_EWorkshopVoteFor = 1,
|
||||
k_EWorkshopVoteAgainst = 2,
|
||||
k_EWorkshopVoteLater = 3,
|
||||
};
|
||||
|
||||
enum EWorkshopFileAction {
|
||||
enum EWorkshopFileAction
|
||||
{
|
||||
k_EWorkshopFileActionPlayed = 0,
|
||||
k_EWorkshopFileActionCompleted = 1,
|
||||
};
|
||||
|
||||
enum EWorkshopEnumerationType {
|
||||
enum EWorkshopEnumerationType
|
||||
{
|
||||
k_EWorkshopEnumerationTypeRankedByVote = 0,
|
||||
k_EWorkshopEnumerationTypeRecent = 1,
|
||||
k_EWorkshopEnumerationTypeTrending = 2,
|
||||
@ -122,12 +134,15 @@ enum EWorkshopEnumerationType {
|
||||
k_EWorkshopEnumerationTypeRecentFromFollowedUsers = 6,
|
||||
};
|
||||
|
||||
enum EWorkshopVideoProvider {
|
||||
enum EWorkshopVideoProvider
|
||||
{
|
||||
k_EWorkshopVideoProviderNone = 0,
|
||||
k_EWorkshopVideoProviderYoutube = 1
|
||||
};
|
||||
|
||||
enum EUGCReadAction {
|
||||
|
||||
enum EUGCReadAction
|
||||
{
|
||||
// Keeps the file handle open unless the last byte is read. You can use this when reading large files (over 100MB) in sequential chunks.
|
||||
// If the last byte is read, this will behave the same as k_EUGCRead_Close. Otherwise, it behaves the same as k_EUGCRead_ContinueReading.
|
||||
// This value maintains the same behavior as before the EUGCReadAction parameter was introduced.
|
||||
@ -142,7 +157,8 @@ enum EUGCReadAction {
|
||||
k_EUGCRead_Close = 2,
|
||||
};
|
||||
|
||||
enum ERemoteStorageLocalFileChange {
|
||||
enum ERemoteStorageLocalFileChange
|
||||
{
|
||||
k_ERemoteStorageLocalFileChange_Invalid = 0,
|
||||
|
||||
// The file was updated from another device
|
||||
@ -152,7 +168,8 @@ enum ERemoteStorageLocalFileChange {
|
||||
k_ERemoteStorageLocalFileChange_FileDeleted = 2,
|
||||
};
|
||||
|
||||
enum ERemoteStorageFilePathType {
|
||||
enum ERemoteStorageFilePathType
|
||||
{
|
||||
k_ERemoteStorageFilePathType_Invalid = 0,
|
||||
|
||||
// The file is directly accessed by the game and this is the full path
|
||||
@ -162,11 +179,13 @@ enum ERemoteStorageFilePathType {
|
||||
k_ERemoteStorageFilePathType_APIFilename = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing, reading and writing files stored remotely
|
||||
// and cached locally
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamRemoteStorage {
|
||||
class ISteamRemoteStorage
|
||||
{
|
||||
public:
|
||||
// NOTE
|
||||
//
|
||||
@ -317,22 +336,29 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamRemoteStorage*, SteamRemoteStorage, S
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to FileShare()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageFileShareResult_t {
|
||||
struct RemoteStorageFileShareResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 7 };
|
||||
EResult m_eResult; // The result of the operation
|
||||
UGCHandle_t m_hFile; // The handle that can be shared with users and features
|
||||
char m_rgchFilename[k_cchFilenameMax]; // The name of the file that was shared
|
||||
};
|
||||
|
||||
|
||||
// k_iSteamRemoteStorageCallbacks + 8 is deprecated! Do not reuse
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to PublishFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishFileResult_t {
|
||||
struct RemoteStoragePublishFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 9 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -341,19 +367,24 @@ struct RemoteStoragePublishFileResult_t {
|
||||
|
||||
// k_iSteamRemoteStorageCallbacks + 10 is deprecated! Do not reuse
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to DeletePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageDeletePublishedFileResult_t {
|
||||
struct RemoteStorageDeletePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 11 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to EnumerateUserPublishedFiles()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageEnumerateUserPublishedFilesResult_t {
|
||||
struct RemoteStorageEnumerateUserPublishedFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 12 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
@ -361,19 +392,23 @@ struct RemoteStorageEnumerateUserPublishedFilesResult_t {
|
||||
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to SubscribePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageSubscribePublishedFileResult_t {
|
||||
struct RemoteStorageSubscribePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 13 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to EnumerateSubscribePublishedFiles()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageEnumerateUserSubscribedFilesResult_t {
|
||||
struct RemoteStorageEnumerateUserSubscribedFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 14 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
@ -393,26 +428,31 @@ VALVE_COMPILE_TIME_ASSERT(sizeof(RemoteStorageEnumerateUserSubscribedFilesResult
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UnsubscribePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUnsubscribePublishedFileResult_t {
|
||||
struct RemoteStorageUnsubscribePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 15 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to CommitPublishedFileUpdate()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUpdatePublishedFileResult_t {
|
||||
struct RemoteStorageUpdatePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 16 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UGCDownload()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageDownloadUGCResult_t {
|
||||
struct RemoteStorageDownloadUGCResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 17 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded.
|
||||
@ -422,10 +462,12 @@ struct RemoteStorageDownloadUGCResult_t {
|
||||
uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetPublishedFileDetails()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageGetPublishedFileDetailsResult_t {
|
||||
struct RemoteStorageGetPublishedFileDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 18 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -450,7 +492,9 @@ struct RemoteStorageGetPublishedFileDetailsResult_t {
|
||||
bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
|
||||
};
|
||||
|
||||
struct RemoteStorageEnumerateWorkshopFilesResult_t {
|
||||
|
||||
struct RemoteStorageEnumerateWorkshopFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 19 };
|
||||
EResult m_eResult;
|
||||
int32 m_nResultsReturned;
|
||||
@ -461,10 +505,12 @@ struct RemoteStorageEnumerateWorkshopFilesResult_t {
|
||||
uint32 m_unStartIndex;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of GetPublishedItemVoteDetails
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageGetPublishedItemVoteDetailsResult_t {
|
||||
struct RemoteStorageGetPublishedItemVoteDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 20 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_unPublishedFileId;
|
||||
@ -474,10 +520,12 @@ struct RemoteStorageGetPublishedItemVoteDetailsResult_t {
|
||||
float m_fScore;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: User subscribed to a file for the app (from within the app or on the web)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileSubscribed_t {
|
||||
struct RemoteStoragePublishedFileSubscribed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 21 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
@ -486,41 +534,49 @@ struct RemoteStoragePublishedFileSubscribed_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: User unsubscribed from a file for the app (from within the app or on the web)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileUnsubscribed_t {
|
||||
struct RemoteStoragePublishedFileUnsubscribed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 22 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Published file that a user owns was deleted (from within the app or the web)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileDeleted_t {
|
||||
struct RemoteStoragePublishedFileDeleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 23 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UpdateUserPublishedItemVote()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUpdateUserPublishedItemVoteResult_t {
|
||||
struct RemoteStorageUpdateUserPublishedItemVoteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 24 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetUserPublishedItemVoteDetails()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUserVoteDetails_t {
|
||||
struct RemoteStorageUserVoteDetails_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 25 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
EWorkshopVote m_eVote; // what the user voted
|
||||
};
|
||||
|
||||
struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t {
|
||||
struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 26 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
@ -528,14 +584,16 @@ struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t {
|
||||
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
struct RemoteStorageSetUserPublishedFileActionResult_t {
|
||||
struct RemoteStorageSetUserPublishedFileActionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 27 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
EWorkshopFileAction m_eAction; // the action that was attempted
|
||||
};
|
||||
|
||||
struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t {
|
||||
struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 28 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
EWorkshopFileAction m_eAction; // the action that was filtered on
|
||||
@ -545,19 +603,23 @@ struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t {
|
||||
uint32 m_rgRTimeUpdated[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called periodically while a PublishWorkshopFile is in progress
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishFileProgress_t {
|
||||
struct RemoteStoragePublishFileProgress_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 29 };
|
||||
double m_dPercentFile;
|
||||
bool m_bPreview;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when the content for a published file is updated
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileUpdated_t {
|
||||
struct RemoteStoragePublishedFileUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 30 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
@ -567,7 +629,8 @@ struct RemoteStoragePublishedFileUpdated_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when a FileWriteAsync completes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageFileWriteAsyncComplete_t {
|
||||
struct RemoteStorageFileWriteAsyncComplete_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 31 };
|
||||
EResult m_eResult; // result
|
||||
};
|
||||
@ -575,7 +638,8 @@ struct RemoteStorageFileWriteAsyncComplete_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when a FileReadAsync completes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageFileReadAsyncComplete_t {
|
||||
struct RemoteStorageFileReadAsyncComplete_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 32 };
|
||||
SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made
|
||||
EResult m_eResult; // result
|
||||
@ -593,4 +657,5 @@ STEAM_CALLBACK_END(0)
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMREMOTESTORAGE_H
|
||||
|
@ -25,7 +25,8 @@ const int k_ScreenshotThumbWidth = 200;
|
||||
typedef uint32 ScreenshotHandle;
|
||||
#define INVALID_SCREENSHOT_HANDLE 0
|
||||
|
||||
enum EVRScreenshotType {
|
||||
enum EVRScreenshotType
|
||||
{
|
||||
k_EVRScreenshotType_None = 0,
|
||||
k_EVRScreenshotType_Mono = 1,
|
||||
k_EVRScreenshotType_Stereo = 2,
|
||||
@ -37,7 +38,8 @@ enum EVRScreenshotType {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for adding screenshots to the user's screenshot library
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamScreenshots {
|
||||
class ISteamScreenshots
|
||||
{
|
||||
public:
|
||||
// Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.
|
||||
// The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
||||
@ -95,7 +97,8 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamScreenshots*, SteamScreenshots, STEAM
|
||||
// Purpose: Screenshot successfully written or otherwise added to the library
|
||||
// and can now be tagged
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ScreenshotReady_t {
|
||||
struct ScreenshotReady_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamScreenshotsCallbacks + 1 };
|
||||
ScreenshotHandle m_hLocal;
|
||||
EResult m_eResult;
|
||||
@ -106,10 +109,12 @@ struct ScreenshotReady_t {
|
||||
// HookScreenshots() has been called, in which case Steam will not take
|
||||
// the screenshot itself.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ScreenshotRequested_t {
|
||||
struct ScreenshotRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamScreenshotsCallbacks + 2 };
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMSCREENSHOTS_H
|
||||
|
||||
|
118
ScreenPlayWorkshop/SteamSDK/public/steam/isteamtimeline.h
Normal file
118
ScreenPlayWorkshop/SteamSDK/public/steam/isteamtimeline.h
Normal file
@ -0,0 +1,118 @@
|
||||
//====== Copyright © Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to Steam Timeline
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMTIMELINE_H
|
||||
#define ISTEAMTIMELINE_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// callbacks
|
||||
#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
|
||||
|
||||
// Controls the color of the timeline bar segments. The value names listed here map to a multiplayer game, where
|
||||
// the user starts a game (in menus), then joins a multiplayer session that first has a character selection lobby
|
||||
// then finally the multiplayer session starts. However, you can also map these values to any type of game. In a single
|
||||
// player game where you visit towns & dungeons, you could set k_ETimelineGameMode_Menus when the player is in a town
|
||||
// buying items, k_ETimelineGameMode_Staging for when a dungeon is loading and k_ETimelineGameMode_Playing for when
|
||||
// inside the dungeon fighting monsters.
|
||||
enum ETimelineGameMode
|
||||
{
|
||||
k_ETimelineGameMode_Invalid = 0,
|
||||
k_ETimelineGameMode_Playing = 1,
|
||||
k_ETimelineGameMode_Staging = 2,
|
||||
k_ETimelineGameMode_Menus = 3,
|
||||
k_ETimelineGameMode_LoadingScreen = 4,
|
||||
|
||||
k_ETimelineGameMode_Max, // one past the last valid value
|
||||
};
|
||||
|
||||
// Used in AddTimelineEvent, where Featured events will be offered before Standard events
|
||||
enum ETimelineEventClipPriority
|
||||
{
|
||||
k_ETimelineEventClipPriority_Invalid = 0,
|
||||
k_ETimelineEventClipPriority_None = 1,
|
||||
k_ETimelineEventClipPriority_Standard = 2,
|
||||
k_ETimelineEventClipPriority_Featured = 3,
|
||||
};
|
||||
|
||||
const uint32 k_unMaxTimelinePriority = 1000;
|
||||
const float k_flMaxTimelineEventDuration = 600.f;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Timeline API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamTimeline
|
||||
{
|
||||
public:
|
||||
|
||||
// Sets a description for the current game state in the timeline. These help the user to find specific
|
||||
// moments in the timeline when saving clips. Setting a new state description replaces any previous
|
||||
// description.
|
||||
//
|
||||
// Examples could include:
|
||||
// * Where the user is in the world in a single player game
|
||||
// * Which round is happening in a multiplayer game
|
||||
// * The current score for a sports game
|
||||
//
|
||||
// Parameters:
|
||||
// - pchDescription: provide a localized string in the language returned by SteamUtils()->GetSteamUILanguage()
|
||||
// - flTimeDelta: The time offset in seconds to apply to this event. Negative times indicate an
|
||||
// event that happened in the past.
|
||||
virtual void SetTimelineStateDescription( const char *pchDescription, float flTimeDelta ) = 0;
|
||||
virtual void ClearTimelineStateDescription( float flTimeDelta ) = 0;
|
||||
|
||||
// Use this to mark an event on the Timeline. The event can be instantaneous or take some amount of time
|
||||
// to complete, depending on the value passed in flDurationSeconds
|
||||
//
|
||||
// Examples could include:
|
||||
// * a boss battle
|
||||
// * a cut scene
|
||||
// * a large team fight
|
||||
// * picking up a new weapon or ammunition
|
||||
// * scoring a goal
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// - pchIcon: specify the name of the icon uploaded through the Steamworks Partner Site for your title
|
||||
// or one of the provided icons that start with steam_
|
||||
// - pchTitle & pchDescription: provide a localized string in the language returned by
|
||||
// SteamUtils()->GetSteamUILanguage()
|
||||
// - unPriority: specify how important this range is compared to other markers provided by the game.
|
||||
// Ranges with larger priority values will be displayed more prominently in the UI. This value
|
||||
// may be between 0 and k_unMaxTimelinePriority.
|
||||
// - flStartOffsetSeconds: The time that this range started relative to now. Negative times
|
||||
// indicate an event that happened in the past.
|
||||
// - flDurationSeconds: How long the time range should be in seconds. For instantaneous events, this
|
||||
// should be 0
|
||||
// - ePossibleClip: By setting this parameter to Featured or Standard, the game indicates to Steam that it
|
||||
// would be appropriate to offer this range as a clip to the user. For instantaneous events, the
|
||||
// suggested clip will be for a short time before and after the event itself.
|
||||
virtual void AddTimelineEvent( const char *pchIcon, const char *pchTitle, const char *pchDescription, uint32 unPriority, float flStartOffsetSeconds, float flDurationSeconds, ETimelineEventClipPriority ePossibleClip ) = 0;
|
||||
|
||||
// Changes the color of the timeline bar. See ETimelineGameMode comments for how to use each value
|
||||
virtual void SetTimelineGameMode( ETimelineGameMode eMode ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMTIMELINE_INTERFACE_VERSION "STEAMTIMELINE_INTERFACE_V001"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamTimeline *SteamTimeline();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamTimeline *, SteamTimeline, STEAMTIMELINE_INTERFACE_VERSION );
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMTIMELINE_H
|
@ -10,8 +10,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamremotestorage.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteamremotestorage.h"
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
@ -22,14 +22,18 @@
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
typedef uint64 UGCQueryHandle_t;
|
||||
typedef uint64 UGCUpdateHandle_t;
|
||||
|
||||
|
||||
const UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffffull;
|
||||
const UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffffull;
|
||||
|
||||
|
||||
// Matching UGC types for queries
|
||||
enum EUGCMatchingUGCType {
|
||||
enum EUGCMatchingUGCType
|
||||
{
|
||||
k_EUGCMatchingUGCType_Items = 0, // both mtx items and ready-to-use items
|
||||
k_EUGCMatchingUGCType_Items_Mtx = 1,
|
||||
k_EUGCMatchingUGCType_Items_ReadyToUse = 2,
|
||||
@ -48,7 +52,8 @@ enum EUGCMatchingUGCType {
|
||||
|
||||
// Different lists of published UGC for a user.
|
||||
// If the current logged in user is different than the specified user, then some options may not be allowed.
|
||||
enum EUserUGCList {
|
||||
enum EUserUGCList
|
||||
{
|
||||
k_EUserUGCList_Published,
|
||||
k_EUserUGCList_VotedOn,
|
||||
k_EUserUGCList_VotedUp,
|
||||
@ -61,7 +66,8 @@ enum EUserUGCList {
|
||||
};
|
||||
|
||||
// Sort order for user published UGC lists (defaults to creation order descending)
|
||||
enum EUserUGCListSortOrder {
|
||||
enum EUserUGCListSortOrder
|
||||
{
|
||||
k_EUserUGCListSortOrder_CreationOrderDesc,
|
||||
k_EUserUGCListSortOrder_CreationOrderAsc,
|
||||
k_EUserUGCListSortOrder_TitleAsc,
|
||||
@ -72,7 +78,8 @@ enum EUserUGCListSortOrder {
|
||||
};
|
||||
|
||||
// Combination of sorting and filtering for queries across all UGC
|
||||
enum EUGCQuery {
|
||||
enum EUGCQuery
|
||||
{
|
||||
k_EUGCQuery_RankedByVote = 0,
|
||||
k_EUGCQuery_RankedByPublicationDate = 1,
|
||||
k_EUGCQuery_AcceptedForGameRankedByAcceptanceDate = 2,
|
||||
@ -95,7 +102,8 @@ enum EUGCQuery {
|
||||
k_EUGCQuery_RankedByLastUpdatedDate = 19,
|
||||
};
|
||||
|
||||
enum EItemUpdateStatus {
|
||||
enum EItemUpdateStatus
|
||||
{
|
||||
k_EItemUpdateStatusInvalid = 0, // The item update handle was invalid, job might be finished, listen too SubmitItemUpdateResult_t
|
||||
k_EItemUpdateStatusPreparingConfig = 1, // The item update is processing configuration data
|
||||
k_EItemUpdateStatusPreparingContent = 2, // The item update is reading and processing content files
|
||||
@ -104,7 +112,8 @@ enum EItemUpdateStatus {
|
||||
k_EItemUpdateStatusCommittingChanges = 5 // The item update is committing all changes
|
||||
};
|
||||
|
||||
enum EItemState {
|
||||
enum EItemState
|
||||
{
|
||||
k_EItemStateNone = 0, // item not tracked on client
|
||||
k_EItemStateSubscribed = 1, // current user is subscribed to this item. Not just cached.
|
||||
k_EItemStateLegacyItem = 2, // item was created with ISteamRemoteStorage
|
||||
@ -112,9 +121,11 @@ enum EItemState {
|
||||
k_EItemStateNeedsUpdate = 8, // items needs an update. Either because it's not installed yet or creator updated content
|
||||
k_EItemStateDownloading = 16, // item update is currently downloading
|
||||
k_EItemStateDownloadPending = 32, // DownloadItem() was called for this item, content isn't available until DownloadItemResult_t is fired
|
||||
k_EItemStateDisabledLocally = 64, // Item is disabled locally, so it shouldn't be considered subscribed
|
||||
};
|
||||
|
||||
enum EItemStatistic {
|
||||
enum EItemStatistic
|
||||
{
|
||||
k_EItemStatistic_NumSubscriptions = 0,
|
||||
k_EItemStatistic_NumFavorites = 1,
|
||||
k_EItemStatistic_NumFollowers = 2,
|
||||
@ -130,7 +141,8 @@ enum EItemStatistic {
|
||||
k_EItemStatistic_NumPlaytimeSessionsDuringTimePeriod = 12,
|
||||
};
|
||||
|
||||
enum EItemPreviewType {
|
||||
enum EItemPreviewType
|
||||
{
|
||||
k_EItemPreviewType_Image = 0, // standard image file expected (e.g. jpg, png, gif, etc.)
|
||||
k_EItemPreviewType_YouTubeVideo = 1, // video id is stored
|
||||
k_EItemPreviewType_Sketchfab = 2, // model id is stored
|
||||
@ -143,10 +155,12 @@ enum EItemPreviewType {
|
||||
// | |Dn | |
|
||||
// +---+---+---+---+
|
||||
k_EItemPreviewType_EnvironmentMap_LatLong = 4, // standard image file expected
|
||||
k_EItemPreviewType_Clip = 5, // clip id is stored
|
||||
k_EItemPreviewType_ReservedMax = 255, // you can specify your own types above this value
|
||||
};
|
||||
|
||||
enum EUGCContentDescriptorID {
|
||||
enum EUGCContentDescriptorID
|
||||
{
|
||||
k_EUGCContentDescriptor_NudityOrSexualContent = 1,
|
||||
k_EUGCContentDescriptor_FrequentViolenceOrGore = 2,
|
||||
k_EUGCContentDescriptor_AdultOnlySexualContent = 3,
|
||||
@ -158,7 +172,8 @@ const uint32 kNumUGCResultsPerPage = 50;
|
||||
const uint32 k_cchDeveloperMetadataMax = 5000;
|
||||
|
||||
// Details for a single published file/UGC
|
||||
struct SteamUGCDetails_t {
|
||||
struct SteamUGCDetails_t
|
||||
{
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult; // The result of the operation.
|
||||
EWorkshopFileType m_eFileType; // Type of the file
|
||||
@ -179,7 +194,7 @@ struct SteamUGCDetails_t {
|
||||
UGCHandle_t m_hFile; // The handle of the primary file
|
||||
UGCHandle_t m_hPreviewFile; // The handle of the preview file
|
||||
char m_pchFileName[k_cchFilenameMax]; // The cloud filename of the primary file
|
||||
int32 m_nFileSize; // Size of the primary file
|
||||
int32 m_nFileSize; // Size of the primary file (for legacy items which only support one file). This may not be accurate for non-legacy items which can be greater than 4gb in size.
|
||||
int32 m_nPreviewFileSize; // Size of the preview file
|
||||
char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website)
|
||||
// voting information
|
||||
@ -188,13 +203,16 @@ struct SteamUGCDetails_t {
|
||||
float m_flScore; // calculated score
|
||||
// collection details
|
||||
uint32 m_unNumChildren;
|
||||
uint64 m_ulTotalFilesSize; // Total size of all files (non-legacy), excluding the preview file
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam UGC support API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUGC {
|
||||
class ISteamUGC
|
||||
{
|
||||
public:
|
||||
|
||||
// Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
|
||||
virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
|
||||
|
||||
@ -231,6 +249,10 @@ public:
|
||||
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;
|
||||
|
||||
// Some items can specify that they have a version that is valid for a range of game versions (Steam branch)
|
||||
virtual uint32 GetNumSupportedGameVersions( UGCQueryHandle_t handle, uint32 index ) = 0;
|
||||
virtual bool GetSupportedGameVersionData( UGCQueryHandle_t handle, uint32 index, uint32 versionIndex, STEAM_OUT_STRING_COUNT( cchGameBranchSize ) char *pchGameBranchMin, STEAM_OUT_STRING_COUNT( cchGameBranchSize ) char *pchGameBranchMax, uint32 cchGameBranchSize ) = 0;
|
||||
|
||||
virtual uint32 GetQueryUGCContentDescriptors( UGCQueryHandle_t handle, uint32 index, EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries ) = 0;
|
||||
|
||||
// Release the request to free up memory, after retrieving results
|
||||
@ -250,6 +272,7 @@ public:
|
||||
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;
|
||||
virtual bool SetAdminQuery( UGCUpdateHandle_t handle, bool bAdminQuery ) = 0; // admin queries return hidden items
|
||||
|
||||
// Options only for querying user UGC
|
||||
virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0;
|
||||
@ -277,7 +300,7 @@ public:
|
||||
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 SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags, bool bAllowAdminTags = false ) = 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.
|
||||
@ -291,6 +314,7 @@ public:
|
||||
virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted)
|
||||
virtual bool AddContentDescriptor( UGCUpdateHandle_t handle, EUGCContentDescriptorID descid ) = 0;
|
||||
virtual bool RemoveContentDescriptor( UGCUpdateHandle_t handle, EUGCContentDescriptorID descid ) = 0;
|
||||
virtual bool SetRequiredGameVersions( UGCUpdateHandle_t handle, const char *pszGameBranchMin, const char *pszGameBranchMax ) = 0; // an empty string for either parameter means that it will match any version on that end of the range. This will only be applied if the actual content has been changed.
|
||||
|
||||
STEAM_CALL_RESULT( SubmitItemUpdateResult_t )
|
||||
virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate()
|
||||
@ -367,9 +391,12 @@ public:
|
||||
// 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;
|
||||
|
||||
// Return the user's community content descriptor preferences
|
||||
virtual uint32 GetUserContentDescriptorPreferences( EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION017"
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION020"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamUGC *SteamUGC();
|
||||
@ -382,7 +409,8 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamUGC*, SteamGameServerUGC, STEAM
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for querying UGC
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamUGCQueryCompleted_t {
|
||||
struct SteamUGCQueryCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 1 };
|
||||
UGCQueryHandle_t m_handle;
|
||||
EResult m_eResult;
|
||||
@ -392,48 +420,60 @@ struct SteamUGCQueryCompleted_t {
|
||||
char m_rgchNextCursor[k_cchPublishedFileURLMax]; // If a paging cursor was used, then this will be the next cursor to get the next result set.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for requesting details on one piece of UGC
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamUGCRequestUGCDetailsResult_t {
|
||||
struct SteamUGCRequestUGCDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 2 };
|
||||
SteamUGCDetails_t m_details;
|
||||
bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result for ISteamUGC::CreateItem()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct CreateItemResult_t {
|
||||
struct CreateItemResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 3 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result for ISteamUGC::SubmitItemUpdate()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SubmitItemUpdateResult_t {
|
||||
struct SubmitItemUpdateResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 4 };
|
||||
EResult m_eResult;
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a Workshop item has been installed or updated
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ItemInstalled_t {
|
||||
struct ItemInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 5 };
|
||||
AppId_t m_unAppID;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
UGCHandle_t m_hLegacyContent;
|
||||
uint64 m_unManifestID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of DownloadItem(), existing item files can be accessed again
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DownloadItemResult_t {
|
||||
struct DownloadItemResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 6 };
|
||||
AppId_t m_unAppID;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -443,7 +483,8 @@ struct DownloadItemResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserFavoriteItemsListChanged_t {
|
||||
struct UserFavoriteItemsListChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 7 };
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult;
|
||||
@ -453,7 +494,8 @@ struct UserFavoriteItemsListChanged_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to SetUserItemVote()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SetUserItemVoteResult_t {
|
||||
struct SetUserItemVoteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 8 };
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult;
|
||||
@ -463,7 +505,8 @@ struct SetUserItemVoteResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetUserItemVote()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetUserItemVoteResult_t {
|
||||
struct GetUserItemVoteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 9 };
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult;
|
||||
@ -475,7 +518,8 @@ struct GetUserItemVoteResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to StartPlaytimeTracking()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StartPlaytimeTrackingResult_t {
|
||||
struct StartPlaytimeTrackingResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 10 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
@ -483,7 +527,8 @@ struct StartPlaytimeTrackingResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to StopPlaytimeTracking()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StopPlaytimeTrackingResult_t {
|
||||
struct StopPlaytimeTrackingResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 11 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
@ -491,7 +536,8 @@ struct StopPlaytimeTrackingResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to AddDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AddUGCDependencyResult_t {
|
||||
struct AddUGCDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 12 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -501,17 +547,20 @@ struct AddUGCDependencyResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to RemoveDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoveUGCDependencyResult_t {
|
||||
struct RemoveUGCDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 13 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
PublishedFileId_t m_nChildPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to AddAppDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AddAppDependencyResult_t {
|
||||
struct AddAppDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 14 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -521,7 +570,8 @@ struct AddAppDependencyResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to RemoveAppDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoveAppDependencyResult_t {
|
||||
struct RemoveAppDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 15 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -532,7 +582,8 @@ struct RemoveAppDependencyResult_t {
|
||||
// Purpose: The result of a call to GetAppDependencies. Callback may be called
|
||||
// multiple times until all app dependencies have been returned.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetAppDependenciesResult_t {
|
||||
struct GetAppDependenciesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 16 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -544,24 +595,29 @@ struct GetAppDependenciesResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to DeleteItem
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DeleteItemResult_t {
|
||||
struct DeleteItemResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 17 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: signal that the list of subscribed items changed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserSubscribedItemsListChanged_t {
|
||||
struct UserSubscribedItemsListChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 18 };
|
||||
AppId_t m_nAppID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA
|
||||
//-----------------------------------------------------------------------------
|
||||
struct WorkshopEULAStatus_t {
|
||||
struct WorkshopEULAStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUGCCallbacks + 20 };
|
||||
EResult m_eResult;
|
||||
AppId_t m_nAppID;
|
||||
|
@ -16,7 +16,8 @@
|
||||
// Purpose: Functions for accessing and manipulating a steam account
|
||||
// associated with one client instance
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUser {
|
||||
class ISteamUser
|
||||
{
|
||||
public:
|
||||
// returns the HSteamUser this interface represents
|
||||
// this is only used internally by the API, and by a few select interfaces that support multi-user
|
||||
@ -126,8 +127,14 @@ public:
|
||||
// SteamNetworkingIdentity is an optional input parameter to hold the public IP address or SteamID of the entity you are connecting to
|
||||
// if an IP address is passed Steam will only allow the ticket to be used by an entity with that IP address
|
||||
// if a Steam ID is passed Steam will only allow the ticket to be used by that Steam ID
|
||||
// not to be used for "ISteamUserAuth\AuthenticateUserTicket" - it will fail
|
||||
virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket, const SteamNetworkingIdentity *pSteamNetworkingIdentity ) = 0;
|
||||
|
||||
// Request a ticket which will be used for webapi "ISteamUserAuth\AuthenticateUserTicket"
|
||||
// pchIdentity is an optional input parameter to identify the service the ticket will be sent to
|
||||
// the ticket will be returned in callback GetTicketForWebApiResponse_t
|
||||
virtual HAuthTicket GetAuthTicketForWebApi( const char *pchIdentity ) = 0;
|
||||
|
||||
// Authenticate ticket from entity steamID to be sure it is valid and isnt reused
|
||||
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )
|
||||
virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0;
|
||||
@ -209,9 +216,10 @@ public:
|
||||
// This will prevent offline gameplay time from counting against a user's
|
||||
// playtime limits.
|
||||
virtual bool BSetDurationControlOnlineState( EDurationControlOnlineState eNewState ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser022"
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser023"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamUser *SteamUser();
|
||||
@ -226,6 +234,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamUser*, SteamUser, STEAMUSER_INTERFACE
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when an authenticated connection to the Steam back-end has been established.
|
||||
// This means the Steam client now has a working connection to the Steam servers.
|
||||
@ -233,7 +242,8 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamUser*, SteamUser, STEAMUSER_INTERFACE
|
||||
// only be seen if the user has dropped connection due to a networking issue
|
||||
// or a Steam server update.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamServersConnected_t {
|
||||
struct SteamServersConnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 1 };
|
||||
};
|
||||
|
||||
@ -242,28 +252,33 @@ struct SteamServersConnected_t {
|
||||
// this will occur periodically if the Steam client is not connected,
|
||||
// and has failed in it's retry to establish a connection
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamServerConnectFailure_t {
|
||||
struct SteamServerConnectFailure_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 2 };
|
||||
EResult m_eResult;
|
||||
bool m_bStillRetrying;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called if the client has lost connection to the Steam servers
|
||||
// real-time services will be disabled until a matching SteamServersConnected_t has been posted
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamServersDisconnected_t {
|
||||
struct SteamServersDisconnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 3 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server,
|
||||
// which it may be in the process of or already connected to.
|
||||
// The game client should immediately disconnect upon receiving this message.
|
||||
// This can usually occur if the user doesn't have rights to play on the game server.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ClientGameServerDeny_t {
|
||||
struct ClientGameServerDeny_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 13 };
|
||||
|
||||
uint32 m_uAppID;
|
||||
@ -273,41 +288,50 @@ struct ClientGameServerDeny_t {
|
||||
uint32 m_uReason;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks)
|
||||
// When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect.
|
||||
// This usually occurs in the rare event the Steam client has some kind of fatal error.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct IPCFailure_t {
|
||||
struct IPCFailure_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 17 };
|
||||
enum EFailureType {
|
||||
enum EFailureType
|
||||
{
|
||||
k_EFailureFlushedCallbackQueue,
|
||||
k_EFailurePipeFail,
|
||||
};
|
||||
uint8 m_eFailureType;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Signaled whenever licenses change
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LicensesUpdated_t {
|
||||
struct LicensesUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 25 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for BeginAuthSession
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ValidateAuthTicketResponse_t {
|
||||
struct ValidateAuthTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 43 };
|
||||
CSteamID m_SteamID;
|
||||
EAuthSessionResponse m_eAuthSessionResponse;
|
||||
CSteamID m_OwnerSteamID; // different from m_SteamID if borrowed
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a user has responded to a microtransaction authorization request
|
||||
//-----------------------------------------------------------------------------
|
||||
struct MicroTxnAuthorizationResponse_t {
|
||||
struct MicroTxnAuthorizationResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 52 };
|
||||
|
||||
uint32 m_unAppID; // AppID for this microtransaction
|
||||
@ -315,10 +339,12 @@ struct MicroTxnAuthorizationResponse_t {
|
||||
uint8 m_bAuthorized; // if user authorized transaction
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result from RequestEncryptedAppTicket
|
||||
//-----------------------------------------------------------------------------
|
||||
struct EncryptedAppTicketResponse_t {
|
||||
struct EncryptedAppTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 54 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -327,7 +353,8 @@ struct EncryptedAppTicketResponse_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for GetAuthSessionTicket
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetAuthSessionTicketResponse_t {
|
||||
struct GetAuthSessionTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 63 };
|
||||
HAuthTicket m_hAuthTicket;
|
||||
EResult m_eResult;
|
||||
@ -336,7 +363,8 @@ struct GetAuthSessionTicketResponse_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent to your game in response to a steam://gamewebcallback/ command
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameWebCallback_t {
|
||||
struct GameWebCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 64 };
|
||||
char m_szURL[256];
|
||||
};
|
||||
@ -344,15 +372,18 @@ struct GameWebCallback_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent to your game in response to ISteamUser::RequestStoreAuthURL
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StoreAuthURLResponse_t {
|
||||
struct StoreAuthURLResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 65 };
|
||||
char m_szURL[512];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent in response to ISteamUser::GetMarketEligibility
|
||||
//-----------------------------------------------------------------------------
|
||||
struct MarketEligibilityResponse_t {
|
||||
struct MarketEligibilityResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 66 };
|
||||
bool m_bAllowed;
|
||||
EMarketNotAllowedReasonFlags m_eNotAllowedReason;
|
||||
@ -362,6 +393,7 @@ struct MarketEligibilityResponse_t {
|
||||
int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent for games with enabled anti indulgence / duration control, for
|
||||
// enabled users. Lets the game know whether the user can keep playing or
|
||||
@ -370,7 +402,8 @@ struct MarketEligibilityResponse_t {
|
||||
// This callback is fired asynchronously in response to timers triggering.
|
||||
// It is also fired in response to calls to GetDurationControl().
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DurationControl_t {
|
||||
struct DurationControl_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 67 };
|
||||
|
||||
EResult m_eResult; // result of call (always k_EResultOK for asynchronous timer-based notifications)
|
||||
@ -386,6 +419,21 @@ struct DurationControl_t {
|
||||
int32 m_csecsRemaining; // playtime remaining until the user hits a regulatory limit
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for GetTicketForWebApi
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetTicketForWebApiResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 68 };
|
||||
HAuthTicket m_hAuthTicket;
|
||||
EResult m_eResult;
|
||||
int m_cubTicket;
|
||||
static const int k_nCubTicketMaxLength = 2560;
|
||||
uint8 m_rgubTicket[k_nCubTicketMaxLength];
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMUSER_H
|
||||
|
@ -10,8 +10,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamremotestorage.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteamremotestorage.h"
|
||||
|
||||
// size limit on stat or achievement name (UTF-8 encoded)
|
||||
enum { k_cchStatNameMax = 128 };
|
||||
@ -29,7 +29,8 @@ typedef uint64 SteamLeaderboard_t;
|
||||
typedef uint64 SteamLeaderboardEntries_t;
|
||||
|
||||
// type of data request, when downloading leaderboard entries
|
||||
enum ELeaderboardDataRequest {
|
||||
enum ELeaderboardDataRequest
|
||||
{
|
||||
k_ELeaderboardDataRequestGlobal = 0,
|
||||
k_ELeaderboardDataRequestGlobalAroundUser = 1,
|
||||
k_ELeaderboardDataRequestFriends = 2,
|
||||
@ -37,21 +38,24 @@ enum ELeaderboardDataRequest {
|
||||
};
|
||||
|
||||
// the sort order of a leaderboard
|
||||
enum ELeaderboardSortMethod {
|
||||
enum ELeaderboardSortMethod
|
||||
{
|
||||
k_ELeaderboardSortMethodNone = 0,
|
||||
k_ELeaderboardSortMethodAscending = 1, // top-score is lowest number
|
||||
k_ELeaderboardSortMethodDescending = 2, // top-score is highest number
|
||||
};
|
||||
|
||||
// the display type (used by the Steam Community web site) for a leaderboard
|
||||
enum ELeaderboardDisplayType {
|
||||
enum ELeaderboardDisplayType
|
||||
{
|
||||
k_ELeaderboardDisplayTypeNone = 0,
|
||||
k_ELeaderboardDisplayTypeNumeric = 1, // simple numerical score
|
||||
k_ELeaderboardDisplayTypeTimeSeconds = 2, // the score represents a time, in seconds
|
||||
k_ELeaderboardDisplayTypeTimeMilliSeconds = 3, // the score represents a time, in milliseconds
|
||||
};
|
||||
|
||||
enum ELeaderboardUploadScoreMethod {
|
||||
enum ELeaderboardUploadScoreMethod
|
||||
{
|
||||
k_ELeaderboardUploadScoreMethodNone = 0,
|
||||
k_ELeaderboardUploadScoreMethodKeepBest = 1, // Leaderboard will keep user's best score
|
||||
k_ELeaderboardUploadScoreMethodForceUpdate = 2, // Leaderboard will always replace score with specified
|
||||
@ -66,7 +70,8 @@ enum ELeaderboardUploadScoreMethod {
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
struct LeaderboardEntry_t {
|
||||
struct LeaderboardEntry_t
|
||||
{
|
||||
CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info
|
||||
int32 m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard
|
||||
int32 m_nScore; // score as set in the leaderboard
|
||||
@ -76,10 +81,12 @@ struct LeaderboardEntry_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing stats, achievements, and leaderboard information
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUserStats {
|
||||
class ISteamUserStats
|
||||
{
|
||||
public:
|
||||
// Ask the server to send down this user's data and achievements for this game
|
||||
STEAM_CALL_BACK( UserStatsReceived_t )
|
||||
@ -205,8 +212,7 @@ public:
|
||||
// a max of 100 users can be downloaded at a time, with only one outstanding call at a time
|
||||
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;
|
||||
STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0;
|
||||
|
||||
// Returns data about a single leaderboard entry
|
||||
// use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries
|
||||
@ -294,6 +300,7 @@ public:
|
||||
|
||||
STEAM_FLAT_NAME( GetAchievementProgressLimitsFloat )
|
||||
virtual bool GetAchievementProgressLimits( const char *pchName, float *pfMinProgress, float *pfMaxProgress ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION012"
|
||||
@ -315,28 +322,33 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamUserStats*, SteamUserStats, STEAMUSER
|
||||
// Purpose: called when the latests stats and achievements have been received
|
||||
// from the server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserStatsReceived_t {
|
||||
struct UserStatsReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 1 };
|
||||
uint64 m_nGameID; // Game these stats are for
|
||||
EResult m_eResult; // Success / error fetching the stats
|
||||
CSteamID m_steamIDUser; // The user for whom the stats are retrieved for
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of a request to store the user stats for a game
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserStatsStored_t {
|
||||
struct UserStatsStored_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 2 };
|
||||
uint64 m_nGameID; // Game these stats are for
|
||||
EResult m_eResult; // success / error
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of a request to store the achievements for a game, or an
|
||||
// "indicate progress" call. If both m_nCurProgress and m_nMaxProgress
|
||||
// are zero, that means the achievement has been fully unlocked.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserAchievementStored_t {
|
||||
struct UserAchievementStored_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 3 };
|
||||
|
||||
uint64 m_nGameID; // Game this is for
|
||||
@ -346,32 +358,38 @@ struct UserAchievementStored_t {
|
||||
uint32 m_nMaxProgress; // "out of" this many
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result for finding a leaderboard, returned as a result of FindOrCreateLeaderboard() or FindLeaderboard()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardFindResult_t {
|
||||
struct LeaderboardFindResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 4 };
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // handle to the leaderboard serarched for, 0 if no leaderboard found
|
||||
uint8 m_bLeaderboardFound; // 0 if no leaderboard found
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating scores for a leaderboard have been downloaded and are ready to be retrieved, returned as a result of DownloadLeaderboardEntries()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardScoresDownloaded_t {
|
||||
struct LeaderboardScoresDownloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 5 };
|
||||
SteamLeaderboard_t m_hSteamLeaderboard;
|
||||
SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; // the handle to pass into GetDownloadedLeaderboardEntries()
|
||||
int m_cEntryCount; // the number of entries downloaded
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating scores has been uploaded, returned as a result of UploadLeaderboardScore()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardScoreUploaded_t {
|
||||
struct LeaderboardScoreUploaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 6 };
|
||||
uint8 m_bSuccess; // 1 if the call was successful
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was
|
||||
@ -381,25 +399,32 @@ struct LeaderboardScoreUploaded_t {
|
||||
int m_nGlobalRankPrevious; // the previous global rank of the user in this leaderboard; 0 if the user had no existing entry in the leaderboard
|
||||
};
|
||||
|
||||
struct NumberOfCurrentPlayers_t {
|
||||
struct NumberOfCurrentPlayers_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 7 };
|
||||
uint8 m_bSuccess; // 1 if the call was successful
|
||||
int32 m_cPlayers; // Number of players currently playing
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that a user's stats have been unloaded.
|
||||
// Call RequestUserStats again to access stats for this user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserStatsUnloaded_t {
|
||||
struct UserStatsUnloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 };
|
||||
CSteamID m_steamIDUser; // User whose stats have been unloaded
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that an achievement icon has been fetched
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserAchievementIconFetched_t {
|
||||
struct UserAchievementIconFetched_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 9 };
|
||||
|
||||
CGameID m_nGameID; // Game this is for
|
||||
@ -408,40 +433,49 @@ struct UserAchievementIconFetched_t {
|
||||
int m_nIconHandle; // Handle to the image, which can be used in SteamUtils()->GetImageRGBA(), 0 means no image is set for the achievement
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that global achievement percentages are fetched
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GlobalAchievementPercentagesReady_t {
|
||||
struct GlobalAchievementPercentagesReady_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 10 };
|
||||
|
||||
uint64 m_nGameID; // Game this is for
|
||||
EResult m_eResult; // Result of the operation
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating UGC has been uploaded, returned as a result of SetLeaderboardUGC()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardUGCSet_t {
|
||||
struct LeaderboardUGCSet_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 11 };
|
||||
EResult m_eResult; // The result of the operation
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating that PS3 trophies have been installed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PS3TrophiesInstalled_t {
|
||||
struct PS3TrophiesInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 12 };
|
||||
uint64 m_nGameID; // Game these stats are for
|
||||
EResult m_eResult; // The result of the operation
|
||||
uint64 m_ulRequiredDiskSpace; // If m_eResult is k_EResultDiskFull, will contain the amount of space needed to install trophies
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating global stats have been received.
|
||||
// Returned as a result of RequestGlobalStats()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GlobalStatsReceived_t {
|
||||
struct GlobalStatsReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 12 };
|
||||
uint64 m_nGameID; // Game global stats were requested for
|
||||
EResult m_eResult; // The result of the request
|
||||
@ -449,4 +483,5 @@ struct GlobalStatsReceived_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMUSER_H
|
||||
|
@ -9,8 +9,10 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
// Steam API call failure results
|
||||
enum ESteamAPICallFailure {
|
||||
enum ESteamAPICallFailure
|
||||
{
|
||||
k_ESteamAPICallFailureNone = -1, // no failure
|
||||
k_ESteamAPICallFailureSteamGone = 0, // the local Steam process has gone away
|
||||
k_ESteamAPICallFailureNetworkFailure = 1, // the network connection to Steam has been broken, or was already broken
|
||||
@ -20,19 +22,24 @@ enum ESteamAPICallFailure {
|
||||
k_ESteamAPICallFailureMismatchedCallback = 3,// GetAPICallResult() was called with the wrong callback type for this API call
|
||||
};
|
||||
|
||||
|
||||
// Input modes for the Big Picture gamepad text entry
|
||||
enum EGamepadTextInputMode {
|
||||
enum EGamepadTextInputMode
|
||||
{
|
||||
k_EGamepadTextInputModeNormal = 0,
|
||||
k_EGamepadTextInputModePassword = 1
|
||||
};
|
||||
|
||||
|
||||
// Controls number of allowed lines for the Big Picture gamepad text entry
|
||||
enum EGamepadTextInputLineMode {
|
||||
enum EGamepadTextInputLineMode
|
||||
{
|
||||
k_EGamepadTextInputLineModeSingleLine = 0,
|
||||
k_EGamepadTextInputLineModeMultipleLines = 1
|
||||
};
|
||||
|
||||
enum EFloatingGamepadTextInputMode {
|
||||
enum EFloatingGamepadTextInputMode
|
||||
{
|
||||
k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeEmail = 2, // Keyboard layout is email, enter dismisses the keyboard
|
||||
@ -41,17 +48,20 @@ enum EFloatingGamepadTextInputMode {
|
||||
};
|
||||
|
||||
// The context where text filtering is being done
|
||||
enum ETextFilteringContext {
|
||||
enum ETextFilteringContext
|
||||
{
|
||||
k_ETextFilteringContextUnknown = 0, // Unknown context
|
||||
k_ETextFilteringContextGameContent = 1, // Game content, only legally required filtering is performed
|
||||
k_ETextFilteringContextChat = 2, // Chat from another player
|
||||
k_ETextFilteringContextName = 3, // Character or item name
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to user independent utility functions
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUtils {
|
||||
class ISteamUtils
|
||||
{
|
||||
public:
|
||||
// return the number of seconds since the user
|
||||
virtual uint32 GetSecondsSinceAppActive() = 0;
|
||||
@ -205,6 +215,9 @@ public:
|
||||
|
||||
// Dismisses the floating keyboard.
|
||||
virtual bool DismissFloatingGamepadTextInput() = 0;
|
||||
|
||||
// Dismisses the full-screen text input dialog.
|
||||
virtual bool DismissGamepadTextInput() = 0;
|
||||
};
|
||||
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils010"
|
||||
@ -229,39 +242,47 @@ STEAM_DEFINE_INTERFACE_ACCESSOR(ISteamUtils*, SteamGameServerUtils, SteamInterna
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The country of the user changed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct IPCountry_t {
|
||||
struct IPCountry_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 1 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute
|
||||
// Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LowBatteryPower_t {
|
||||
struct LowBatteryPower_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 2 };
|
||||
uint8 m_nMinutesBatteryLeft;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a SteamAsyncCall_t has completed (or failed)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamAPICallCompleted_t {
|
||||
struct SteamAPICallCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 3 };
|
||||
SteamAPICall_t m_hAsyncCall;
|
||||
int m_iCallback;
|
||||
uint32 m_cubParam;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// called when Steam wants to shutdown
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamShutdown_t {
|
||||
struct SteamShutdown_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 4 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// results for CheckFileSignature
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ECheckFileSignature {
|
||||
enum ECheckFileSignature
|
||||
{
|
||||
k_ECheckFileSignatureInvalidSignature = 0,
|
||||
k_ECheckFileSignatureValidSignature = 1,
|
||||
k_ECheckFileSignatureFileNotFound = 2,
|
||||
@ -272,17 +293,21 @@ enum ECheckFileSignature {
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for CheckFileSignature
|
||||
//-----------------------------------------------------------------------------
|
||||
struct CheckFileSignature_t {
|
||||
struct CheckFileSignature_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 5 };
|
||||
ECheckFileSignature m_eCheckFileSignature;
|
||||
};
|
||||
|
||||
|
||||
// k_iSteamUtilsCallbacks + 13 is taken
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Full Screen gamepad text input has been closed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GamepadTextInputDismissed_t {
|
||||
struct GamepadTextInputDismissed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 14 };
|
||||
bool m_bSubmitted; // true if user entered & accepted text (Call ISteamUtils::GetEnteredGamepadTextInput() for text), false if canceled input
|
||||
uint32 m_unSubmittedText;
|
||||
@ -299,14 +324,16 @@ STEAM_CALLBACK_END(0)
|
||||
//-----------------------------------------------------------------------------
|
||||
// The floating on-screen keyboard has been closed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FloatingGamepadTextInputDismissed_t {
|
||||
struct FloatingGamepadTextInputDismissed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 38 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The text filtering dictionary has changed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FilterTextDictionaryChanged_t {
|
||||
struct FilterTextDictionaryChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 39 };
|
||||
int m_eLanguage; // One of ELanguage, or k_LegallyRequiredFiltering
|
||||
};
|
||||
|
@ -24,8 +24,10 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Video API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamVideo {
|
||||
class ISteamVideo
|
||||
{
|
||||
public:
|
||||
|
||||
// Get a URL suitable for streaming the given Video app ID's video
|
||||
virtual void GetVideoURL( AppId_t unVideoAppID ) = 0;
|
||||
|
||||
@ -36,9 +38,11 @@ public:
|
||||
STEAM_CALL_BACK( GetOPFSettingsResult_t )
|
||||
virtual void GetOPFSettings( AppId_t unVideoAppID ) = 0;
|
||||
virtual bool GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize ) = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V002"
|
||||
#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V007"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamVideo *SteamVideo();
|
||||
@ -50,11 +54,14 @@ STEAM_CALLBACK_MEMBER(1, AppId_t, m_unVideoAppID)
|
||||
STEAM_CALLBACK_MEMBER( 2, char, m_rgchURL[256] )
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iSteamVideoCallbacks + 24 )
|
||||
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
|
||||
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMVIDEO_H
|
||||
|
@ -27,7 +27,8 @@ const int k_cbMaxGameServerGameData = 2048;
|
||||
/// Actually, the name Key/Value is a bit misleading. The "key" is better
|
||||
/// understood as "filter operation code" and the "value" is the operand to this
|
||||
/// filter operation. The meaning of the operand depends upon the filter.
|
||||
struct MatchMakingKeyValuePair_t {
|
||||
struct MatchMakingKeyValuePair_t
|
||||
{
|
||||
MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; }
|
||||
MatchMakingKeyValuePair_t( const char *pchKey, const char *pchValue )
|
||||
{
|
||||
@ -40,7 +41,9 @@ struct MatchMakingKeyValuePair_t {
|
||||
char m_szValue[ 256 ];
|
||||
};
|
||||
|
||||
enum EMatchMakingServerResponse {
|
||||
|
||||
enum EMatchMakingServerResponse
|
||||
{
|
||||
eServerResponded = 0,
|
||||
eServerFailedToRespond,
|
||||
eNoServersListedOnMasterServer // for the Internet query type, returned in response callback if no servers of this type match
|
||||
@ -48,14 +51,11 @@ enum EMatchMakingServerResponse {
|
||||
|
||||
// servernetadr_t is all the addressing info the serverbrowser needs to know about a game server,
|
||||
// namely: its IP, its connection port, and its query port.
|
||||
class servernetadr_t {
|
||||
public:
|
||||
servernetadr_t()
|
||||
: m_usConnectionPort(0)
|
||||
, m_usQueryPort(0)
|
||||
, m_unIP(0)
|
||||
class servernetadr_t
|
||||
{
|
||||
}
|
||||
public:
|
||||
|
||||
servernetadr_t() : m_usConnectionPort( 0 ), m_usQueryPort( 0 ), m_unIP( 0 ) {}
|
||||
|
||||
void Init( unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort );
|
||||
|
||||
@ -84,6 +84,7 @@ public:
|
||||
m_unIP = that.m_unIP;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
const char *ToString( uint32 unIP, uint16 usPort ) const;
|
||||
uint16 m_usConnectionPort; // (in HOST byte order)
|
||||
@ -91,6 +92,7 @@ private:
|
||||
uint32 m_unIP;
|
||||
};
|
||||
|
||||
|
||||
inline void servernetadr_t::Init( unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort )
|
||||
{
|
||||
m_unIP = ip;
|
||||
@ -162,7 +164,8 @@ inline bool servernetadr_t::operator<(const servernetadr_t& netadr) const
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Data describing a single server
|
||||
//-----------------------------------------------------------------------------
|
||||
class gameserveritem_t {
|
||||
class gameserveritem_t
|
||||
{
|
||||
public:
|
||||
gameserveritem_t();
|
||||
|
||||
@ -187,6 +190,7 @@ public:
|
||||
int m_nServerVersion; ///< server version as reported to Steam
|
||||
|
||||
private:
|
||||
|
||||
/// Game server name
|
||||
char m_szServerName[k_cbMaxGameServerName];
|
||||
|
||||
@ -199,6 +203,7 @@ public:
|
||||
CSteamID m_steamID;
|
||||
};
|
||||
|
||||
|
||||
inline gameserveritem_t::gameserveritem_t()
|
||||
{
|
||||
m_szGameDir[0] = m_szMap[0] = m_szGameDescription[0] = m_szServerName[0] = 0;
|
||||
@ -222,4 +227,5 @@ inline void gameserveritem_t::SetName(const char* pName)
|
||||
m_szServerName[ sizeof( m_szServerName ) - 1 ] = '\0';
|
||||
}
|
||||
|
||||
|
||||
#endif // MATCHMAKINGTYPES_H
|
||||
|
@ -21,31 +21,32 @@
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// All of the interfaces
|
||||
#include "isteamapplist.h"
|
||||
#include "isteamapps.h"
|
||||
#include "isteamclient.h"
|
||||
#include "isteamcontroller.h"
|
||||
#include "isteamuser.h"
|
||||
#include "isteamfriends.h"
|
||||
#include "isteamhtmlsurface.h"
|
||||
#include "isteamhttp.h"
|
||||
#include "isteaminput.h"
|
||||
#include "isteaminventory.h"
|
||||
#include "isteamutils.h"
|
||||
#include "isteammatchmaking.h"
|
||||
#include "isteamuserstats.h"
|
||||
#include "isteamapps.h"
|
||||
#include "isteamnetworking.h"
|
||||
#include "isteamremotestorage.h"
|
||||
#include "isteamscreenshots.h"
|
||||
#include "isteammusic.h"
|
||||
#include "isteammusicremote.h"
|
||||
#include "isteamnetworking.h"
|
||||
#include "isteamhttp.h"
|
||||
#include "isteamcontroller.h"
|
||||
#include "isteamugc.h"
|
||||
#include "isteamhtmlsurface.h"
|
||||
#include "isteaminventory.h"
|
||||
#include "isteamtimeline.h"
|
||||
#include "isteamvideo.h"
|
||||
#include "isteamparentalsettings.h"
|
||||
#include "isteaminput.h"
|
||||
#include "isteamremoteplay.h"
|
||||
#include "isteamnetworkingmessages.h"
|
||||
#include "isteamnetworkingsockets.h"
|
||||
#include "isteamnetworkingutils.h"
|
||||
#include "isteamparentalsettings.h"
|
||||
#include "isteamremoteplay.h"
|
||||
#include "isteamremotestorage.h"
|
||||
#include "isteamscreenshots.h"
|
||||
#include "isteamugc.h"
|
||||
#include "isteamuser.h"
|
||||
#include "isteamuserstats.h"
|
||||
#include "isteamutils.h"
|
||||
#include "isteamvideo.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// Steam API setup & shutdown
|
||||
@ -54,9 +55,54 @@
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
// SteamAPI_Init must be called before using any other API functions. If it fails, an
|
||||
// error message will be output to the debugger (or stderr) with further information.
|
||||
S_API bool S_CALLTYPE SteamAPI_Init();
|
||||
enum ESteamAPIInitResult
|
||||
{
|
||||
k_ESteamAPIInitResult_OK = 0,
|
||||
k_ESteamAPIInitResult_FailedGeneric = 1, // Some other failure
|
||||
k_ESteamAPIInitResult_NoSteamClient = 2, // We cannot connect to Steam, steam probably isn't running
|
||||
k_ESteamAPIInitResult_VersionMismatch = 3, // Steam client appears to be out of date
|
||||
};
|
||||
|
||||
// Initializing the Steamworks SDK
|
||||
// -----------------------------
|
||||
//
|
||||
// There are three different methods you can use to initialize the Steamworks SDK, depending on
|
||||
// your project's environment. You should only use one method in your project.
|
||||
//
|
||||
// If you are able to include this C++ header in your project, we recommend using the following
|
||||
// initialization methods. They will ensure that all ISteam* interfaces defined in other
|
||||
// C++ header files have versions that are supported by the user's Steam Client:
|
||||
// - SteamAPI_InitEx() for new projects so you can show a detailed error message to the user
|
||||
// - SteamAPI_Init() for existing projects that only display a generic error message
|
||||
//
|
||||
// If you are unable to include this C++ header in your project and are dynamically loading
|
||||
// Steamworks SDK methods from dll/so, you can use the following method:
|
||||
// - SteamAPI_InitFlat()
|
||||
|
||||
|
||||
// See "Initializing the Steamworks SDK" above for how to choose an init method.
|
||||
// On success k_ESteamAPIInitResult_OK is returned. Otherwise, returns a value that can be used
|
||||
// to create a localized error message for the user. If pOutErrMsg is non-NULL,
|
||||
// it will receive an example error message, in English, that explains the reason for the failure.
|
||||
//
|
||||
// Example usage:
|
||||
//
|
||||
// SteamErrMsg errMsg;
|
||||
// if ( SteamAPI_Init(&errMsg) != k_ESteamAPIInitResult_OK )
|
||||
// FatalError( "Failed to init Steam. %s", errMsg );
|
||||
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg );
|
||||
|
||||
// See "Initializing the Steamworks SDK" above for how to choose an init method.
|
||||
// Returns true on success
|
||||
inline bool SteamAPI_Init()
|
||||
{
|
||||
return SteamAPI_InitEx( NULL ) == k_ESteamAPIInitResult_OK;
|
||||
}
|
||||
|
||||
// See "Initializing the Steamworks SDK" above for how to choose an init method.
|
||||
// Same usage as SteamAPI_InitEx(), however does not verify ISteam* interfaces are
|
||||
// supported by the user's client and is exported from the dll
|
||||
S_API ESteamAPIInitResult S_CALLTYPE SteamAPI_InitFlat( SteamErrMsg *pOutErrMsg );
|
||||
|
||||
// SteamAPI_Shutdown should be called during process shutdown if possible.
|
||||
S_API void S_CALLTYPE SteamAPI_Shutdown();
|
||||
@ -79,6 +125,7 @@ S_API bool S_CALLTYPE SteamAPI_RestartAppIfNecessary(uint32 unOwnAppID);
|
||||
// program never needs to explicitly call this function.
|
||||
S_API void S_CALLTYPE SteamAPI_ReleaseCurrentThreadMemory();
|
||||
|
||||
|
||||
// crash dump recording functions
|
||||
S_API void S_CALLTYPE SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
|
||||
S_API void S_CALLTYPE SteamAPI_SetMiniDumpComment( const char *pchMsg );
|
||||
@ -178,117 +225,42 @@ S_API void S_CALLTYPE SteamAPI_ManualDispatch_FreeLastCallback(HSteamPipe hSteam
|
||||
/// only call this in a handler for SteamAPICallCompleted_t callback.
|
||||
S_API bool S_CALLTYPE SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed );
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
//
|
||||
// CSteamAPIContext
|
||||
//
|
||||
// Deprecated! This is not necessary any more. Please use the global accessors directly
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
#ifndef STEAM_API_EXPORTS
|
||||
|
||||
inline bool CSteamAPIContext::Init()
|
||||
// Internal implementation of SteamAPI_InitEx. This is done in a way that checks
|
||||
// all of the versions of interfaces from headers being compiled into this code.
|
||||
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_SteamAPI_Init( const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
|
||||
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg )
|
||||
{
|
||||
m_pSteamClient = ::SteamClient();
|
||||
if (!m_pSteamClient)
|
||||
return false;
|
||||
const char *pszInternalCheckInterfaceVersions =
|
||||
STEAMUTILS_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"
|
||||
STEAMAPPS_INTERFACE_VERSION "\0"
|
||||
STEAMCONTROLLER_INTERFACE_VERSION "\0"
|
||||
STEAMFRIENDS_INTERFACE_VERSION "\0"
|
||||
STEAMGAMESEARCH_INTERFACE_VERSION "\0"
|
||||
STEAMHTMLSURFACE_INTERFACE_VERSION "\0"
|
||||
STEAMHTTP_INTERFACE_VERSION "\0"
|
||||
STEAMINPUT_INTERFACE_VERSION "\0"
|
||||
STEAMINVENTORY_INTERFACE_VERSION "\0"
|
||||
STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "\0"
|
||||
STEAMMATCHMAKING_INTERFACE_VERSION "\0"
|
||||
STEAMMUSICREMOTE_INTERFACE_VERSION "\0"
|
||||
STEAMMUSIC_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKING_INTERFACE_VERSION "\0"
|
||||
STEAMPARENTALSETTINGS_INTERFACE_VERSION "\0"
|
||||
STEAMPARTIES_INTERFACE_VERSION "\0"
|
||||
STEAMREMOTEPLAY_INTERFACE_VERSION "\0"
|
||||
STEAMREMOTESTORAGE_INTERFACE_VERSION "\0"
|
||||
STEAMSCREENSHOTS_INTERFACE_VERSION "\0"
|
||||
STEAMUGC_INTERFACE_VERSION "\0"
|
||||
STEAMUSERSTATS_INTERFACE_VERSION "\0"
|
||||
STEAMUSER_INTERFACE_VERSION "\0"
|
||||
STEAMVIDEO_INTERFACE_VERSION "\0"
|
||||
|
||||
m_pSteamUser = ::SteamUser();
|
||||
if (!m_pSteamUser)
|
||||
return false;
|
||||
"\0";
|
||||
|
||||
m_pSteamFriends = ::SteamFriends();
|
||||
if (!m_pSteamFriends)
|
||||
return false;
|
||||
|
||||
m_pSteamUtils = ::SteamUtils();
|
||||
if (!m_pSteamUtils)
|
||||
return false;
|
||||
|
||||
m_pSteamMatchmaking = ::SteamMatchmaking();
|
||||
if (!m_pSteamMatchmaking)
|
||||
return false;
|
||||
|
||||
m_pSteamGameSearch = ::SteamGameSearch();
|
||||
if (!m_pSteamGameSearch)
|
||||
return false;
|
||||
|
||||
#if !defined(IOSALL) // Not yet supported on iOS.
|
||||
m_pSteamMatchmakingServers = ::SteamMatchmakingServers();
|
||||
if (!m_pSteamMatchmakingServers)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
m_pSteamUserStats = ::SteamUserStats();
|
||||
if (!m_pSteamUserStats)
|
||||
return false;
|
||||
|
||||
m_pSteamApps = ::SteamApps();
|
||||
if (!m_pSteamApps)
|
||||
return false;
|
||||
|
||||
m_pSteamNetworking = ::SteamNetworking();
|
||||
if (!m_pSteamNetworking)
|
||||
return false;
|
||||
|
||||
m_pSteamRemoteStorage = ::SteamRemoteStorage();
|
||||
if (!m_pSteamRemoteStorage)
|
||||
return false;
|
||||
|
||||
m_pSteamScreenshots = ::SteamScreenshots();
|
||||
if (!m_pSteamScreenshots)
|
||||
return false;
|
||||
|
||||
m_pSteamHTTP = ::SteamHTTP();
|
||||
if (!m_pSteamHTTP)
|
||||
return false;
|
||||
|
||||
m_pController = ::SteamController();
|
||||
if (!m_pController)
|
||||
return false;
|
||||
|
||||
m_pSteamUGC = ::SteamUGC();
|
||||
if (!m_pSteamUGC)
|
||||
return false;
|
||||
|
||||
m_pSteamAppList = ::SteamAppList();
|
||||
if (!m_pSteamAppList)
|
||||
return false;
|
||||
|
||||
m_pSteamMusic = ::SteamMusic();
|
||||
if (!m_pSteamMusic)
|
||||
return false;
|
||||
|
||||
m_pSteamMusicRemote = ::SteamMusicRemote();
|
||||
if (!m_pSteamMusicRemote)
|
||||
return false;
|
||||
|
||||
#if !defined(ANDROID) && !defined(IOSALL) // Not yet supported on Android or ios.
|
||||
m_pSteamHTMLSurface = ::SteamHTMLSurface();
|
||||
if (!m_pSteamHTMLSurface)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
m_pSteamInventory = ::SteamInventory();
|
||||
if (!m_pSteamInventory)
|
||||
return false;
|
||||
|
||||
m_pSteamVideo = ::SteamVideo();
|
||||
if (!m_pSteamVideo)
|
||||
return false;
|
||||
|
||||
m_pSteamParentalSettings = ::SteamParentalSettings();
|
||||
if (!m_pSteamParentalSettings)
|
||||
return false;
|
||||
|
||||
m_pSteamInput = ::SteamInput();
|
||||
if (!m_pSteamInput)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return SteamInternal_SteamAPI_Init( pszInternalCheckInterfaceVersions, pOutErrMsg );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // STEAM_API_H
|
||||
|
@ -125,6 +125,16 @@
|
||||
],
|
||||
"struct": "DurationControl_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 168,
|
||||
"fields": [
|
||||
{ "fieldname":"m_hAuthTicket", "fieldtype":"HAuthTicket" },
|
||||
{ "fieldname":"m_eResult", "fieldtype":"EResult" },
|
||||
{ "fieldname":"m_cubTicket", "fieldtype":"int" },
|
||||
{ "fieldname":"m_rgubTicket", "fieldtype":"uint8 [2560]" }
|
||||
],
|
||||
"struct": "GetTicketForWebApiResponse_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 304,
|
||||
"fields": [
|
||||
@ -138,7 +148,8 @@
|
||||
"fields": [
|
||||
{ "fieldname":"m_bActive", "fieldtype":"uint8" },
|
||||
{ "fieldname":"m_bUserInitiated", "fieldtype":"bool" },
|
||||
{ "fieldname":"m_nAppID", "fieldtype":"AppId_t" }
|
||||
{ "fieldname":"m_nAppID", "fieldtype":"AppId_t" },
|
||||
{ "fieldname":"m_dwOverlayPID", "fieldtype":"uint32" }
|
||||
],
|
||||
"struct": "GameOverlayActivated_t"
|
||||
},
|
||||
@ -1201,6 +1212,17 @@
|
||||
],
|
||||
"struct": "SteamInputConfigurationLoaded_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 2804,
|
||||
"fields": [
|
||||
{ "fieldname":"m_unAppID", "fieldtype":"AppId_t" },
|
||||
{ "fieldname":"m_ulDeviceHandle", "fieldtype":"InputHandle_t" },
|
||||
{ "fieldname":"m_eDeviceType", "fieldtype":"ESteamInputType" },
|
||||
{ "fieldname":"m_nOldGamepadSlot", "fieldtype":"int" },
|
||||
{ "fieldname":"m_nNewGamepadSlot", "fieldtype":"int" }
|
||||
],
|
||||
"struct": "SteamInputGamepadSlotChange_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 3401,
|
||||
"fields": [
|
||||
@ -1243,7 +1265,9 @@
|
||||
"callback_id": 3405,
|
||||
"fields": [
|
||||
{ "fieldname":"m_unAppID", "fieldtype":"AppId_t" },
|
||||
{ "fieldname":"m_nPublishedFileId", "fieldtype":"PublishedFileId_t" }
|
||||
{ "fieldname":"m_nPublishedFileId", "fieldtype":"PublishedFileId_t" },
|
||||
{ "fieldname":"m_hLegacyContent", "fieldtype":"UGCHandle_t" },
|
||||
{ "fieldname":"m_unManifestID", "fieldtype":"uint64" }
|
||||
],
|
||||
"struct": "ItemInstalled_t"
|
||||
},
|
||||
@ -1373,22 +1397,6 @@
|
||||
],
|
||||
"struct": "WorkshopEULAStatus_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 3901,
|
||||
"fields": [
|
||||
{ "fieldname":"m_nAppID", "fieldtype":"AppId_t" },
|
||||
{ "fieldname":"m_iInstallFolderIndex", "fieldtype":"int" }
|
||||
],
|
||||
"struct": "SteamAppInstalled_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 3902,
|
||||
"fields": [
|
||||
{ "fieldname":"m_nAppID", "fieldtype":"AppId_t" },
|
||||
{ "fieldname":"m_iInstallFolderIndex", "fieldtype":"int" }
|
||||
],
|
||||
"struct": "SteamAppUninstalled_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 4501,
|
||||
"fields": [
|
||||
@ -1691,6 +1699,13 @@
|
||||
],
|
||||
"struct": "SteamRemotePlaySessionDisconnected_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 5703,
|
||||
"fields": [
|
||||
{ "fieldname":"m_szConnectURL", "fieldtype":"char [1024]" }
|
||||
],
|
||||
"struct": "SteamRemotePlayTogetherGuestInvite_t"
|
||||
},
|
||||
{
|
||||
"callback_id": 1251,
|
||||
"fields": [
|
||||
@ -1866,16 +1881,20 @@
|
||||
{ "constname":"k_uAppIdInvalid", "consttype":"AppId_t", "constval":"0x0" },
|
||||
{ "constname":"k_uDepotIdInvalid", "consttype":"DepotId_t", "constval":"0x0" },
|
||||
{ "constname":"k_uAPICallInvalid", "consttype":"SteamAPICall_t", "constval":"0x0" },
|
||||
{ "constname":"k_uAccountIdInvalid", "consttype":"AccountID_t", "constval":"0" },
|
||||
{ "constname":"k_ulPartyBeaconIdInvalid", "consttype":"PartyBeaconID_t", "constval":"0" },
|
||||
{ "constname":"k_HAuthTicketInvalid", "consttype":"HAuthTicket", "constval":"0" },
|
||||
{ "constname":"k_unSteamAccountIDMask", "consttype":"unsigned int", "constval":"0xFFFFFFFF" },
|
||||
{ "constname":"k_unSteamAccountInstanceMask", "consttype":"unsigned int", "constval":"0x000FFFFF" },
|
||||
{ "constname":"k_unSteamUserDefaultInstance", "consttype":"unsigned int", "constval":"1" },
|
||||
{ "constname":"k_cchGameExtraInfoMax", "consttype":"int", "constval":"64" },
|
||||
{ "constname":"k_cchMaxSteamErrMsg", "consttype":"int", "constval":"1024" },
|
||||
{ "constname":"k_cchMaxFriendsGroupName", "consttype":"int", "constval":"64" },
|
||||
{ "constname":"k_cFriendsGroupLimit", "consttype":"int", "constval":"100" },
|
||||
{ "constname":"k_FriendsGroupID_Invalid", "consttype":"FriendsGroupID_t", "constval":"- 1" },
|
||||
{ "constname":"k_cEnumerateFollowersMax", "consttype":"int", "constval":"50" },
|
||||
{ "constname":"k_usFriendGameInfoQueryPort_NotInitialized", "consttype":"uint16", "constval":"0xFFFF" },
|
||||
{ "constname":"k_usFriendGameInfoQueryPort_Error", "consttype":"uint16", "constval":"0xFFFE" },
|
||||
{ "constname":"k_cubChatMetadataMax", "consttype":"uint32", "constval":"8192" },
|
||||
{ "constname":"k_cbMaxGameServerGameDir", "consttype":"int", "constval":"32" },
|
||||
{ "constname":"k_cbMaxGameServerMapName", "consttype":"int", "constval":"32" },
|
||||
@ -1913,6 +1932,8 @@
|
||||
{ "constname":"k_SteamItemInstanceIDInvalid", "consttype":"SteamItemInstanceID_t", "constval":"( SteamItemInstanceID_t ) ~ 0" },
|
||||
{ "constname":"k_SteamInventoryResultInvalid", "consttype":"SteamInventoryResult_t", "constval":"- 1" },
|
||||
{ "constname":"k_SteamInventoryUpdateHandleInvalid", "consttype":"SteamInventoryUpdateHandle_t", "constval":"0xffffffffffffffffull" },
|
||||
{ "constname":"k_unMaxTimelinePriority", "consttype":"uint32", "constval":"1000" },
|
||||
{ "constname":"k_flMaxTimelineEventDuration", "consttype":"float", "constval":"600.f" },
|
||||
{ "constname":"k_HSteamNetConnection_Invalid", "consttype":"HSteamNetConnection", "constval":"0" },
|
||||
{ "constname":"k_HSteamListenSocket_Invalid", "consttype":"HSteamListenSocket", "constval":"0" },
|
||||
{ "constname":"k_HSteamNetPollGroup_Invalid", "consttype":"HSteamNetPollGroup", "constval":"0" },
|
||||
@ -2102,7 +2123,9 @@
|
||||
{ "name":"k_EResultInsufficientBattery", "value":"124" },
|
||||
{ "name":"k_EResultChargerRequired", "value":"125" },
|
||||
{ "name":"k_EResultCachedCredentialInvalid", "value":"126" },
|
||||
{ "name":"K_EResultPhoneNumberIsVOIP", "value":"127" }
|
||||
{ "name":"K_EResultPhoneNumberIsVOIP", "value":"127" },
|
||||
{ "name":"k_EResultNotSupported", "value":"128" },
|
||||
{ "name":"k_EResultFamilySizeLimitExceeded", "value":"129" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -2330,6 +2353,17 @@
|
||||
{ "name":"k_EDurationControlOnlineState_OnlineHighPri", "value":"3" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"enumname": "EBetaBranchFlags",
|
||||
"values": [
|
||||
{ "name":"k_EBetaBranch_None", "value":"0" },
|
||||
{ "name":"k_EBetaBranch_Default", "value":"1" },
|
||||
{ "name":"k_EBetaBranch_Available", "value":"2" },
|
||||
{ "name":"k_EBetaBranch_Private", "value":"4" },
|
||||
{ "name":"k_EBetaBranch_Selected", "value":"8" },
|
||||
{ "name":"k_EBetaBranch_Installed", "value":"16" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"enumname": "EGameSearchErrorCode_t",
|
||||
"values": [
|
||||
@ -2651,7 +2685,8 @@
|
||||
{ "name":"k_EWorkshopFileTypeSteamworksAccessInvite", "value":"13" },
|
||||
{ "name":"k_EWorkshopFileTypeSteamVideo", "value":"14" },
|
||||
{ "name":"k_EWorkshopFileTypeGameManagedItem", "value":"15" },
|
||||
{ "name":"k_EWorkshopFileTypeMax", "value":"16" }
|
||||
{ "name":"k_EWorkshopFileTypeClip", "value":"16" },
|
||||
{ "name":"k_EWorkshopFileTypeMax", "value":"17" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -3922,7 +3957,8 @@
|
||||
{ "name":"k_EItemStateInstalled", "value":"4" },
|
||||
{ "name":"k_EItemStateNeedsUpdate", "value":"8" },
|
||||
{ "name":"k_EItemStateDownloading", "value":"16" },
|
||||
{ "name":"k_EItemStateDownloadPending", "value":"32" }
|
||||
{ "name":"k_EItemStateDownloadPending", "value":"32" },
|
||||
{ "name":"k_EItemStateDisabledLocally", "value":"64" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -3951,6 +3987,7 @@
|
||||
{ "name":"k_EItemPreviewType_Sketchfab", "value":"2" },
|
||||
{ "name":"k_EItemPreviewType_EnvironmentMap_HorizontalCross", "value":"3" },
|
||||
{ "name":"k_EItemPreviewType_EnvironmentMap_LatLong", "value":"4" },
|
||||
{ "name":"k_EItemPreviewType_Clip", "value":"5" },
|
||||
{ "name":"k_EItemPreviewType_ReservedMax", "value":"255" }
|
||||
]
|
||||
},
|
||||
@ -3972,6 +4009,26 @@
|
||||
{ "name":"k_ESteamItemConsumed", "value":"512" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"enumname": "ETimelineGameMode",
|
||||
"values": [
|
||||
{ "name":"k_ETimelineGameMode_Invalid", "value":"0" },
|
||||
{ "name":"k_ETimelineGameMode_Playing", "value":"1" },
|
||||
{ "name":"k_ETimelineGameMode_Staging", "value":"2" },
|
||||
{ "name":"k_ETimelineGameMode_Menus", "value":"3" },
|
||||
{ "name":"k_ETimelineGameMode_LoadingScreen", "value":"4" },
|
||||
{ "name":"k_ETimelineGameMode_Max", "value":"5" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"enumname": "ETimelineEventClipPriority",
|
||||
"values": [
|
||||
{ "name":"k_ETimelineEventClipPriority_Invalid", "value":"0" },
|
||||
{ "name":"k_ETimelineEventClipPriority_None", "value":"1" },
|
||||
{ "name":"k_ETimelineEventClipPriority_Standard", "value":"2" },
|
||||
{ "name":"k_ETimelineEventClipPriority_Featured", "value":"3" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"enumname": "EParentalFeature",
|
||||
"values": [
|
||||
@ -3989,8 +4046,9 @@
|
||||
{ "name":"k_EFeatureLibrary", "value":"11" },
|
||||
{ "name":"k_EFeatureTest", "value":"12" },
|
||||
{ "name":"k_EFeatureSiteLicense", "value":"13" },
|
||||
{ "name":"k_EFeatureKioskMode", "value":"14" },
|
||||
{ "name":"k_EFeatureMax", "value":"15" }
|
||||
{ "name":"k_EFeatureKioskMode_Deprecated", "value":"14" },
|
||||
{ "name":"k_EFeatureBlockAlways", "value":"15" },
|
||||
{ "name":"k_EFeatureMax", "value":"16" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -4000,7 +4058,8 @@
|
||||
{ "name":"k_ESteamDeviceFormFactorPhone", "value":"1" },
|
||||
{ "name":"k_ESteamDeviceFormFactorTablet", "value":"2" },
|
||||
{ "name":"k_ESteamDeviceFormFactorComputer", "value":"3" },
|
||||
{ "name":"k_ESteamDeviceFormFactorTV", "value":"4" }
|
||||
{ "name":"k_ESteamDeviceFormFactorTV", "value":"4" },
|
||||
{ "name":"k_ESteamDeviceFormFactorVRHeadset", "value":"5" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -4124,11 +4183,16 @@
|
||||
{ "name":"k_ESteamNetworkingConfig_TimeoutInitial", "value":"24" },
|
||||
{ "name":"k_ESteamNetworkingConfig_TimeoutConnected", "value":"25" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SendBufferSize", "value":"9" },
|
||||
{ "name":"k_ESteamNetworkingConfig_RecvBufferSize", "value":"47" },
|
||||
{ "name":"k_ESteamNetworkingConfig_RecvBufferMessages", "value":"48" },
|
||||
{ "name":"k_ESteamNetworkingConfig_RecvMaxMessageSize", "value":"49" },
|
||||
{ "name":"k_ESteamNetworkingConfig_RecvMaxSegmentsPerPacket", "value":"50" },
|
||||
{ "name":"k_ESteamNetworkingConfig_ConnectionUserData", "value":"40" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SendRateMin", "value":"10" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SendRateMax", "value":"11" },
|
||||
{ "name":"k_ESteamNetworkingConfig_NagleTime", "value":"12" },
|
||||
{ "name":"k_ESteamNetworkingConfig_IP_AllowWithoutAuth", "value":"23" },
|
||||
{ "name":"k_ESteamNetworkingConfig_IPLocalHost_AllowWithoutAuth", "value":"52" },
|
||||
{ "name":"k_ESteamNetworkingConfig_MTU_PacketSize", "value":"32" },
|
||||
{ "name":"k_ESteamNetworkingConfig_MTU_DataSize", "value":"33" },
|
||||
{ "name":"k_ESteamNetworkingConfig_Unencrypted", "value":"34" },
|
||||
@ -4151,6 +4215,7 @@
|
||||
{ "name":"k_ESteamNetworkingConfig_FakeRateLimit_Send_Burst", "value":"43" },
|
||||
{ "name":"k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate", "value":"44" },
|
||||
{ "name":"k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst", "value":"45" },
|
||||
{ "name":"k_ESteamNetworkingConfig_OutOfOrderCorrectionWindowMicroseconds", "value":"51" },
|
||||
{ "name":"k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged", "value":"201" },
|
||||
{ "name":"k_ESteamNetworkingConfig_Callback_AuthStatusChanged", "value":"202" },
|
||||
{ "name":"k_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged", "value":"203" },
|
||||
@ -4171,15 +4236,17 @@
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate", "value":"21" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_SingleSocket", "value":"22" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_ForceRelayCluster", "value":"29" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_DebugTicketAddress", "value":"30" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_DevTicket", "value":"30" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_ForceProxyAddr", "value":"31" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_FakeClusterPing", "value":"36" },
|
||||
{ "name":"k_ESteamNetworkingConfig_SDRClient_LimitPingProbesToNearestN", "value":"60" },
|
||||
{ "name":"k_ESteamNetworkingConfig_LogLevel_AckRTT", "value":"13" },
|
||||
{ "name":"k_ESteamNetworkingConfig_LogLevel_PacketDecode", "value":"14" },
|
||||
{ "name":"k_ESteamNetworkingConfig_LogLevel_Message", "value":"15" },
|
||||
{ "name":"k_ESteamNetworkingConfig_LogLevel_PacketGaps", "value":"16" },
|
||||
{ "name":"k_ESteamNetworkingConfig_LogLevel_P2PRendezvous", "value":"17" },
|
||||
{ "name":"k_ESteamNetworkingConfig_LogLevel_SDRRelayPings", "value":"18" },
|
||||
{ "name":"k_ESteamNetworkingConfig_ECN", "value":"999" },
|
||||
{ "name":"k_ESteamNetworkingConfig_DELETED_EnumerateDevVars", "value":"35" },
|
||||
{ "name":"k_ESteamNetworkingConfigValue__Force32Bit", "value":"2147483647" }
|
||||
]
|
||||
@ -4210,6 +4277,15 @@
|
||||
{ "name":"k_ESteamNetworkingSocketsDebugOutputType__Force32Bit", "value":"2147483647" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"enumname": "ESteamAPIInitResult",
|
||||
"values": [
|
||||
{ "name":"k_ESteamAPIInitResult_OK", "value":"0" },
|
||||
{ "name":"k_ESteamAPIInitResult_FailedGeneric", "value":"1" },
|
||||
{ "name":"k_ESteamAPIInitResult_NoSteamClient", "value":"2" },
|
||||
{ "name":"k_ESteamAPIInitResult_VersionMismatch", "value":"3" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"enumname": "EServerMode",
|
||||
"values": [
|
||||
@ -4463,16 +4539,6 @@
|
||||
],
|
||||
"returntype": "ISteamUGC *"
|
||||
},
|
||||
{
|
||||
"methodname": "GetISteamAppList",
|
||||
"methodname_flat": "SteamAPI_ISteamClient_GetISteamAppList",
|
||||
"params": [
|
||||
{ "paramname":"hSteamUser", "paramtype":"HSteamUser" },
|
||||
{ "paramname":"hSteamPipe", "paramtype":"HSteamPipe" },
|
||||
{ "paramname":"pchVersion", "paramtype":"const char *" }
|
||||
],
|
||||
"returntype": "ISteamAppList *"
|
||||
},
|
||||
{
|
||||
"methodname": "GetISteamMusic",
|
||||
"methodname_flat": "SteamAPI_ISteamClient_GetISteamMusic",
|
||||
@ -4570,7 +4636,7 @@
|
||||
{
|
||||
"kind": "user",
|
||||
"name": "SteamUser",
|
||||
"name_flat": "SteamAPI_SteamUser_v022"
|
||||
"name_flat": "SteamAPI_SteamUser_v023"
|
||||
}
|
||||
],
|
||||
"classname": "ISteamUser",
|
||||
@ -4704,6 +4770,14 @@
|
||||
],
|
||||
"returntype": "HAuthTicket"
|
||||
},
|
||||
{
|
||||
"methodname": "GetAuthTicketForWebApi",
|
||||
"methodname_flat": "SteamAPI_ISteamUser_GetAuthTicketForWebApi",
|
||||
"params": [
|
||||
{ "paramname":"pchIdentity", "paramtype":"const char *" }
|
||||
],
|
||||
"returntype": "HAuthTicket"
|
||||
},
|
||||
{
|
||||
"methodname": "BeginAuthSession",
|
||||
"methodname_flat": "SteamAPI_ISteamUser_BeginAuthSession",
|
||||
@ -4846,7 +4920,7 @@
|
||||
"returntype": "bool"
|
||||
}
|
||||
],
|
||||
"version_string": "SteamUser022"
|
||||
"version_string": "SteamUser023"
|
||||
},
|
||||
{
|
||||
"accessors": [
|
||||
@ -5846,6 +5920,12 @@
|
||||
"methodname_flat": "SteamAPI_ISteamUtils_DismissFloatingGamepadTextInput",
|
||||
"params": [],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "DismissGamepadTextInput",
|
||||
"methodname_flat": "SteamAPI_ISteamUtils_DismissGamepadTextInput",
|
||||
"params": [],
|
||||
"returntype": "bool"
|
||||
}
|
||||
],
|
||||
"version_string": "SteamUtils010"
|
||||
@ -8050,6 +8130,40 @@
|
||||
{ "paramname":"nAppID", "paramtype":"AppId_t" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "GetNumBetas",
|
||||
"methodname_flat": "SteamAPI_ISteamApps_GetNumBetas",
|
||||
"params": [
|
||||
{ "paramname":"unAppID", "paramtype":"AppId_t" },
|
||||
{ "paramname":"pnAvailable", "paramtype":"int *" },
|
||||
{ "paramname":"pnPrivate", "paramtype":"int *" }
|
||||
],
|
||||
"returntype": "int"
|
||||
},
|
||||
{
|
||||
"methodname": "GetBetaInfo",
|
||||
"methodname_flat": "SteamAPI_ISteamApps_GetBetaInfo",
|
||||
"params": [
|
||||
{ "paramname":"unAppID", "paramtype":"AppId_t" },
|
||||
{ "paramname":"iBetaIndex", "paramtype":"int" },
|
||||
{ "paramname":"punFlags", "paramtype":"uint32 *" },
|
||||
{ "paramname":"punBuildID", "paramtype":"uint32 *" },
|
||||
{ "paramname":"pchBetaName", "paramtype":"char *" },
|
||||
{ "paramname":"cchBetaName", "paramtype":"int" },
|
||||
{ "paramname":"pchDescription", "paramtype":"char *" },
|
||||
{ "paramname":"cchDescription", "paramtype":"int" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "SetActiveBeta",
|
||||
"methodname_flat": "SteamAPI_ISteamApps_SetActiveBeta",
|
||||
"params": [
|
||||
{ "paramname":"unAppID", "paramtype":"AppId_t" },
|
||||
{ "paramname":"pchBetaName", "paramtype":"const char *" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
}
|
||||
],
|
||||
"version_string": "STEAMAPPS_INTERFACE_VERSION008"
|
||||
@ -9036,7 +9150,7 @@
|
||||
"returntype": "void"
|
||||
},
|
||||
{
|
||||
"callback": "SteamInputDeviceDisconnected_t",
|
||||
"callback": "SteamInputGamepadSlotChange_t",
|
||||
"methodname": "EnableActionEventCallbacks",
|
||||
"methodname_flat": "SteamAPI_ISteamInput_EnableActionEventCallbacks",
|
||||
"params": [
|
||||
@ -9750,12 +9864,12 @@
|
||||
{
|
||||
"kind": "user",
|
||||
"name": "SteamUGC",
|
||||
"name_flat": "SteamAPI_SteamUGC_v017"
|
||||
"name_flat": "SteamAPI_SteamUGC_v020"
|
||||
},
|
||||
{
|
||||
"kind": "gameserver",
|
||||
"name": "SteamGameServerUGC",
|
||||
"name_flat": "SteamAPI_SteamGameServerUGC_v017"
|
||||
"name_flat": "SteamAPI_SteamGameServerUGC_v020"
|
||||
}
|
||||
],
|
||||
"classname": "ISteamUGC",
|
||||
@ -9999,6 +10113,36 @@
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "GetNumSupportedGameVersions",
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_GetNumSupportedGameVersions",
|
||||
"params": [
|
||||
{ "paramname":"handle", "paramtype":"UGCQueryHandle_t" },
|
||||
{ "paramname":"index", "paramtype":"uint32" }
|
||||
],
|
||||
"returntype": "uint32"
|
||||
},
|
||||
{
|
||||
"methodname": "GetSupportedGameVersionData",
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_GetSupportedGameVersionData",
|
||||
"params": [
|
||||
{ "paramname":"handle", "paramtype":"UGCQueryHandle_t" },
|
||||
{ "paramname":"index", "paramtype":"uint32" },
|
||||
{ "paramname":"versionIndex", "paramtype":"uint32" },
|
||||
{
|
||||
"out_string_count": "cchGameBranchSize",
|
||||
"paramname": "pchGameBranchMin",
|
||||
"paramtype": "char *"
|
||||
},
|
||||
{
|
||||
"out_string_count": "cchGameBranchSize",
|
||||
"paramname": "pchGameBranchMax",
|
||||
"paramtype": "char *"
|
||||
},
|
||||
{ "paramname":"cchGameBranchSize", "paramtype":"uint32" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "GetQueryUGCContentDescriptors",
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_GetQueryUGCContentDescriptors",
|
||||
@ -10135,6 +10279,15 @@
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "SetAdminQuery",
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_SetAdminQuery",
|
||||
"params": [
|
||||
{ "paramname":"handle", "paramtype":"UGCUpdateHandle_t" },
|
||||
{ "paramname":"bAdminQuery", "paramtype":"bool" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "SetCloudFileNameFilter",
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_SetCloudFileNameFilter",
|
||||
@ -10280,7 +10433,8 @@
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_SetItemTags",
|
||||
"params": [
|
||||
{ "paramname":"updateHandle", "paramtype":"UGCUpdateHandle_t" },
|
||||
{ "paramname":"pTags", "paramtype":"const SteamParamStringArray_t *" }
|
||||
{ "paramname":"pTags", "paramtype":"const SteamParamStringArray_t *" },
|
||||
{ "paramname":"bAllowAdminTags", "paramtype":"bool" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
@ -10404,6 +10558,16 @@
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "SetRequiredGameVersions",
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_SetRequiredGameVersions",
|
||||
"params": [
|
||||
{ "paramname":"handle", "paramtype":"UGCUpdateHandle_t" },
|
||||
{ "paramname":"pszGameBranchMin", "paramtype":"const char *" },
|
||||
{ "paramname":"pszGameBranchMax", "paramtype":"const char *" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"callresult": "SubmitItemUpdateResult_t",
|
||||
"methodname": "SubmitItemUpdate",
|
||||
@ -10653,70 +10817,18 @@
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_GetWorkshopEULAStatus",
|
||||
"params": [],
|
||||
"returntype": "SteamAPICall_t"
|
||||
}
|
||||
],
|
||||
"version_string": "STEAMUGC_INTERFACE_VERSION017"
|
||||
},
|
||||
{
|
||||
"accessors": [
|
||||
{
|
||||
"kind": "user",
|
||||
"name": "SteamAppList",
|
||||
"name_flat": "SteamAPI_SteamAppList_v001"
|
||||
}
|
||||
],
|
||||
"classname": "ISteamAppList",
|
||||
"fields": [],
|
||||
"methods": [
|
||||
{
|
||||
"methodname": "GetNumInstalledApps",
|
||||
"methodname_flat": "SteamAPI_ISteamAppList_GetNumInstalledApps",
|
||||
"params": [],
|
||||
"returntype": "uint32"
|
||||
},
|
||||
{
|
||||
"methodname": "GetInstalledApps",
|
||||
"methodname_flat": "SteamAPI_ISteamAppList_GetInstalledApps",
|
||||
"methodname": "GetUserContentDescriptorPreferences",
|
||||
"methodname_flat": "SteamAPI_ISteamUGC_GetUserContentDescriptorPreferences",
|
||||
"params": [
|
||||
{ "paramname":"pvecAppID", "paramtype":"AppId_t *" },
|
||||
{ "paramname":"unMaxAppIDs", "paramtype":"uint32" }
|
||||
{ "paramname":"pvecDescriptors", "paramtype":"EUGCContentDescriptorID *" },
|
||||
{ "paramname":"cMaxEntries", "paramtype":"uint32" }
|
||||
],
|
||||
"returntype": "uint32"
|
||||
},
|
||||
{
|
||||
"methodname": "GetAppName",
|
||||
"methodname_flat": "SteamAPI_ISteamAppList_GetAppName",
|
||||
"params": [
|
||||
{ "paramname":"nAppID", "paramtype":"AppId_t" },
|
||||
{
|
||||
"out_string": "",
|
||||
"paramname": "pchName",
|
||||
"paramtype": "char *"
|
||||
},
|
||||
{ "paramname":"cchNameMax", "paramtype":"int" }
|
||||
],
|
||||
"returntype": "int"
|
||||
},
|
||||
{
|
||||
"methodname": "GetAppInstallDir",
|
||||
"methodname_flat": "SteamAPI_ISteamAppList_GetAppInstallDir",
|
||||
"params": [
|
||||
{ "paramname":"nAppID", "paramtype":"AppId_t" },
|
||||
{ "paramname":"pchDirectory", "paramtype":"char *" },
|
||||
{ "paramname":"cchNameMax", "paramtype":"int" }
|
||||
],
|
||||
"returntype": "int"
|
||||
},
|
||||
{
|
||||
"methodname": "GetAppBuildId",
|
||||
"methodname_flat": "SteamAPI_ISteamAppList_GetAppBuildId",
|
||||
"params": [
|
||||
{ "paramname":"nAppID", "paramtype":"AppId_t" }
|
||||
],
|
||||
"returntype": "int"
|
||||
}
|
||||
],
|
||||
"version_string": "STEAMAPPLIST_INTERFACE_VERSION001"
|
||||
"version_string": "STEAMUGC_INTERFACE_VERSION020"
|
||||
},
|
||||
{
|
||||
"accessors": [
|
||||
@ -11634,12 +11746,65 @@
|
||||
],
|
||||
"version_string": "STEAMINVENTORY_INTERFACE_V003"
|
||||
},
|
||||
{
|
||||
"accessors": [
|
||||
{
|
||||
"kind": "user",
|
||||
"name": "SteamTimeline",
|
||||
"name_flat": "SteamAPI_SteamTimeline_v001"
|
||||
}
|
||||
],
|
||||
"classname": "ISteamTimeline",
|
||||
"fields": [],
|
||||
"methods": [
|
||||
{
|
||||
"methodname": "SetTimelineStateDescription",
|
||||
"methodname_flat": "SteamAPI_ISteamTimeline_SetTimelineStateDescription",
|
||||
"params": [
|
||||
{ "paramname":"pchDescription", "paramtype":"const char *" },
|
||||
{ "paramname":"flTimeDelta", "paramtype":"float" }
|
||||
],
|
||||
"returntype": "void"
|
||||
},
|
||||
{
|
||||
"methodname": "ClearTimelineStateDescription",
|
||||
"methodname_flat": "SteamAPI_ISteamTimeline_ClearTimelineStateDescription",
|
||||
"params": [
|
||||
{ "paramname":"flTimeDelta", "paramtype":"float" }
|
||||
],
|
||||
"returntype": "void"
|
||||
},
|
||||
{
|
||||
"methodname": "AddTimelineEvent",
|
||||
"methodname_flat": "SteamAPI_ISteamTimeline_AddTimelineEvent",
|
||||
"params": [
|
||||
{ "paramname":"pchIcon", "paramtype":"const char *" },
|
||||
{ "paramname":"pchTitle", "paramtype":"const char *" },
|
||||
{ "paramname":"pchDescription", "paramtype":"const char *" },
|
||||
{ "paramname":"unPriority", "paramtype":"uint32" },
|
||||
{ "paramname":"flStartOffsetSeconds", "paramtype":"float" },
|
||||
{ "paramname":"flDurationSeconds", "paramtype":"float" },
|
||||
{ "paramname":"ePossibleClip", "paramtype":"ETimelineEventClipPriority" }
|
||||
],
|
||||
"returntype": "void"
|
||||
},
|
||||
{
|
||||
"methodname": "SetTimelineGameMode",
|
||||
"methodname_flat": "SteamAPI_ISteamTimeline_SetTimelineGameMode",
|
||||
"params": [
|
||||
{ "paramname":"eMode", "paramtype":"ETimelineGameMode" }
|
||||
],
|
||||
"returntype": "void"
|
||||
}
|
||||
],
|
||||
"version_string": "STEAMTIMELINE_INTERFACE_V001"
|
||||
},
|
||||
{
|
||||
"accessors": [
|
||||
{
|
||||
"kind": "user",
|
||||
"name": "SteamVideo",
|
||||
"name_flat": "SteamAPI_SteamVideo_v002"
|
||||
"name_flat": "SteamAPI_SteamVideo_v007"
|
||||
}
|
||||
],
|
||||
"classname": "ISteamVideo",
|
||||
@ -11681,7 +11846,7 @@
|
||||
"returntype": "bool"
|
||||
}
|
||||
],
|
||||
"version_string": "STEAMVIDEO_INTERFACE_V002"
|
||||
"version_string": "STEAMVIDEO_INTERFACE_V007"
|
||||
},
|
||||
{
|
||||
"accessors": [
|
||||
@ -11746,7 +11911,7 @@
|
||||
{
|
||||
"kind": "user",
|
||||
"name": "SteamRemotePlay",
|
||||
"name_flat": "SteamAPI_SteamRemotePlay_v001"
|
||||
"name_flat": "SteamAPI_SteamRemotePlay_v002"
|
||||
}
|
||||
],
|
||||
"classname": "ISteamRemotePlay",
|
||||
@ -11801,6 +11966,14 @@
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "BStartRemotePlayTogether",
|
||||
"methodname_flat": "SteamAPI_ISteamRemotePlay_BStartRemotePlayTogether",
|
||||
"params": [
|
||||
{ "paramname":"bShowOverlay", "paramtype":"bool" }
|
||||
],
|
||||
"returntype": "bool"
|
||||
},
|
||||
{
|
||||
"methodname": "BSendRemotePlayTogetherInvite",
|
||||
"methodname_flat": "SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite",
|
||||
@ -11810,7 +11983,7 @@
|
||||
"returntype": "bool"
|
||||
}
|
||||
],
|
||||
"version_string": "STEAMREMOTEPLAY_INTERFACE_VERSION001"
|
||||
"version_string": "STEAMREMOTEPLAY_INTERFACE_VERSION002"
|
||||
},
|
||||
{
|
||||
"accessors": [
|
||||
@ -13476,29 +13649,6 @@
|
||||
],
|
||||
"struct": "InputMotionData_t"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{ "fieldname":"driftCorrectedQuatX", "fieldtype":"float" },
|
||||
{ "fieldname":"driftCorrectedQuatY", "fieldtype":"float" },
|
||||
{ "fieldname":"driftCorrectedQuatZ", "fieldtype":"float" },
|
||||
{ "fieldname":"driftCorrectedQuatW", "fieldtype":"float" },
|
||||
{ "fieldname":"sensorFusionQuatX", "fieldtype":"float" },
|
||||
{ "fieldname":"sensorFusionQuatY", "fieldtype":"float" },
|
||||
{ "fieldname":"sensorFusionQuatZ", "fieldtype":"float" },
|
||||
{ "fieldname":"sensorFusionQuatW", "fieldtype":"float" },
|
||||
{ "fieldname":"deferredSensorFusionQuatX", "fieldtype":"float" },
|
||||
{ "fieldname":"deferredSensorFusionQuatY", "fieldtype":"float" },
|
||||
{ "fieldname":"deferredSensorFusionQuatZ", "fieldtype":"float" },
|
||||
{ "fieldname":"deferredSensorFusionQuatW", "fieldtype":"float" },
|
||||
{ "fieldname":"gravityX", "fieldtype":"float" },
|
||||
{ "fieldname":"gravityY", "fieldtype":"float" },
|
||||
{ "fieldname":"gravityZ", "fieldtype":"float" },
|
||||
{ "fieldname":"degreesPerSecondX", "fieldtype":"float" },
|
||||
{ "fieldname":"degreesPerSecondY", "fieldtype":"float" },
|
||||
{ "fieldname":"degreesPerSecondZ", "fieldtype":"float" }
|
||||
],
|
||||
"struct": "InputMotionDataV2_t"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{ "fieldname":"controllerHandle", "fieldtype":"InputHandle_t" },
|
||||
@ -13534,7 +13684,8 @@
|
||||
{ "fieldname":"m_unVotesUp", "fieldtype":"uint32" },
|
||||
{ "fieldname":"m_unVotesDown", "fieldtype":"uint32" },
|
||||
{ "fieldname":"m_flScore", "fieldtype":"float" },
|
||||
{ "fieldname":"m_unNumChildren", "fieldtype":"uint32" }
|
||||
{ "fieldname":"m_unNumChildren", "fieldtype":"uint32" },
|
||||
{ "fieldname":"m_ulTotalFilesSize", "fieldtype":"uint64" }
|
||||
],
|
||||
"struct": "SteamUGCDetails_t"
|
||||
},
|
||||
@ -14063,6 +14214,7 @@
|
||||
{ "typedef":"PFNPreMinidumpCallback", "type":"void (*)(void *)" },
|
||||
{ "typedef":"HSteamPipe", "type":"int" },
|
||||
{ "typedef":"HSteamUser", "type":"int" },
|
||||
{ "typedef":"SteamErrMsg", "type":"char [1024]" },
|
||||
{ "typedef":"FriendsGroupID_t", "type":"short" },
|
||||
{ "typedef":"HServerListRequest", "type":"void *" },
|
||||
{ "typedef":"HServerQuery", "type":"int" },
|
||||
|
@ -10,8 +10,8 @@
|
||||
#ifndef STEAM_API_COMMON_H
|
||||
#define STEAM_API_COMMON_H
|
||||
|
||||
#include "steamclientpublic.h"
|
||||
#include "steamtypes.h"
|
||||
#include "steamclientpublic.h"
|
||||
|
||||
// S_API defines the linkage and calling conventions for steam_api.dll exports
|
||||
#if defined( _WIN32 ) && !defined( _X360 )
|
||||
@ -36,14 +36,18 @@
|
||||
#endif // STEAM_API_EXPORTS
|
||||
#endif
|
||||
|
||||
#if defined( __cplusplus ) && ( __cplusplus >= 201103L )
|
||||
#define S_OVERRIDE override
|
||||
#else
|
||||
#define S_OVERRIDE
|
||||
#endif
|
||||
|
||||
#if ( defined(STEAM_API_EXPORTS) || defined(STEAM_API_NODLL) ) && !defined(API_GEN)
|
||||
#define STEAM_PRIVATE_API( ... ) __VA_ARGS__
|
||||
#elif defined(STEAM_API_EXPORTS) && defined(API_GEN)
|
||||
#define STEAM_PRIVATE_API( ... )
|
||||
#else
|
||||
#define STEAM_PRIVATE_API(...) \
|
||||
protected: \
|
||||
__VA_ARGS__ public:
|
||||
#define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public:
|
||||
#endif
|
||||
|
||||
// handle to a communication pipe to the Steam client
|
||||
@ -51,6 +55,11 @@ typedef int32 HSteamPipe;
|
||||
// handle to single instance of a steam user
|
||||
typedef int32 HSteamUser;
|
||||
|
||||
// A fixed size buffer to receive an error message that is returned by some API
|
||||
// calls.
|
||||
const int k_cchMaxSteamErrMsg = 1024;
|
||||
typedef char SteamErrMsg[ k_cchMaxSteamErrMsg ];
|
||||
|
||||
// #define away __cdecl on posix.
|
||||
// This is really, really bad. We're sorry. But it's been this way for
|
||||
// a long time now and it's scary to change it, as there may be others that
|
||||
@ -109,8 +118,7 @@ S_API void S_CALLTYPE SteamAPI_RunCallbacks();
|
||||
// Declares a callback function and a named CCallbackManual variable which
|
||||
// has Register and Unregister functions instead of automatic registration.
|
||||
#define STEAM_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \
|
||||
CCallbackManual<thisclass, callback_type> var; \
|
||||
void func(callback_type* pParam)
|
||||
CCallbackManual< thisclass, callback_type > var; void func( callback_type *pParam )
|
||||
|
||||
// Dispatch callbacks relevant to the gameserver client and interfaces.
|
||||
// To register for these, you need to use STEAM_GAMESERVER_CALLBACK.
|
||||
@ -122,19 +130,15 @@ S_API void S_CALLTYPE SteamGameServer_RunCallbacks();
|
||||
#define STEAM_GAMESERVER_CALLBACK( thisclass, func, /*callback_type, [deprecated] var*/... ) \
|
||||
_STEAM_CALLBACK_SELECT( ( __VA_ARGS__, GS, 3 ), ( this->SetGameserverFlag();, thisclass, func, __VA_ARGS__ ) )
|
||||
#define STEAM_GAMESERVER_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \
|
||||
CCallbackManual<thisclass, callback_type, true> var; \
|
||||
void func(callback_type* pParam)
|
||||
CCallbackManual< thisclass, callback_type, true > var; void func( callback_type *pParam )
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: base for callbacks and call results - internal implementation detail
|
||||
//-----------------------------------------------------------------------------
|
||||
class CCallbackBase {
|
||||
public:
|
||||
CCallbackBase()
|
||||
class CCallbackBase
|
||||
{
|
||||
m_nCallbackFlags = 0;
|
||||
m_iCallback = 0;
|
||||
}
|
||||
public:
|
||||
CCallbackBase() { m_nCallbackFlags = 0; m_iCallback = 0; }
|
||||
// don't add a virtual destructor because we export this binary interface across dll's
|
||||
virtual void Run( void *pvParam ) = 0;
|
||||
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) = 0;
|
||||
@ -142,8 +146,7 @@ public:
|
||||
virtual int GetCallbackSizeBytes() = 0;
|
||||
|
||||
protected:
|
||||
enum { k_ECallbackFlagsRegistered = 0x01,
|
||||
k_ECallbackFlagsGameServer = 0x02 };
|
||||
enum { k_ECallbackFlagsRegistered = 0x01, k_ECallbackFlagsGameServer = 0x02 };
|
||||
uint8 m_nCallbackFlags;
|
||||
int m_iCallback;
|
||||
friend class CCallbackMgr;
|
||||
@ -157,28 +160,27 @@ private:
|
||||
// Purpose: templated base for callbacks - internal implementation detail
|
||||
//-----------------------------------------------------------------------------
|
||||
template< int sizeof_P >
|
||||
class CCallbackImpl : protected CCallbackBase {
|
||||
public:
|
||||
virtual ~CCallbackImpl()
|
||||
class CCallbackImpl : protected CCallbackBase
|
||||
{
|
||||
if (m_nCallbackFlags & k_ECallbackFlagsRegistered)
|
||||
SteamAPI_UnregisterCallback(this);
|
||||
}
|
||||
public:
|
||||
virtual ~CCallbackImpl() { if ( m_nCallbackFlags & k_ECallbackFlagsRegistered ) SteamAPI_UnregisterCallback( this ); }
|
||||
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
|
||||
|
||||
protected:
|
||||
friend class CCallbackMgr;
|
||||
virtual void Run(void* pvParam) = 0;
|
||||
virtual void Run(void* pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/) { Run(pvParam); }
|
||||
virtual int GetCallbackSizeBytes() { return sizeof_P; }
|
||||
virtual void Run( void *pvParam ) S_OVERRIDE = 0;
|
||||
virtual void Run( void *pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/ ) S_OVERRIDE { Run( pvParam ); }
|
||||
virtual int GetCallbackSizeBytes() S_OVERRIDE { return sizeof_P; }
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: maps a steam async call result to a class member function
|
||||
// template params: T = local class, P = parameter struct
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P >
|
||||
class CCallResult : private CCallbackBase {
|
||||
class CCallResult : private CCallbackBase
|
||||
{
|
||||
public:
|
||||
typedef void (T::*func_t)( P*, bool );
|
||||
|
||||
@ -190,24 +192,26 @@ public:
|
||||
void Cancel();
|
||||
|
||||
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
|
||||
|
||||
private:
|
||||
virtual void Run(void* pvParam);
|
||||
virtual void Run(void* pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall);
|
||||
virtual int GetCallbackSizeBytes() { return sizeof(P); }
|
||||
virtual void Run( void *pvParam ) S_OVERRIDE;
|
||||
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) S_OVERRIDE;
|
||||
virtual int GetCallbackSizeBytes() S_OVERRIDE { return sizeof( P ); }
|
||||
|
||||
SteamAPICall_t m_hAPICall;
|
||||
T *m_pObj;
|
||||
func_t m_Func;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: maps a steam callback to a class member function
|
||||
// template params: T = local class, P = parameter struct,
|
||||
// bGameserver = listen for gameserver callbacks instead of client callbacks
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P, bool bGameserver = false >
|
||||
class CCallback : public CCallbackImpl<sizeof(P)> {
|
||||
class CCallback : public CCallbackImpl< sizeof( P ) >
|
||||
{
|
||||
public:
|
||||
typedef void (T::*func_t)(P*);
|
||||
|
||||
@ -219,23 +223,22 @@ public:
|
||||
void Unregister();
|
||||
|
||||
protected:
|
||||
virtual void Run(void* pvParam);
|
||||
virtual void Run( void *pvParam ) S_OVERRIDE;
|
||||
|
||||
T *m_pObj;
|
||||
func_t m_Func;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: subclass of CCallback which allows default-construction in
|
||||
// an unregistered state; you must call Register manually
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P, bool bGameServer = false >
|
||||
class CCallbackManual : public CCallback<T, P, bGameServer> {
|
||||
public:
|
||||
CCallbackManual()
|
||||
: CCallback<T, P, bGameServer>(nullptr, nullptr)
|
||||
class CCallbackManual : public CCallback< T, P, bGameServer >
|
||||
{
|
||||
}
|
||||
public:
|
||||
CCallbackManual() : CCallback< T, P, bGameServer >( nullptr, nullptr ) {}
|
||||
|
||||
// Inherits public Register and Unregister functions from base class
|
||||
};
|
||||
|
@ -8,13 +8,15 @@
|
||||
#ifndef STEAMAPIFLAT_H
|
||||
#define STEAMAPIFLAT_H
|
||||
|
||||
#include "steam/steam_api.h"
|
||||
#include "steam/isteamgameserver.h"
|
||||
#include "steam/isteamgameserverstats.h"
|
||||
#include "steam/steam_api.h"
|
||||
|
||||
typedef uint64 uint64_steamid; // Used when passing or returning CSteamID
|
||||
typedef uint64 uint64_gameid; // Used when passing or return CGameID
|
||||
|
||||
|
||||
|
||||
// ISteamClient
|
||||
S_API HSteamPipe SteamAPI_ISteamClient_CreateSteamPipe( ISteamClient* self );
|
||||
S_API bool SteamAPI_ISteamClient_BReleaseSteamPipe( ISteamClient* self, HSteamPipe hSteamPipe );
|
||||
@ -42,7 +44,6 @@ S_API bool SteamAPI_ISteamClient_BShutdownIfAllPipesClosed(ISteamClient* self);
|
||||
S_API ISteamHTTP * SteamAPI_ISteamClient_GetISteamHTTP( ISteamClient* self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion );
|
||||
S_API ISteamController * SteamAPI_ISteamClient_GetISteamController( ISteamClient* self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion );
|
||||
S_API ISteamUGC * SteamAPI_ISteamClient_GetISteamUGC( ISteamClient* self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion );
|
||||
S_API ISteamAppList* SteamAPI_ISteamClient_GetISteamAppList(ISteamClient* self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion);
|
||||
S_API ISteamMusic * SteamAPI_ISteamClient_GetISteamMusic( ISteamClient* self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion );
|
||||
S_API ISteamMusicRemote * SteamAPI_ISteamClient_GetISteamMusicRemote( ISteamClient* self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion );
|
||||
S_API ISteamHTMLSurface * SteamAPI_ISteamClient_GetISteamHTMLSurface( ISteamClient* self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion );
|
||||
@ -56,9 +57,9 @@ S_API ISteamRemotePlay* SteamAPI_ISteamClient_GetISteamRemotePlay(ISteamClient*
|
||||
// ISteamUser
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamUser* SteamAPI_SteamUser_v022();
|
||||
S_API ISteamUser *SteamAPI_SteamUser_v023();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamUser(), but using this ensures that you are using a matching library.
|
||||
inline ISteamUser* SteamAPI_SteamUser() { return SteamAPI_SteamUser_v022(); }
|
||||
inline ISteamUser *SteamAPI_SteamUser() { return SteamAPI_SteamUser_v023(); }
|
||||
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 );
|
||||
@ -73,6 +74,7 @@ S_API EVoiceResult SteamAPI_ISteamUser_GetVoice(ISteamUser* self, bool bWantComp
|
||||
S_API EVoiceResult SteamAPI_ISteamUser_DecompressVoice( ISteamUser* self, const void * pCompressed, uint32 cbCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, uint32 nDesiredSampleRate );
|
||||
S_API uint32 SteamAPI_ISteamUser_GetVoiceOptimalSampleRate( ISteamUser* self );
|
||||
S_API HAuthTicket SteamAPI_ISteamUser_GetAuthSessionTicket( ISteamUser* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket, const SteamNetworkingIdentity * pSteamNetworkingIdentity );
|
||||
S_API HAuthTicket SteamAPI_ISteamUser_GetAuthTicketForWebApi( ISteamUser* self, const char * pchIdentity );
|
||||
S_API EBeginAuthSessionResult SteamAPI_ISteamUser_BeginAuthSession( ISteamUser* self, const void * pAuthTicket, int cbAuthTicket, uint64_steamid steamID );
|
||||
S_API void SteamAPI_ISteamUser_EndAuthSession( ISteamUser* self, uint64_steamid steamID );
|
||||
S_API void SteamAPI_ISteamUser_CancelAuthTicket( ISteamUser* self, HAuthTicket hAuthTicket );
|
||||
@ -226,6 +228,7 @@ S_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck(ISteamUtils* self);
|
||||
S_API bool SteamAPI_ISteamUtils_ShowFloatingGamepadTextInput( ISteamUtils* self, EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight );
|
||||
S_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode );
|
||||
S_API bool SteamAPI_ISteamUtils_DismissFloatingGamepadTextInput( ISteamUtils* self );
|
||||
S_API bool SteamAPI_ISteamUtils_DismissGamepadTextInput( ISteamUtils* self );
|
||||
|
||||
// ISteamMatchmaking
|
||||
|
||||
@ -509,6 +512,9 @@ S_API int SteamAPI_ISteamApps_GetLaunchCommandLine(ISteamApps* self, char* pszCo
|
||||
S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self );
|
||||
S_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed );
|
||||
S_API bool SteamAPI_ISteamApps_SetDlcContext( ISteamApps* self, AppId_t nAppID );
|
||||
S_API int SteamAPI_ISteamApps_GetNumBetas( ISteamApps* self, AppId_t unAppID, int * pnAvailable, int * pnPrivate );
|
||||
S_API bool SteamAPI_ISteamApps_GetBetaInfo( ISteamApps* self, AppId_t unAppID, int iBetaIndex, uint32 * punFlags, uint32 * punBuildID, char * pchBetaName, int cchBetaName, char * pchDescription, int cchDescription );
|
||||
S_API bool SteamAPI_ISteamApps_SetActiveBeta( ISteamApps* self, AppId_t unAppID, const char * pchBetaName );
|
||||
|
||||
// ISteamNetworking
|
||||
|
||||
@ -751,14 +757,14 @@ S_API bool SteamAPI_ISteamController_GetControllerBindingRevision(ISteamControll
|
||||
// ISteamUGC
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamUGC* SteamAPI_SteamUGC_v017();
|
||||
S_API ISteamUGC *SteamAPI_SteamUGC_v020();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamUGC(), but using this ensures that you are using a matching library.
|
||||
inline ISteamUGC* SteamAPI_SteamUGC() { return SteamAPI_SteamUGC_v017(); }
|
||||
inline ISteamUGC *SteamAPI_SteamUGC() { return SteamAPI_SteamUGC_v020(); }
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamUGC* SteamAPI_SteamGameServerUGC_v017();
|
||||
S_API ISteamUGC *SteamAPI_SteamGameServerUGC_v020();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamGameServerUGC(), but using this ensures that you are using a matching library.
|
||||
inline ISteamUGC* SteamAPI_SteamGameServerUGC() { return SteamAPI_SteamGameServerUGC_v017(); }
|
||||
inline ISteamUGC *SteamAPI_SteamGameServerUGC() { return SteamAPI_SteamGameServerUGC_v020(); }
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor );
|
||||
@ -777,6 +783,8 @@ S_API bool SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview(ISteamUGC* self, UGCQ
|
||||
S_API uint32 SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index );
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char * pchKey, uint32 cchKeySize, char * pchValue, uint32 cchValueSize );
|
||||
S_API bool SteamAPI_ISteamUGC_GetQueryFirstUGCKeyValueTag( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, const char * pchKey, char * pchValue, uint32 cchValueSize );
|
||||
S_API uint32 SteamAPI_ISteamUGC_GetNumSupportedGameVersions( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index );
|
||||
S_API bool SteamAPI_ISteamUGC_GetSupportedGameVersionData( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, uint32 versionIndex, char * pchGameBranchMin, char * pchGameBranchMax, uint32 cchGameBranchSize );
|
||||
S_API uint32 SteamAPI_ISteamUGC_GetQueryUGCContentDescriptors( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, EUGCContentDescriptorID * pvecDescriptors, uint32 cMaxEntries );
|
||||
S_API bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest( ISteamUGC* self, UGCQueryHandle_t handle );
|
||||
S_API bool SteamAPI_ISteamUGC_AddRequiredTag( ISteamUGC* self, UGCQueryHandle_t handle, const char * pTagName );
|
||||
@ -792,6 +800,7 @@ S_API bool SteamAPI_ISteamUGC_SetReturnTotalOnly(ISteamUGC* self, UGCQueryHandle
|
||||
S_API bool SteamAPI_ISteamUGC_SetReturnPlaytimeStats( ISteamUGC* self, UGCQueryHandle_t handle, uint32 unDays );
|
||||
S_API bool SteamAPI_ISteamUGC_SetLanguage( ISteamUGC* self, UGCQueryHandle_t handle, const char * pchLanguage );
|
||||
S_API bool SteamAPI_ISteamUGC_SetAllowCachedResponse( ISteamUGC* self, UGCQueryHandle_t handle, uint32 unMaxAgeSeconds );
|
||||
S_API bool SteamAPI_ISteamUGC_SetAdminQuery( ISteamUGC* self, UGCUpdateHandle_t handle, bool bAdminQuery );
|
||||
S_API bool SteamAPI_ISteamUGC_SetCloudFileNameFilter( ISteamUGC* self, UGCQueryHandle_t handle, const char * pMatchCloudFileName );
|
||||
S_API bool SteamAPI_ISteamUGC_SetMatchAnyTag( ISteamUGC* self, UGCQueryHandle_t handle, bool bMatchAnyTag );
|
||||
S_API bool SteamAPI_ISteamUGC_SetSearchText( ISteamUGC* self, UGCQueryHandle_t handle, const char * pSearchText );
|
||||
@ -807,7 +816,7 @@ S_API bool SteamAPI_ISteamUGC_SetItemDescription(ISteamUGC* self, UGCUpdateHandl
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemUpdateLanguage( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchLanguage );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemMetadata( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchMetaData );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemVisibility( ISteamUGC* self, UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemTags(ISteamUGC* self, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags);
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags, bool bAllowAdminTags );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemContent( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pszContentFolder );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemPreview( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pszPreviewFile );
|
||||
S_API bool SteamAPI_ISteamUGC_SetAllowLegacyUpload( ISteamUGC* self, UGCUpdateHandle_t handle, bool bAllowLegacyUpload );
|
||||
@ -821,6 +830,7 @@ S_API bool SteamAPI_ISteamUGC_UpdateItemPreviewVideo(ISteamUGC* self, UGCUpdateH
|
||||
S_API bool SteamAPI_ISteamUGC_RemoveItemPreview( ISteamUGC* self, UGCUpdateHandle_t handle, uint32 index );
|
||||
S_API bool SteamAPI_ISteamUGC_AddContentDescriptor( ISteamUGC* self, UGCUpdateHandle_t handle, EUGCContentDescriptorID descid );
|
||||
S_API bool SteamAPI_ISteamUGC_RemoveContentDescriptor( ISteamUGC* self, UGCUpdateHandle_t handle, EUGCContentDescriptorID descid );
|
||||
S_API bool SteamAPI_ISteamUGC_SetRequiredGameVersions( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pszGameBranchMin, const char * pszGameBranchMax );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_SubmitItemUpdate( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchChangeNote );
|
||||
S_API EItemUpdateStatus SteamAPI_ISteamUGC_GetItemUpdateProgress( ISteamUGC* self, UGCUpdateHandle_t handle, uint64 * punBytesProcessed, uint64 * punBytesTotal );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_SetUserItemVote( ISteamUGC* self, PublishedFileId_t nPublishedFileID, bool bVoteUp );
|
||||
@ -848,18 +858,7 @@ S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies(ISteamUGC* self, Publ
|
||||
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
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamAppList* SteamAPI_SteamAppList_v001();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamAppList(), but using this ensures that you are using a matching library.
|
||||
inline ISteamAppList* SteamAPI_SteamAppList() { return SteamAPI_SteamAppList_v001(); }
|
||||
S_API uint32 SteamAPI_ISteamAppList_GetNumInstalledApps(ISteamAppList* self);
|
||||
S_API uint32 SteamAPI_ISteamAppList_GetInstalledApps(ISteamAppList* self, AppId_t* pvecAppID, uint32 unMaxAppIDs);
|
||||
S_API int SteamAPI_ISteamAppList_GetAppName(ISteamAppList* self, AppId_t nAppID, char* pchName, int cchNameMax);
|
||||
S_API int SteamAPI_ISteamAppList_GetAppInstallDir(ISteamAppList* self, AppId_t nAppID, char* pchDirectory, int cchNameMax);
|
||||
S_API int SteamAPI_ISteamAppList_GetAppBuildId(ISteamAppList* self, AppId_t nAppID);
|
||||
S_API uint32 SteamAPI_ISteamUGC_GetUserContentDescriptorPreferences( ISteamUGC* self, EUGCContentDescriptorID * pvecDescriptors, uint32 cMaxEntries );
|
||||
|
||||
// ISteamHTMLSurface
|
||||
|
||||
@ -955,12 +954,23 @@ S_API bool SteamAPI_ISteamInventory_SetPropertyFloat(ISteamInventory* self, Stea
|
||||
S_API bool SteamAPI_ISteamInventory_SubmitUpdateProperties( ISteamInventory* self, SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle );
|
||||
S_API bool SteamAPI_ISteamInventory_InspectItem( ISteamInventory* self, SteamInventoryResult_t * pResultHandle, const char * pchItemToken );
|
||||
|
||||
// ISteamTimeline
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamTimeline *SteamAPI_SteamTimeline_v001();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamTimeline(), but using this ensures that you are using a matching library.
|
||||
inline ISteamTimeline *SteamAPI_SteamTimeline() { return SteamAPI_SteamTimeline_v001(); }
|
||||
S_API void SteamAPI_ISteamTimeline_SetTimelineStateDescription( ISteamTimeline* self, const char * pchDescription, float flTimeDelta );
|
||||
S_API void SteamAPI_ISteamTimeline_ClearTimelineStateDescription( ISteamTimeline* self, float flTimeDelta );
|
||||
S_API void SteamAPI_ISteamTimeline_AddTimelineEvent( ISteamTimeline* self, const char * pchIcon, const char * pchTitle, const char * pchDescription, uint32 unPriority, float flStartOffsetSeconds, float flDurationSeconds, ETimelineEventClipPriority ePossibleClip );
|
||||
S_API void SteamAPI_ISteamTimeline_SetTimelineGameMode( ISteamTimeline* self, ETimelineGameMode eMode );
|
||||
|
||||
// ISteamVideo
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamVideo* SteamAPI_SteamVideo_v002();
|
||||
S_API ISteamVideo *SteamAPI_SteamVideo_v007();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamVideo(), but using this ensures that you are using a matching library.
|
||||
inline ISteamVideo* SteamAPI_SteamVideo() { return SteamAPI_SteamVideo_v002(); }
|
||||
inline ISteamVideo *SteamAPI_SteamVideo() { return SteamAPI_SteamVideo_v007(); }
|
||||
S_API void SteamAPI_ISteamVideo_GetVideoURL( ISteamVideo* self, AppId_t unVideoAppID );
|
||||
S_API bool SteamAPI_ISteamVideo_IsBroadcasting( ISteamVideo* self, int * pnNumViewers );
|
||||
S_API void SteamAPI_ISteamVideo_GetOPFSettings( ISteamVideo* self, AppId_t unVideoAppID );
|
||||
@ -982,15 +992,16 @@ S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList(ISteamParentalS
|
||||
// ISteamRemotePlay
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamRemotePlay* SteamAPI_SteamRemotePlay_v001();
|
||||
S_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v002();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamRemotePlay(), but using this ensures that you are using a matching library.
|
||||
inline ISteamRemotePlay* SteamAPI_SteamRemotePlay() { return SteamAPI_SteamRemotePlay_v001(); }
|
||||
inline ISteamRemotePlay *SteamAPI_SteamRemotePlay() { return SteamAPI_SteamRemotePlay_v002(); }
|
||||
S_API uint32 SteamAPI_ISteamRemotePlay_GetSessionCount( ISteamRemotePlay* self );
|
||||
S_API RemotePlaySessionID_t SteamAPI_ISteamRemotePlay_GetSessionID( ISteamRemotePlay* self, int iSessionIndex );
|
||||
S_API uint64_steamid SteamAPI_ISteamRemotePlay_GetSessionSteamID( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
|
||||
S_API const char * SteamAPI_ISteamRemotePlay_GetSessionClientName( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
|
||||
S_API ESteamDeviceFormFactor SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
|
||||
S_API bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID, int * pnResolutionX, int * pnResolutionY );
|
||||
S_API bool SteamAPI_ISteamRemotePlay_BStartRemotePlayTogether( ISteamRemotePlay* self, bool bShowOverlay );
|
||||
S_API bool SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite( ISteamRemotePlay* self, uint64_steamid steamIDFriend );
|
||||
|
||||
// ISteamNetworkingMessages
|
||||
|
@ -31,13 +31,9 @@ S_API void* S_CALLTYPE SteamInternal_FindOrCreateGameServerInterface(HSteamUser
|
||||
// struct { void (*pFn)(void* pCtx); uintptr_t counter; void *ptr; }
|
||||
// Do not change layout or add non-pointer aligned data!
|
||||
#define STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, expr, kind, version ) \
|
||||
inline void S_CALLTYPE SteamInternal_Init_##name(type* p) \
|
||||
{ \
|
||||
*p = (type)(expr); \
|
||||
} \
|
||||
inline void S_CALLTYPE SteamInternal_Init_ ## name( type *p ) { *p = (type)( expr ); } \
|
||||
STEAM_CLANG_ATTR( "interface_accessor_kind:" kind ";interface_accessor_version:" version ";" ) \
|
||||
inline type name() \
|
||||
{ \
|
||||
inline type name() { \
|
||||
static void* s_CallbackCounterAndContext[ 3 ] = { (void*)&SteamInternal_Init_ ## name, 0, 0 }; \
|
||||
return *(type*)SteamInternal_ContextInit( s_CallbackCounterAndContext ); \
|
||||
}
|
||||
@ -58,39 +54,24 @@ S_API void S_CALLTYPE SteamAPI_UnregisterCallback(class CCallbackBase* pCallback
|
||||
S_API void S_CALLTYPE SteamAPI_RegisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
|
||||
S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
|
||||
|
||||
#define _STEAM_CALLBACK_OFFSETOF( type, member ) ( (size_t)( (char *)&( (type *)0 )->member ) )
|
||||
#define _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param )
|
||||
#define _STEAM_CALLBACK_HELPER( _1, _2, SELECTED, ... ) _STEAM_CALLBACK_##SELECTED
|
||||
#define _STEAM_CALLBACK_SELECT( X, Y ) _STEAM_CALLBACK_HELPER X Y
|
||||
#define _STEAM_CALLBACK_3( extra_code, thisclass, func, param ) \
|
||||
struct CCallbackInternal_ ## func : private CCallbackImpl< sizeof( param ) > { \
|
||||
CCallbackInternal_##func() \
|
||||
{ \
|
||||
extra_code SteamAPI_RegisterCallback(this, param::k_iCallback); \
|
||||
} \
|
||||
CCallbackInternal_##func(const CCallbackInternal_##func&) \
|
||||
{ \
|
||||
extra_code SteamAPI_RegisterCallback(this, param::k_iCallback); \
|
||||
} \
|
||||
CCallbackInternal_##func& operator=(const CCallbackInternal_##func&) \
|
||||
{ \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
virtual void Run(void* pvParam) \
|
||||
{ \
|
||||
_STEAM_CALLBACK_AUTO_HOOK(thisclass, func, param) \
|
||||
thisclass* pOuter = reinterpret_cast<thisclass*>(reinterpret_cast<char*>(this) - offsetof(thisclass, m_steamcallback_##func)); \
|
||||
CCallbackInternal_ ## func () { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func ( const CCallbackInternal_ ## func & ) { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func & operator=( const CCallbackInternal_ ## func & ) { return *this; } \
|
||||
private: virtual void Run( void *pvParam ) S_OVERRIDE { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \
|
||||
thisclass *pOuter = reinterpret_cast<thisclass*>( reinterpret_cast<char*>(this) - _STEAM_CALLBACK_OFFSETOF( thisclass, m_steamcallback_ ## func ) ); \
|
||||
pOuter->func( reinterpret_cast<param*>( pvParam ) ); \
|
||||
} \
|
||||
} m_steamcallback_##func; \
|
||||
void func(param* pParam)
|
||||
} m_steamcallback_ ## func ; void func( param *pParam )
|
||||
#define _STEAM_CALLBACK_4( _, thisclass, func, param, var ) \
|
||||
CCallback<thisclass, param> var; \
|
||||
void func(param* pParam)
|
||||
CCallback< thisclass, param > var; void func( param *pParam )
|
||||
#define _STEAM_CALLBACK_GS( _, thisclass, func, param, var ) \
|
||||
CCallback<thisclass, param, true> var; \
|
||||
void func(param* pParam)
|
||||
CCallback< thisclass, param, true > var; void func( param *pParam )
|
||||
|
||||
#ifndef API_GEN
|
||||
|
||||
@ -126,7 +107,8 @@ inline bool CCallResult<T, P>::IsActive() const
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Cancel()
|
||||
{
|
||||
if (m_hAPICall != k_uAPICallInvalid) {
|
||||
if ( m_hAPICall != k_uAPICallInvalid )
|
||||
{
|
||||
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
||||
m_hAPICall = k_uAPICallInvalid;
|
||||
}
|
||||
@ -148,7 +130,8 @@ inline void CCallResult<T, P>::Run(void* pvParam)
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )
|
||||
{
|
||||
if (hSteamAPICall == m_hAPICall) {
|
||||
if ( hSteamAPICall == m_hAPICall )
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||
(m_pObj->*m_Func)((P *)pvParam, bIOFailure);
|
||||
}
|
||||
@ -156,10 +139,10 @@ inline void CCallResult<T, P>::Run(void* pvParam, bool bIOFailure, SteamAPICall_
|
||||
|
||||
template< class T, class P, bool bGameserver >
|
||||
inline CCallback< T, P, bGameserver >::CCallback( T *pObj, func_t func )
|
||||
: m_pObj(nullptr)
|
||||
, m_Func(nullptr)
|
||||
: m_pObj( nullptr ), m_Func( nullptr )
|
||||
{
|
||||
if ( bGameserver )
|
||||
{
|
||||
if (bGameserver) {
|
||||
this->SetGameserverFlag();
|
||||
}
|
||||
Register( pObj, func );
|
||||
@ -206,7 +189,8 @@ inline void CCallback<T, P, bGameserver>::Run(void* pvParam)
|
||||
#endif
|
||||
|
||||
/// Internal structure used in manual callback dispatch
|
||||
struct CallbackMsg_t {
|
||||
struct CallbackMsg_t
|
||||
{
|
||||
HSteamUser m_hSteamUser; // Specific user to whom this callback applies.
|
||||
int m_iCallback; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.)
|
||||
uint8 *m_pubParam; // Points to the callback structure
|
||||
@ -218,14 +202,10 @@ struct CallbackMsg_t {
|
||||
#ifdef STEAM_CALLBACK_INSPECTION_ENABLED
|
||||
#include "../../clientdll/steam_api_callback_inspection.h"
|
||||
#else
|
||||
#define STEAM_CALLBACK_BEGIN(callbackname, callbackid) \
|
||||
struct callbackname { \
|
||||
enum { k_iCallback = callbackid };
|
||||
#define STEAM_CALLBACK_BEGIN( callbackname, callbackid ) struct callbackname { enum { k_iCallback = callbackid };
|
||||
#define STEAM_CALLBACK_MEMBER( varidx, vartype, varname ) vartype varname ;
|
||||
#define STEAM_CALLBACK_MEMBER_ARRAY( varidx, vartype, varname, varcount ) vartype varname [ varcount ];
|
||||
#define STEAM_CALLBACK_END(nArgs) \
|
||||
} \
|
||||
;
|
||||
#define STEAM_CALLBACK_END(nArgs) };
|
||||
#endif
|
||||
|
||||
// Forward declare all of the Steam interfaces. (Do we really need to do this?)
|
||||
@ -249,7 +229,6 @@ class ISteamPS3OverlayRender;
|
||||
class ISteamHTTP;
|
||||
class ISteamController;
|
||||
class ISteamUGC;
|
||||
class ISteamAppList;
|
||||
class ISteamHTMLSurface;
|
||||
class ISteamInventory;
|
||||
class ISteamVideo;
|
||||
@ -292,7 +271,6 @@ enum { k_iSteamStreamLauncherCallbacks = 2600 };
|
||||
enum { k_iSteamControllerCallbacks = 2800 };
|
||||
enum { k_iSteamUGCCallbacks = 3400 };
|
||||
enum { k_iSteamStreamClientCallbacks = 3500 };
|
||||
enum { k_iSteamAppListCallbacks = 3900 };
|
||||
enum { k_iSteamMusicCallbacks = 4000 };
|
||||
enum { k_iSteamMusicRemoteCallbacks = 4100 };
|
||||
enum { k_iSteamGameNotificationCallbacks = 4400 };
|
||||
@ -305,6 +283,7 @@ enum { k_iSteamPartiesCallbacks = 5300 };
|
||||
enum { k_iSteamSTARCallbacks = 5500 };
|
||||
enum { k_iSteamRemotePlayCallbacks = 5700 };
|
||||
enum { k_iSteamChatCallbacks = 5900 };
|
||||
enum { k_iSteamTimelineCallbacks = 6000 };
|
||||
// NOTE: Internal "IClientXxx" callback IDs go in clientenums.h
|
||||
|
||||
// Macros used to annotate various Steamworks interfaces to generate the
|
||||
@ -329,68 +308,8 @@ enum { k_iSteamChatCallbacks = 5900 };
|
||||
#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.
|
||||
//
|
||||
// DEPRECATED: Used the global interface accessors instead!
|
||||
//
|
||||
// This will be removed in a future iteration of the SDK
|
||||
class CSteamAPIContext {
|
||||
public:
|
||||
CSteamAPIContext() { Clear(); }
|
||||
inline void Clear() { memset(this, 0, sizeof(*this)); }
|
||||
inline bool Init(); // NOTE: This is defined in steam_api.h, to avoid this file having to include everything
|
||||
ISteamClient* SteamClient() const { return m_pSteamClient; }
|
||||
ISteamUser* SteamUser() const { return m_pSteamUser; }
|
||||
ISteamFriends* SteamFriends() const { return m_pSteamFriends; }
|
||||
ISteamUtils* SteamUtils() const { return m_pSteamUtils; }
|
||||
ISteamMatchmaking* SteamMatchmaking() const { return m_pSteamMatchmaking; }
|
||||
ISteamGameSearch* SteamGameSearch() const { return m_pSteamGameSearch; }
|
||||
ISteamUserStats* SteamUserStats() const { return m_pSteamUserStats; }
|
||||
ISteamApps* SteamApps() const { return m_pSteamApps; }
|
||||
ISteamMatchmakingServers* SteamMatchmakingServers() const { return m_pSteamMatchmakingServers; }
|
||||
ISteamNetworking* SteamNetworking() const { return m_pSteamNetworking; }
|
||||
ISteamRemoteStorage* SteamRemoteStorage() const { return m_pSteamRemoteStorage; }
|
||||
ISteamScreenshots* SteamScreenshots() const { return m_pSteamScreenshots; }
|
||||
ISteamHTTP* SteamHTTP() const { return m_pSteamHTTP; }
|
||||
ISteamController* SteamController() const { return m_pController; }
|
||||
ISteamUGC* SteamUGC() const { return m_pSteamUGC; }
|
||||
ISteamAppList* SteamAppList() const { return m_pSteamAppList; }
|
||||
ISteamMusic* SteamMusic() const { return m_pSteamMusic; }
|
||||
ISteamMusicRemote* SteamMusicRemote() const { return m_pSteamMusicRemote; }
|
||||
ISteamHTMLSurface* SteamHTMLSurface() const { return m_pSteamHTMLSurface; }
|
||||
ISteamInventory* SteamInventory() const { return m_pSteamInventory; }
|
||||
ISteamVideo* SteamVideo() const { return m_pSteamVideo; }
|
||||
ISteamParentalSettings* SteamParentalSettings() const { return m_pSteamParentalSettings; }
|
||||
ISteamInput* SteamInput() const { return m_pSteamInput; }
|
||||
|
||||
private:
|
||||
ISteamClient* m_pSteamClient;
|
||||
ISteamUser* m_pSteamUser;
|
||||
ISteamFriends* m_pSteamFriends;
|
||||
ISteamUtils* m_pSteamUtils;
|
||||
ISteamMatchmaking* m_pSteamMatchmaking;
|
||||
ISteamGameSearch* m_pSteamGameSearch;
|
||||
ISteamUserStats* m_pSteamUserStats;
|
||||
ISteamApps* m_pSteamApps;
|
||||
ISteamMatchmakingServers* m_pSteamMatchmakingServers;
|
||||
ISteamNetworking* m_pSteamNetworking;
|
||||
ISteamRemoteStorage* m_pSteamRemoteStorage;
|
||||
ISteamScreenshots* m_pSteamScreenshots;
|
||||
ISteamHTTP* m_pSteamHTTP;
|
||||
ISteamController* m_pController;
|
||||
ISteamUGC* m_pSteamUGC;
|
||||
ISteamAppList* m_pSteamAppList;
|
||||
ISteamMusic* m_pSteamMusic;
|
||||
ISteamMusicRemote* m_pSteamMusicRemote;
|
||||
ISteamHTMLSurface* m_pSteamHTMLSurface;
|
||||
ISteamInventory* m_pSteamInventory;
|
||||
ISteamVideo* m_pSteamVideo;
|
||||
ISteamParentalSettings* m_pSteamParentalSettings;
|
||||
ISteamInput* m_pSteamInput;
|
||||
};
|
||||
|
||||
class CSteamGameServerAPIContext {
|
||||
class CSteamGameServerAPIContext
|
||||
{
|
||||
public:
|
||||
CSteamGameServerAPIContext() { Clear(); }
|
||||
inline void Clear() { memset( this, 0, sizeof(*this) ); }
|
||||
@ -415,3 +334,5 @@ private:
|
||||
ISteamInventory *m_pSteamInventory;
|
||||
ISteamUGC *m_pSteamUGC;
|
||||
};
|
||||
|
||||
|
||||
|
@ -10,11 +10,12 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api.h"
|
||||
#include "isteamgameserver.h"
|
||||
#include "isteamgameserverstats.h"
|
||||
#include "steam_api.h"
|
||||
|
||||
enum EServerMode {
|
||||
enum EServerMode
|
||||
{
|
||||
eServerModeInvalid = 0, // DO NOT USE
|
||||
eServerModeNoAuthentication = 1, // Don't authenticate user logins and don't list on the server list
|
||||
eServerModeAuthentication = 2, // Authenticate users, list on the server list, don't run VAC on clients that connect
|
||||
@ -47,7 +48,17 @@ const uint16 MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = STEAMGAMESERVER_QUERY_
|
||||
// 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);
|
||||
//
|
||||
// On success k_ESteamAPIInitResult_OK is returned. Otherwise, if pOutErrMsg is non-NULL,
|
||||
// it will receive a non-localized message that explains the reason for the failure
|
||||
inline ESteamAPIInitResult SteamGameServer_InitEx( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, SteamErrMsg *pOutErrMsg );
|
||||
|
||||
// This function is included for compatibility with older SDK.
|
||||
// You can use it if you don't care about decent error handling
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString )
|
||||
{
|
||||
return SteamGameServer_InitEx( unIP, usGamePort, usQueryPort, eServerMode, pchVersionString, NULL ) == k_ESteamAPIInitResult_OK;
|
||||
}
|
||||
|
||||
// Shutdown SteamGameSeverXxx interfaces, log out, and free resources.
|
||||
S_API void SteamGameServer_Shutdown();
|
||||
@ -100,13 +111,23 @@ inline bool CSteamGameServerAPIContext::Init()
|
||||
}
|
||||
#endif
|
||||
|
||||
S_API bool S_CALLTYPE SteamInternal_GameServer_Init(uint32 unIP, uint16 usLegacySteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char* pchVersionString);
|
||||
inline bool SteamGameServer_Init(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char* pchVersionString)
|
||||
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_GameServer_Init_V2( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
|
||||
inline ESteamAPIInitResult SteamGameServer_InitEx( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, SteamErrMsg *pOutErrMsg )
|
||||
{
|
||||
if (!SteamInternal_GameServer_Init(unIP, 0, usGamePort, usQueryPort, eServerMode, pchVersionString))
|
||||
return false;
|
||||
const char *pszInternalCheckInterfaceVersions =
|
||||
STEAMUTILS_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"
|
||||
|
||||
return true;
|
||||
STEAMGAMESERVER_INTERFACE_VERSION "\0"
|
||||
STEAMGAMESERVERSTATS_INTERFACE_VERSION "\0"
|
||||
STEAMHTTP_INTERFACE_VERSION "\0"
|
||||
STEAMINVENTORY_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKING_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
|
||||
STEAMUGC_INTERFACE_VERSION "\0"
|
||||
"\0";
|
||||
return SteamInternal_GameServer_Init_V2( unIP, usGamePort, usQueryPort, eServerMode, pchVersionString, pszInternalCheckInterfaceVersions, pOutErrMsg );
|
||||
}
|
||||
inline void SteamGameServer_ReleaseCurrentThreadMemory()
|
||||
{
|
||||
|
@ -11,7 +11,8 @@
|
||||
#include "steamuniverse.h"
|
||||
|
||||
// General result codes
|
||||
enum EResult {
|
||||
enum EResult
|
||||
{
|
||||
k_EResultNone = 0, // no result
|
||||
k_EResultOK = 1, // success
|
||||
k_EResultFail = 2, // generic failure
|
||||
@ -140,10 +141,13 @@ enum EResult {
|
||||
k_EResultChargerRequired = 125, // The operation requires a charger to be plugged in, which wasn't present
|
||||
k_EResultCachedCredentialInvalid = 126, // Cached credential was invalid - user must reauthenticate
|
||||
K_EResultPhoneNumberIsVOIP = 127, // The phone number provided is a Voice Over IP number
|
||||
k_EResultNotSupported = 128, // The data being accessed is not supported by this API
|
||||
k_EResultFamilySizeLimitExceeded = 129, // Reached the maximum size of the family
|
||||
};
|
||||
|
||||
// Error codes for use with the voice functions
|
||||
enum EVoiceResult {
|
||||
enum EVoiceResult
|
||||
{
|
||||
k_EVoiceResultOK = 0,
|
||||
k_EVoiceResultNotInitialized = 1,
|
||||
k_EVoiceResultNotRecording = 2,
|
||||
@ -158,7 +162,8 @@ enum EVoiceResult {
|
||||
};
|
||||
|
||||
// Result codes to GSHandleClientDeny/Kick
|
||||
enum EDenyReason {
|
||||
enum EDenyReason
|
||||
{
|
||||
k_EDenyInvalid = 0,
|
||||
k_EDenyInvalidVersion = 1,
|
||||
k_EDenyGeneric = 2,
|
||||
@ -182,7 +187,8 @@ typedef uint32 HAuthTicket;
|
||||
const HAuthTicket k_HAuthTicketInvalid = 0;
|
||||
|
||||
// results from BeginAuthSession
|
||||
enum EBeginAuthSessionResult {
|
||||
enum EBeginAuthSessionResult
|
||||
{
|
||||
k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID.
|
||||
k_EBeginAuthSessionResultInvalidTicket = 1, // Ticket is not valid.
|
||||
k_EBeginAuthSessionResultDuplicateRequest = 2, // A ticket has already been submitted for this steamID
|
||||
@ -192,7 +198,8 @@ enum EBeginAuthSessionResult {
|
||||
};
|
||||
|
||||
// Callback values for callback ValidateAuthTicketResponse_t which is a response to BeginAuthSession
|
||||
enum EAuthSessionResponse {
|
||||
enum EAuthSessionResponse
|
||||
{
|
||||
k_EAuthSessionResponseOK = 0, // Steam has verified the user is online, the ticket is valid and ticket has not been reused.
|
||||
k_EAuthSessionResponseUserNotConnectedToSteam = 1, // The user in question is not connected to steam
|
||||
k_EAuthSessionResponseNoLicenseOrExpired = 2, // The license has expired.
|
||||
@ -207,14 +214,17 @@ enum EAuthSessionResponse {
|
||||
};
|
||||
|
||||
// results from UserHasLicenseForApp
|
||||
enum EUserHasLicenseForAppResult {
|
||||
enum EUserHasLicenseForAppResult
|
||||
{
|
||||
k_EUserHasLicenseResultHasLicense = 0, // User has a license for specified app
|
||||
k_EUserHasLicenseResultDoesNotHaveLicense = 1, // User does not have a license for the specified app
|
||||
k_EUserHasLicenseResultNoAuth = 2, // User has not been authenticated
|
||||
};
|
||||
|
||||
|
||||
// Steam account types
|
||||
enum EAccountType {
|
||||
enum EAccountType
|
||||
{
|
||||
k_EAccountTypeInvalid = 0,
|
||||
k_EAccountTypeIndividual = 1, // single user account
|
||||
k_EAccountTypeMultiseat = 2, // multiseat (e.g. cybercafe) account
|
||||
@ -231,10 +241,13 @@ enum EAccountType {
|
||||
k_EAccountTypeMax
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Chat Entry Types (previously was only friend-to-friend message types)
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EChatEntryType {
|
||||
enum EChatEntryType
|
||||
{
|
||||
k_EChatEntryTypeInvalid = 0,
|
||||
k_EChatEntryTypeChatMsg = 1, // Normal text message from another user
|
||||
k_EChatEntryTypeTyping = 2, // Another user is typing (not used in multi-user chat)
|
||||
@ -253,10 +266,12 @@ enum EChatEntryType {
|
||||
k_EChatEntryTypeLinkBlocked = 14, // a link was removed by the chat filter.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Chat Room Enter Responses
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EChatRoomEnterResponse {
|
||||
enum EChatRoomEnterResponse
|
||||
{
|
||||
k_EChatRoomEnterResponseSuccess = 1, // Success
|
||||
k_EChatRoomEnterResponseDoesntExist = 2, // Chat doesn't exist (probably closed)
|
||||
k_EChatRoomEnterResponseNotAllowed = 3, // General Denied - You don't have the permissions needed to join the chat
|
||||
@ -274,13 +289,15 @@ enum EChatRoomEnterResponse {
|
||||
k_EChatRoomEnterResponseRatelimitExceeded = 15, // Join failed - to many join attempts in a very short period of time
|
||||
};
|
||||
|
||||
|
||||
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
|
||||
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
|
||||
const unsigned int k_unSteamUserDefaultInstance = 1; // fixed instance for all individual users
|
||||
|
||||
// Special flags for Chat accounts - they go in the top 8 bits
|
||||
// of the steam ID's "instance", leaving 12 for the actual instances
|
||||
enum EChatSteamIDInstanceFlags {
|
||||
enum EChatSteamIDInstanceFlags
|
||||
{
|
||||
k_EChatAccountInstanceMask = 0x00000FFF, // top 8 bits are flags
|
||||
|
||||
k_EChatInstanceFlagClan = ( k_unSteamAccountInstanceMask + 1 ) >> 1, // top bit
|
||||
@ -290,10 +307,12 @@ enum EChatSteamIDInstanceFlags {
|
||||
// Max of 8 flags
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Possible positions to tell the overlay to show notifications in
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ENotificationPosition {
|
||||
enum ENotificationPosition
|
||||
{
|
||||
k_EPositionInvalid = -1,
|
||||
k_EPositionTopLeft = 0,
|
||||
k_EPositionTopRight = 1,
|
||||
@ -301,10 +320,12 @@ enum ENotificationPosition {
|
||||
k_EPositionBottomRight = 3,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Broadcast upload result details
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EBroadcastUploadResult {
|
||||
enum EBroadcastUploadResult
|
||||
{
|
||||
k_EBroadcastUploadResultNone = 0, // broadcast state unknown
|
||||
k_EBroadcastUploadResultOK = 1, // broadcast was good, no problems
|
||||
k_EBroadcastUploadResultInitFailed = 2, // broadcast init failed
|
||||
@ -331,11 +352,13 @@ enum EBroadcastUploadResult {
|
||||
k_EBroadcastUploadResultAudioInitFailed = 23, // invalid audio settings
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Reasons a user may not use the Community Market.
|
||||
// Used in MarketEligibilityResponse_t.
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EMarketNotAllowedReasonFlags {
|
||||
enum EMarketNotAllowedReasonFlags
|
||||
{
|
||||
k_EMarketNotAllowedReason_None = 0,
|
||||
|
||||
// A back-end call failed or something that might work again on retry
|
||||
@ -389,12 +412,14 @@ enum EMarketNotAllowedReasonFlags {
|
||||
k_EMarketNotAllowedReason_AcceptedWalletGift = (1 << 15),
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// describes XP / progress restrictions to apply for games with duration control /
|
||||
// anti-indulgence enabled for minor Steam China users.
|
||||
//
|
||||
// WARNING: DO NOT RENUMBER
|
||||
enum EDurationControlProgress {
|
||||
enum EDurationControlProgress
|
||||
{
|
||||
k_EDurationControlProgress_Full = 0, // Full progress
|
||||
k_EDurationControlProgress_Half = 1, // deprecated - XP or persistent rewards should be halved
|
||||
k_EDurationControlProgress_None = 2, // deprecated - XP or persistent rewards should be stopped
|
||||
@ -404,11 +429,13 @@ enum EDurationControlProgress {
|
||||
k_EDurationControl_ExitSoon_Night = 5, // game running after day period, game should exit - steam will terminate the game soon
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// describes which notification timer has expired, for steam china duration control feature
|
||||
//
|
||||
// WARNING: DO NOT RENUMBER
|
||||
enum EDurationControlNotification {
|
||||
enum EDurationControlNotification
|
||||
{
|
||||
k_EDurationControlNotification_None = 0, // just informing you about progress, no notification to show
|
||||
k_EDurationControlNotification_1Hour = 1, // "you've been playing for N hours"
|
||||
|
||||
@ -421,23 +448,38 @@ enum EDurationControlNotification {
|
||||
k_EDurationControlNotification_ExitSoon_Night = 7,// game running after day period, game should exit - steam will terminate the game soon
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Specifies a game's online state in relation to duration control
|
||||
//
|
||||
enum EDurationControlOnlineState {
|
||||
enum EDurationControlOnlineState
|
||||
{
|
||||
k_EDurationControlOnlineState_Invalid = 0, // nil value
|
||||
k_EDurationControlOnlineState_Offline = 1, // currently in offline play - single-player, offline co-op, etc.
|
||||
k_EDurationControlOnlineState_Online = 2, // currently in online play
|
||||
k_EDurationControlOnlineState_OnlineHighPri = 3, // currently in online play and requests not to be interrupted
|
||||
};
|
||||
|
||||
|
||||
enum EBetaBranchFlags
|
||||
{
|
||||
k_EBetaBranch_None = 0,
|
||||
k_EBetaBranch_Default = 1, // this is the default branch ("public")
|
||||
k_EBetaBranch_Available = 2, // this branch can be selected (available)
|
||||
k_EBetaBranch_Private = 4, // this is a private branch (password protected)
|
||||
k_EBetaBranch_Selected = 8, // this is the currently selected branch (active)
|
||||
k_EBetaBranch_Installed = 16, // this is the currently installed branch (mounted)
|
||||
};
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
#define CSTEAMID_DEFINED
|
||||
|
||||
// Steam ID structure (64 bits total)
|
||||
class CSteamID {
|
||||
class CSteamID
|
||||
{
|
||||
public:
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -449,6 +491,7 @@ public:
|
||||
m_steamid.m_comp.m_unAccountInstance = 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -460,6 +503,7 @@ public:
|
||||
Set( unAccountID, eUniverse, eAccountType );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -475,6 +519,7 @@ public:
|
||||
InstancedSet( unAccountID, unAccountInstance, eUniverse, eAccountType );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
// Input : ulSteamID - 64-bit representation of a Steam ID
|
||||
@ -492,6 +537,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sets parameters for steam ID
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -504,13 +550,17 @@ public:
|
||||
m_steamid.m_comp.m_EUniverse = eUniverse;
|
||||
m_steamid.m_comp.m_EAccountType = eAccountType;
|
||||
|
||||
if (eAccountType == k_EAccountTypeClan || eAccountType == k_EAccountTypeGameServer) {
|
||||
if ( eAccountType == k_EAccountTypeClan || eAccountType == k_EAccountTypeGameServer )
|
||||
{
|
||||
m_steamid.m_comp.m_unAccountInstance = 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sets parameters for steam ID
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -525,6 +575,7 @@ public:
|
||||
m_steamid.m_comp.m_unAccountInstance = unInstance;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Initializes a steam ID from its 52 bit parts and universe/type
|
||||
// Input : ulIdentifier - 52 bits of goodness
|
||||
@ -537,6 +588,7 @@ public:
|
||||
m_steamid.m_comp.m_EAccountType = eAccountType;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Initializes a steam ID from its 64-bit representation
|
||||
// Input : ulSteamID - 64-bit representation of a Steam ID
|
||||
@ -546,6 +598,7 @@ public:
|
||||
m_steamid.m_unAll64Bits = ulSteamID;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Clear all fields, leaving an invalid ID.
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -566,6 +619,7 @@ public:
|
||||
return m_steamid.m_unAll64Bits;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Converts the static parts of a steam ID to a 64-bit representation.
|
||||
// For multiseat accounts, all instances of that account will have the
|
||||
@ -579,6 +633,7 @@ public:
|
||||
return (uint64) ( ( ( (uint64) m_steamid.m_comp.m_EUniverse ) << 56 ) + ((uint64) m_steamid.m_comp.m_EAccountType << 52 ) + m_steamid.m_comp.m_unAccountID );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: create an anonymous game server login to be filled in by the AM
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -590,6 +645,7 @@ public:
|
||||
m_steamid.m_comp.m_unAccountInstance = 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: create an anonymous game server login to be filled in by the AM
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -641,6 +697,7 @@ public:
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeContentServer;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this a clan account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -649,6 +706,7 @@ public:
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this a chat account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -666,6 +724,7 @@ public:
|
||||
&& ( m_steamid.m_comp.m_unAccountInstance & k_EChatInstanceFlagLobby );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this an individual user account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -674,6 +733,7 @@ public:
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual || m_steamid.m_comp.m_EAccountType == k_EAccountTypeConsoleUser;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this an anonymous account?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -739,8 +799,10 @@ private:
|
||||
CSteamID( int32 );
|
||||
|
||||
// 64 bits total
|
||||
union SteamID_t {
|
||||
struct SteamIDComponent_t {
|
||||
union SteamID_t
|
||||
{
|
||||
struct SteamIDComponent_t
|
||||
{
|
||||
#ifdef VALVE_BIG_ENDIAN
|
||||
EUniverse m_EUniverse : 8; // universe this account belongs to
|
||||
unsigned int m_EAccountType : 4; // type of account - can't show as EAccountType, due to signed / unsigned difference
|
||||
@ -766,17 +828,20 @@ inline bool CSteamID::IsValid() const
|
||||
if ( m_steamid.m_comp.m_EUniverse <= k_EUniverseInvalid || m_steamid.m_comp.m_EUniverse >= k_EUniverseMax )
|
||||
return false;
|
||||
|
||||
if (m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual) {
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != k_unSteamUserDefaultInstance )
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan) {
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer) {
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 )
|
||||
return false;
|
||||
// Any limit on instances? We use them for local users and bots
|
||||
@ -793,7 +858,8 @@ inline bool CSteamID::IsValid() const
|
||||
//-----------------------------------------------------------------------------
|
||||
inline CSteamID SteamIDFromSteam2UserID( TSteamGlobalUserID *pTSteamGlobalUserID, EUniverse eUniverse )
|
||||
{
|
||||
uint32 unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 + pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
|
||||
uint32 unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 +
|
||||
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
|
||||
|
||||
return CSteamID( unAccountID, k_unSteamUserDefaultInstance, eUniverse, k_EAccountTypeIndividual );
|
||||
}
|
||||
@ -815,6 +881,7 @@ inline TSteamGlobalUserID SteamIDToSteam2UserID(CSteamID steamID)
|
||||
return steamGlobalUserID;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// generic invalid CSteamID
|
||||
@ -832,6 +899,7 @@ inline TSteamGlobalUserID SteamIDToSteam2UserID(CSteamID steamID)
|
||||
// wants to support the "Join Game" option in the friends list
|
||||
#define k_steamIDNonSteamGS CSteamID( 2, 0, k_EUniverseInvalid, k_EAccountTypeInvalid )
|
||||
|
||||
|
||||
#ifdef STEAM
|
||||
// Returns the matching chat steamID, with the default instance of 0
|
||||
// If the steamID passed in is already of type k_EAccountTypeChat it will be returned with the same instance
|
||||
@ -846,12 +914,16 @@ CSteamID ClanIDFromChatID(const CSteamID& steamIDChat);
|
||||
|
||||
#endif // _STEAM
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: encapsulates an appID/modID pair
|
||||
//-----------------------------------------------------------------------------
|
||||
class CGameID {
|
||||
class CGameID
|
||||
{
|
||||
public:
|
||||
enum EGameIDType {
|
||||
|
||||
enum EGameIDType
|
||||
{
|
||||
k_EGameIDTypeApp = 0,
|
||||
k_EGameIDTypeGameMod = 1,
|
||||
k_EGameIDTypeShortcut = 2,
|
||||
@ -979,7 +1051,8 @@ public:
|
||||
bool IsValid() const
|
||||
{
|
||||
// each type has it's own invalid fixed point:
|
||||
switch (m_gameID.m_nType) {
|
||||
switch( m_gameID.m_nType )
|
||||
{
|
||||
case k_EGameIDTypeApp:
|
||||
return m_gameID.m_nAppID != k_uAppIdInvalid;
|
||||
|
||||
@ -997,6 +1070,7 @@ public:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@ -1008,7 +1082,8 @@ public:
|
||||
// Internal stuff. Use the accessors above if possible
|
||||
//
|
||||
|
||||
struct GameID_t {
|
||||
struct GameID_t
|
||||
{
|
||||
#ifdef VALVE_BIG_ENDIAN
|
||||
unsigned int m_nModID : 32;
|
||||
unsigned int m_nType : 8;
|
||||
@ -1020,7 +1095,8 @@ public:
|
||||
#endif
|
||||
};
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint64 m_ulGameID;
|
||||
GameID_t m_gameID;
|
||||
};
|
||||
@ -1032,13 +1108,15 @@ public:
|
||||
|
||||
const int k_cchGameExtraInfoMax = 64;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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);
|
||||
|
||||
enum EGameSearchErrorCode_t {
|
||||
enum EGameSearchErrorCode_t
|
||||
{
|
||||
k_EGameSearchErrorCode_OK = 1,
|
||||
k_EGameSearchErrorCode_Failed_Search_Already_In_Progress = 2,
|
||||
k_EGameSearchErrorCode_Failed_No_Search_In_Progress = 3,
|
||||
@ -1050,7 +1128,8 @@ enum EGameSearchErrorCode_t {
|
||||
k_EGameSearchErrorCode_Failed_Unknown_Error = 9, // unknown error
|
||||
};
|
||||
|
||||
enum EPlayerResult_t {
|
||||
enum EPlayerResult_t
|
||||
{
|
||||
k_EPlayerResultFailedToConnect = 1, // failed to connect after confirming
|
||||
k_EPlayerResultAbandoned = 2, // quit game without completing it
|
||||
k_EPlayerResultKicked = 3, // kicked by other players/moderator/server rules
|
||||
@ -1058,19 +1137,23 @@ enum EPlayerResult_t {
|
||||
k_EPlayerResultCompleted = 5, // player completed game
|
||||
};
|
||||
|
||||
enum ESteamIPv6ConnectivityProtocol {
|
||||
|
||||
enum ESteamIPv6ConnectivityProtocol
|
||||
{
|
||||
k_ESteamIPv6ConnectivityProtocol_Invalid = 0,
|
||||
k_ESteamIPv6ConnectivityProtocol_HTTP = 1, // because a proxy may make this different than other protocols
|
||||
k_ESteamIPv6ConnectivityProtocol_UDP = 2, // test UDP connectivity. Uses a port that is commonly needed for other Steam stuff. If UDP works, TCP probably works.
|
||||
};
|
||||
|
||||
// For the above transport protocol, what do we think the local machine's connectivity to the internet over ipv6 is like
|
||||
enum ESteamIPv6ConnectivityState {
|
||||
enum ESteamIPv6ConnectivityState
|
||||
{
|
||||
k_ESteamIPv6ConnectivityState_Unknown = 0, // We haven't run a test yet
|
||||
k_ESteamIPv6ConnectivityState_Good = 1, // We have recently been able to make a request on ipv6 for the given protocol
|
||||
k_ESteamIPv6ConnectivityState_Bad = 2, // We failed to make a request, either because this machine has no ipv6 address assigned, or it has no upstream connectivity
|
||||
};
|
||||
|
||||
|
||||
// Define compile time assert macros to let us validate the structure sizes.
|
||||
#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1];
|
||||
|
||||
@ -1093,7 +1176,8 @@ enum ESteamIPv6ConnectivityState {
|
||||
#error ???
|
||||
#endif
|
||||
|
||||
typedef struct ValvePackingSentinel_t {
|
||||
typedef struct ValvePackingSentinel_t
|
||||
{
|
||||
uint32 m_u32;
|
||||
uint64 m_u64;
|
||||
uint16 m_u16;
|
||||
@ -1102,6 +1186,7 @@ typedef struct ValvePackingSentinel_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#if defined(VALVE_CALLBACK_PACK_SMALL)
|
||||
VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 24 )
|
||||
#elif defined(VALVE_CALLBACK_PACK_LARGE)
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
static const int k_nSteamEncryptedAppTicketSymmetricKeyLen = 32;
|
||||
|
||||
|
||||
S_API bool SteamEncryptedAppTicket_BDecryptTicket( const uint8 *rgubTicketEncrypted, uint32 cubTicketEncrypted,
|
||||
uint8 *rgubTicketDecrypted, uint32 *pcubTicketDecrypted,
|
||||
const uint8 rgubKey[k_nSteamEncryptedAppTicketSymmetricKeyLen], int cubKey );
|
||||
|
@ -14,7 +14,8 @@
|
||||
// HTTP related types
|
||||
|
||||
// This enum is used in client API methods, do not re-number existing values.
|
||||
enum EHTTPMethod {
|
||||
enum EHTTPMethod
|
||||
{
|
||||
k_EHTTPMethodInvalid = 0,
|
||||
k_EHTTPMethodGET,
|
||||
k_EHTTPMethodHEAD,
|
||||
@ -31,9 +32,11 @@ enum EHTTPMethod {
|
||||
// k_EHTTPMethodCONNECT
|
||||
};
|
||||
|
||||
|
||||
// HTTP Status codes that the server can send in response to a request, see rfc2616 section 10.3 for descriptions
|
||||
// of each of these.
|
||||
enum EHTTPStatusCode {
|
||||
enum EHTTPStatusCode
|
||||
{
|
||||
// Invalid status code (this isn't defined in HTTP, used to indicate unset in our code)
|
||||
k_EHTTPStatusCodeInvalid = 0,
|
||||
|
||||
@ -94,4 +97,9 @@ enum EHTTPStatusCode {
|
||||
k_EHTTPStatusCode5xxUnknown = 599,
|
||||
};
|
||||
|
||||
inline bool BIsHTTPStatusSuccess( EHTTPStatusCode eStatus )
|
||||
{
|
||||
return eStatus >= 200 && eStatus <= 299;
|
||||
}
|
||||
|
||||
#endif // STEAMHTTPENUMS_H
|
@ -4,8 +4,8 @@
|
||||
#define STEAMNETWORKINGFAKEIP_H
|
||||
#pragma once
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// It is HIGHLY recommended to limit messages sent via Fake UDP port to this
|
||||
// value. The purpose of a Fake UDP port is to make porting ordinary ad-hoc UDP
|
||||
@ -26,7 +26,8 @@ constexpr int k_cbSteamNetworkingSocketsFakeUDPPortMaxMessageSize = 4096;
|
||||
///
|
||||
/// See: ISteamNetworkingSockets::CreateFakeUDPPort
|
||||
|
||||
class ISteamNetworkingFakeUDPPort {
|
||||
class ISteamNetworkingFakeUDPPort
|
||||
{
|
||||
public:
|
||||
/// Destroy the object and cleanup any internal connections.
|
||||
/// Note that this function call is not threadsafe with respect
|
||||
@ -89,7 +90,8 @@ public:
|
||||
/// use as an identifier. This callback is posted when
|
||||
/// ISteamNetworkingSoockets::BeginAsyncRequestFakeIP completes.
|
||||
/// See also ISteamNetworkingSockets::GetFakeIP
|
||||
struct SteamNetworkingFakeIPResult_t {
|
||||
struct SteamNetworkingFakeIPResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 3 };
|
||||
|
||||
/// Status/result of the allocation request. Possible failure values are:
|
||||
|
@ -8,10 +8,10 @@
|
||||
#define STEAMNETWORKINGTYPES
|
||||
#pragma once
|
||||
|
||||
#include "steamclientpublic.h"
|
||||
#include "steamtypes.h"
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "steamtypes.h"
|
||||
#include "steamclientpublic.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SteamNetworkingSockets config.
|
||||
@ -26,7 +26,7 @@
|
||||
#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK )
|
||||
#define STEAMNETWORKINGSOCKETS_INTERFACE extern "C"
|
||||
#elif defined( STEAMNETWORKINGSOCKETS_FOREXPORT )
|
||||
#ifdef _WIN32
|
||||
#if defined( _WIN32 ) || defined( __ORBIS__ ) || defined( __PROSPERO__ )
|
||||
#define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __declspec( dllexport )
|
||||
#else
|
||||
#define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __attribute__((visibility("default")))
|
||||
@ -98,7 +98,8 @@ typedef uint32 SteamNetworkingPOPID;
|
||||
typedef int64 SteamNetworkingMicroseconds;
|
||||
|
||||
/// Describe the status of a particular network resource
|
||||
enum ESteamNetworkingAvailability {
|
||||
enum ESteamNetworkingAvailability
|
||||
{
|
||||
// Negative values indicate a problem.
|
||||
//
|
||||
// In general, we will not automatically retry unless you take some action that
|
||||
@ -118,6 +119,7 @@ enum ESteamNetworkingAvailability {
|
||||
|
||||
k_ESteamNetworkingAvailability_Current = 100, // Resource is online/available
|
||||
|
||||
|
||||
k_ESteamNetworkingAvailability_Unknown = 0, // Internal dummy/sentinel, or value is not applicable in this context
|
||||
k_ESteamNetworkingAvailability__Force32bit = 0x7fffffff,
|
||||
};
|
||||
@ -127,7 +129,8 @@ enum ESteamNetworkingAvailability {
|
||||
//
|
||||
|
||||
/// Different methods of describing the identity of a network host
|
||||
enum ESteamNetworkingIdentityType {
|
||||
enum ESteamNetworkingIdentityType
|
||||
{
|
||||
// Dummy/empty/invalid.
|
||||
// Please note that if we parse a string that we don't recognize
|
||||
// but that appears reasonable, we will NOT use this type. Instead
|
||||
@ -181,7 +184,8 @@ enum ESteamNetworkingIdentityType {
|
||||
|
||||
/// "Fake IPs" are assigned to hosts, to make it easier to interface with
|
||||
/// older code that assumed all hosts will have an IPv4 address
|
||||
enum ESteamNetworkingFakeIPType {
|
||||
enum ESteamNetworkingFakeIPType
|
||||
{
|
||||
k_ESteamNetworkingFakeIPType_Invalid, // Error, argument was not even an IP address, etc.
|
||||
k_ESteamNetworkingFakeIPType_NotFake, // Argument was a valid IP, but was not from the reserved "fake" range
|
||||
k_ESteamNetworkingFakeIPType_GlobalIPv4, // Globally unique (for a given app) IPv4 address. Address space managed by Steam
|
||||
@ -195,7 +199,8 @@ enum ESteamNetworkingFakeIPType {
|
||||
/// Store an IP and port. IPv6 is always used; IPv4 is represented using
|
||||
/// "IPv4-mapped" addresses: IPv4 aa.bb.cc.dd => IPv6 ::ffff:aabb:ccdd
|
||||
/// (RFC 4291 section 2.5.5.2.)
|
||||
struct SteamNetworkingIPAddr {
|
||||
struct SteamNetworkingIPAddr
|
||||
{
|
||||
void Clear(); // Set everything to zero. E.g. [::]:0
|
||||
bool IsIPv6AllZeros() const; // Return true if the IP is ::0. (Doesn't check port.)
|
||||
void SetIPv6( const uint8 *ipv6, uint16 nPort ); // Set IPv6 address. IP is interpreted as bytes, so there are no endian issues. (Same as inaddr_in6.) The IP can be a mapped IPv4 address
|
||||
@ -230,7 +235,8 @@ struct SteamNetworkingIPAddr {
|
||||
uint8 m_ip[ 4 ]; // NOTE: As bytes, i.e. network byte order
|
||||
};
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint8 m_ipv6[ 16 ];
|
||||
IPv4MappedAddress m_ipv4;
|
||||
};
|
||||
@ -252,7 +258,8 @@ struct SteamNetworkingIPAddr {
|
||||
/// used on the wire in several places, even though it is less efficient, in order to
|
||||
/// facilitate forward compatibility. (Old client code can handle an identity type that
|
||||
/// it doesn't understand.)
|
||||
struct SteamNetworkingIdentity {
|
||||
struct SteamNetworkingIdentity
|
||||
{
|
||||
/// Type of identity.
|
||||
ESteamNetworkingIdentityType m_eType;
|
||||
|
||||
@ -348,7 +355,8 @@ struct SteamNetworkingIdentity {
|
||||
//
|
||||
|
||||
/// High level connection status
|
||||
enum ESteamNetworkingConnectionState {
|
||||
enum ESteamNetworkingConnectionState
|
||||
{
|
||||
|
||||
/// Dummy value used to indicate an error condition in the API.
|
||||
/// Specified connection doesn't exist or has already been closed.
|
||||
@ -454,7 +462,8 @@ enum ESteamNetworkingConnectionState {
|
||||
/// Enumerate various causes of connection termination. These are designed to work similar
|
||||
/// to HTTP error codes: the numeric range gives you a rough classification as to the source
|
||||
/// of the problem.
|
||||
enum ESteamNetConnectionEnd {
|
||||
enum ESteamNetConnectionEnd
|
||||
{
|
||||
// Invalid/sentinel value
|
||||
k_ESteamNetConnectionEnd_Invalid = 0,
|
||||
|
||||
@ -669,7 +678,8 @@ const int k_nSteamNetworkConnectionInfoFlags_Relayed = 16; // The connection is
|
||||
const int k_nSteamNetworkConnectionInfoFlags_DualWifi = 32; // We're taking advantage of dual-wifi multi-path
|
||||
|
||||
/// Describe the state of a connection.
|
||||
struct SteamNetConnectionInfo_t {
|
||||
struct SteamNetConnectionInfo_t
|
||||
{
|
||||
|
||||
/// Who is on the other end? Depending on the connection type and phase of the connection, we might not know
|
||||
SteamNetworkingIdentity m_identityRemote;
|
||||
@ -723,7 +733,8 @@ struct SteamNetConnectionInfo_t {
|
||||
|
||||
/// Quick connection state, pared down to something you could call
|
||||
/// more frequently without it being too big of a perf hit.
|
||||
struct SteamNetConnectionRealTimeStatus_t {
|
||||
struct SteamNetConnectionRealTimeStatus_t
|
||||
{
|
||||
|
||||
/// High level state of the connection
|
||||
ESteamNetworkingConnectionState m_eState;
|
||||
@ -799,7 +810,8 @@ struct SteamNetConnectionRealTimeStatus_t {
|
||||
};
|
||||
|
||||
/// Quick status of a particular lane
|
||||
struct SteamNetConnectionRealTimeLaneStatus_t {
|
||||
struct SteamNetConnectionRealTimeLaneStatus_t
|
||||
{
|
||||
// Counters for this particular lane. See the corresponding variables
|
||||
// in SteamNetConnectionRealTimeStatus_t
|
||||
int m_cbPendingUnreliable;
|
||||
@ -828,7 +840,8 @@ struct SteamNetConnectionRealTimeLaneStatus_t {
|
||||
const int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024;
|
||||
|
||||
/// A message that has been received.
|
||||
struct SteamNetworkingMessage_t {
|
||||
struct SteamNetworkingMessage_t
|
||||
{
|
||||
|
||||
/// Message payload
|
||||
void *m_pData;
|
||||
@ -914,10 +927,7 @@ struct SteamNetworkingMessage_t {
|
||||
|
||||
// For code compatibility, some accessors
|
||||
#ifndef API_GEN
|
||||
inline uint32 GetSize() const
|
||||
{
|
||||
return m_cbSize;
|
||||
}
|
||||
inline uint32 GetSize() const { return m_cbSize; }
|
||||
inline const void *GetData() const { return m_pData; }
|
||||
inline int GetChannel() const { return m_nChannel; }
|
||||
inline HSteamNetConnection GetConnection() const { return m_conn; }
|
||||
@ -1062,7 +1072,8 @@ const int k_nSteamNetworkingSend_AutoRestartBrokenSession = 32;
|
||||
/// send it over the wire, or persist it in a file or database! If you need
|
||||
/// to do that, convert it to a string representation using the methods in
|
||||
/// ISteamNetworkingUtils().
|
||||
struct SteamNetworkPingLocation_t {
|
||||
struct SteamNetworkPingLocation_t
|
||||
{
|
||||
uint8 m_data[ 512 ];
|
||||
};
|
||||
|
||||
@ -1082,7 +1093,8 @@ const int k_nSteamNetworkingPing_Unknown = -2;
|
||||
//
|
||||
|
||||
/// Configuration values can be applied to different types of objects.
|
||||
enum ESteamNetworkingConfigScope {
|
||||
enum ESteamNetworkingConfigScope
|
||||
{
|
||||
|
||||
/// Get/set global option, or defaults. Even options that apply to more specific scopes
|
||||
/// have global scope, and you may be able to just change the global defaults. If you
|
||||
@ -1109,7 +1121,8 @@ enum ESteamNetworkingConfigScope {
|
||||
};
|
||||
|
||||
// Different configuration values have different data types
|
||||
enum ESteamNetworkingConfigDataType {
|
||||
enum ESteamNetworkingConfigDataType
|
||||
{
|
||||
k_ESteamNetworkingConfig_Int32 = 1,
|
||||
k_ESteamNetworkingConfig_Int64 = 2,
|
||||
k_ESteamNetworkingConfig_Float = 3,
|
||||
@ -1120,7 +1133,8 @@ enum ESteamNetworkingConfigDataType {
|
||||
};
|
||||
|
||||
/// Configuration options
|
||||
enum ESteamNetworkingConfigValue {
|
||||
enum ESteamNetworkingConfigValue
|
||||
{
|
||||
k_ESteamNetworkingConfig_Invalid = 0,
|
||||
|
||||
//
|
||||
@ -1138,6 +1152,42 @@ enum ESteamNetworkingConfigValue {
|
||||
/// Default is 512k (524288 bytes)
|
||||
k_ESteamNetworkingConfig_SendBufferSize = 9,
|
||||
|
||||
/// [connection int32] Upper limit on total size (in bytes) of received messages
|
||||
/// that will be buffered waiting to be processed by the application. If this limit
|
||||
/// is exceeded, packets will be dropped. This is to protect us from a malicious
|
||||
/// peer flooding us with messages faster than we can process them.
|
||||
///
|
||||
/// This must be bigger than k_ESteamNetworkingConfig_RecvMaxMessageSize
|
||||
k_ESteamNetworkingConfig_RecvBufferSize = 47,
|
||||
|
||||
/// [connection int32] Upper limit on the number of received messages that will
|
||||
/// that will be buffered waiting to be processed by the application. If this limit
|
||||
/// is exceeded, packets will be dropped. This is to protect us from a malicious
|
||||
/// peer flooding us with messages faster than we can pull them off the wire.
|
||||
k_ESteamNetworkingConfig_RecvBufferMessages = 48,
|
||||
|
||||
/// [connection int32] Maximum message size that we are willing to receive.
|
||||
/// if a client attempts to send us a message larger than this, the connection
|
||||
/// will be immediately closed.
|
||||
///
|
||||
/// Default is 512k (524288 bytes). Note that the peer needs to be able to
|
||||
/// send a message this big. (See k_cbMaxSteamNetworkingSocketsMessageSizeSend.)
|
||||
k_ESteamNetworkingConfig_RecvMaxMessageSize = 49,
|
||||
|
||||
/// [connection int32] Max number of message segments that can be received
|
||||
/// in a single UDP packet. While decoding a packet, if the number of segments
|
||||
/// exceeds this, we will abort further packet processing.
|
||||
///
|
||||
/// The default is effectively unlimited. If you know that you very rarely
|
||||
/// send small packets, you can protect yourself from malicious senders by
|
||||
/// lowering this number.
|
||||
///
|
||||
/// In particular, if you are NOT using the reliability layer and are only using
|
||||
/// SteamNetworkingSockets for datagram transport, setting this to a very low
|
||||
/// number may be beneficial. (We recommend a value of 2.) Make sure your sender
|
||||
/// disables Nagle!
|
||||
k_ESteamNetworkingConfig_RecvMaxSegmentsPerPacket = 50,
|
||||
|
||||
/// [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
|
||||
@ -1173,9 +1223,12 @@ enum ESteamNetworkingConfigValue {
|
||||
// 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)
|
||||
/// [connection int32] Minimum/maximum send rate clamp, in bytes/sec.
|
||||
/// At the time of this writing these two options should always be set to
|
||||
/// the same value, to manually configure a specific send rate. The default
|
||||
/// value is 256K. Eventually we hope to have the library estimate the bandwidth
|
||||
/// of the channel and set the send rate to that estimated bandwidth, and these
|
||||
/// values will only set limits on that send rate.
|
||||
k_ESteamNetworkingConfig_SendRateMin = 10,
|
||||
k_ESteamNetworkingConfig_SendRateMax = 11,
|
||||
|
||||
@ -1194,10 +1247,19 @@ enum ESteamNetworkingConfigValue {
|
||||
/// we won't automatically reject a connection due to a failure to authenticate.
|
||||
/// (You can examine the incoming connection and decide whether to accept it.)
|
||||
///
|
||||
/// 0: Don't attempt or accept unauthorized connections
|
||||
/// 1: Attempt authorization when connecting, and allow unauthorized peers, but emit warnings
|
||||
/// 2: don't attempt authentication, or complain if peer is unauthenticated
|
||||
///
|
||||
/// This is a dev configuration value, and you should not let users modify it in
|
||||
/// production.
|
||||
k_ESteamNetworkingConfig_IP_AllowWithoutAuth = 23,
|
||||
|
||||
/// [connection int32] The same as IP_AllowWithoutAuth, but will only apply
|
||||
/// for connections to/from localhost addresses. Whichever value is larger
|
||||
/// (more permissive) will be used.
|
||||
k_ESteamNetworkingConfig_IPLocalHost_AllowWithoutAuth = 52,
|
||||
|
||||
/// [connection int32] Do not send UDP packets with a payload of
|
||||
/// larger than N bytes. If you set this, k_ESteamNetworkingConfig_MTU_DataSize
|
||||
/// is automatically adjusted
|
||||
@ -1365,6 +1427,7 @@ enum ESteamNetworkingConfigValue {
|
||||
// 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"
|
||||
@ -1378,6 +1441,32 @@ enum ESteamNetworkingConfigValue {
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44,
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45,
|
||||
|
||||
// Timeout used for out-of-order correction. This is used when we see a small
|
||||
// gap in the sequence number on a packet flow. For example let's say we are
|
||||
// processing packet 105 when the most recent one was 103. 104 might have dropped,
|
||||
// but there is also a chance that packets are simply being reordered. It is very
|
||||
// common on certain types of connections for packet 104 to arrive very soon after 105,
|
||||
// especially if 104 was large and 104 was small. In this case, when we see packet 105
|
||||
// we will shunt it aside and pend it, in the hopes of seeing 104 soon after. If 104
|
||||
// arrives before the a timeout occurs, then we can deliver the packets in order to the
|
||||
// remainder of packet processing, and we will record this as a "correctable" out-of-order
|
||||
// situation. If the timer expires, then we will process packet 105, and assume for now
|
||||
// that 104 has dropped. (If 104 later arrives, we will process it, but that will be
|
||||
// accounted for as uncorrected.)
|
||||
//
|
||||
// The default value is 1000 microseconds. Note that the Windows scheduler does not
|
||||
// have microsecond precision.
|
||||
//
|
||||
// Set the value to 0 to disable out of order correction at the packet layer.
|
||||
// In many cases we are still effectively able to correct the situation because
|
||||
// reassembly of message fragments is tolerant of fragments packets arriving out of
|
||||
// order. Also, when messages are decoded and inserted into the queue for the app
|
||||
// to receive them, we will correct out of order messages that have not been
|
||||
// dequeued by the app yet. However, when out-of-order packets are corrected
|
||||
// at the packet layer, they will not reduce the connection quality measure.
|
||||
// (E.g. SteamNetConnectionRealTimeStatus_t::m_flConnectionQualityLocal)
|
||||
k_ESteamNetworkingConfig_OutOfOrderCorrectionWindowMicroseconds = 51,
|
||||
|
||||
//
|
||||
// Callbacks
|
||||
//
|
||||
@ -1491,24 +1580,24 @@ enum ESteamNetworkingConfigValue {
|
||||
// Settings for SDR relayed connections
|
||||
//
|
||||
|
||||
/// [int32 global] If the first N pings to a port all fail, mark that port as unavailable for
|
||||
/// [global int32] 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
|
||||
/// packet, so setting this to 1 may greatly disrupt communications.
|
||||
k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFailInitial = 19,
|
||||
|
||||
/// [int32 global] If N consecutive pings to a port fail, after having received successful
|
||||
/// [global int32] If N consecutive pings to a port fail, after having received successful
|
||||
/// communication, mark that port as unavailable for a while, and try a
|
||||
/// different one.
|
||||
k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFail = 20,
|
||||
|
||||
/// [int32 global] Minimum number of lifetime pings we need to send, before we think our estimate
|
||||
/// [global int32] Minimum number of lifetime pings we need to send, before we think our estimate
|
||||
/// is solid. The first ping to each cluster is very often delayed because of NAT,
|
||||
/// routers not having the best route, etc. Until we've sent a sufficient number
|
||||
/// of pings, our estimate is often inaccurate. Keep pinging until we get this
|
||||
/// many pings.
|
||||
k_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate = 21,
|
||||
|
||||
/// [int32 global] Set all steam datagram traffic to originate from the same
|
||||
/// [global int32] Set all steam datagram traffic to originate from the same
|
||||
/// local port. By default, we open up a new UDP socket (on a different local
|
||||
/// port) for each relay. This is slightly less optimal, but it works around
|
||||
/// some routers that don't implement NAT properly. If you have intermittent
|
||||
@ -1520,10 +1609,13 @@ enum ESteamNetworkingConfigValue {
|
||||
/// only use relays in that cluster. E.g. 'iad'
|
||||
k_ESteamNetworkingConfig_SDRClient_ForceRelayCluster = 29,
|
||||
|
||||
/// [connection string] For debugging, generate our own (unsigned) ticket, using
|
||||
/// the specified gameserver address. Router must be configured to accept unsigned
|
||||
/// tickets.
|
||||
k_ESteamNetworkingConfig_SDRClient_DebugTicketAddress = 30,
|
||||
/// [connection string] For development, a base-64 encoded ticket generated
|
||||
/// using the cert tool. This can be used to connect to a gameserver via SDR
|
||||
/// without a ticket generated using the game coordinator. (You will still
|
||||
/// need a key that is trusted for your app, however.)
|
||||
///
|
||||
/// This can also be passed using the SDR_DEVTICKET environment variable
|
||||
k_ESteamNetworkingConfig_SDRClient_DevTicket = 30,
|
||||
|
||||
/// [global string] For debugging. Override list of relays from the config with
|
||||
/// this set (maybe just one). Comma-separated list.
|
||||
@ -1536,6 +1628,10 @@ enum ESteamNetworkingConfigValue {
|
||||
/// in production.
|
||||
k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
|
||||
|
||||
/// [global int32] When probing the SteamDatagram network, we limit exploration
|
||||
/// to the closest N POPs, based on our current best approximated ping to that POP.
|
||||
k_ESteamNetworkingConfig_SDRClient_LimitPingProbesToNearestN = 60,
|
||||
|
||||
//
|
||||
// Log levels for debugging information of various subsystems.
|
||||
// Higher numeric values will cause more stuff to be printed.
|
||||
@ -1551,6 +1647,11 @@ enum ESteamNetworkingConfigValue {
|
||||
k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, // [connection int32] P2P rendezvous messages
|
||||
k_ESteamNetworkingConfig_LogLevel_SDRRelayPings = 18, // [global int32] Ping relays
|
||||
|
||||
// Experimental. Set the ECN header field on all outbound UDP packets
|
||||
// -1 = the default, and means "don't set anything".
|
||||
// 0..3 = set that value. (Even though 0 is the default UDP ECN value, a 0 here means "explicitly set a 0".)
|
||||
k_ESteamNetworkingConfig_ECN = 999,
|
||||
|
||||
// Deleted, do not use
|
||||
k_ESteamNetworkingConfig_DELETED_EnumerateDevVars = 35,
|
||||
|
||||
@ -1576,7 +1677,8 @@ const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All = 0x7fffffff;
|
||||
/// when the object is created, we just iterate over the list of options and call
|
||||
/// ISteamNetworkingUtils::SetConfigValueStruct, where the scope arguments are supplied by the
|
||||
/// object being created.
|
||||
struct SteamNetworkingConfigValue_t {
|
||||
struct SteamNetworkingConfigValue_t
|
||||
{
|
||||
/// Which option is being set
|
||||
ESteamNetworkingConfigValue m_eValue;
|
||||
|
||||
@ -1584,7 +1686,8 @@ struct SteamNetworkingConfigValue_t {
|
||||
ESteamNetworkingConfigDataType m_eDataType;
|
||||
|
||||
/// Option value
|
||||
union {
|
||||
union
|
||||
{
|
||||
int32_t m_int32;
|
||||
int64_t m_int64;
|
||||
float m_float;
|
||||
@ -1628,7 +1731,8 @@ struct SteamNetworkingConfigValue_t {
|
||||
};
|
||||
|
||||
/// Return value of ISteamNetworkintgUtils::GetConfigValue
|
||||
enum ESteamNetworkingGetConfigValueResult {
|
||||
enum ESteamNetworkingGetConfigValueResult
|
||||
{
|
||||
k_ESteamNetworkingGetConfigValue_BadValue = -1, // No such configuration value
|
||||
k_ESteamNetworkingGetConfigValue_BadScopeObj = -2, // Bad connection handle, etc
|
||||
k_ESteamNetworkingGetConfigValue_BufferTooSmall = -3, // Couldn't fit the result in your buffer
|
||||
@ -1644,7 +1748,8 @@ enum ESteamNetworkingGetConfigValueResult {
|
||||
|
||||
/// Detail level for diagnostic output callback.
|
||||
/// See ISteamNetworkingUtils::SetDebugOutputFunction
|
||||
enum ESteamNetworkingSocketsDebugOutputType {
|
||||
enum ESteamNetworkingSocketsDebugOutputType
|
||||
{
|
||||
k_ESteamNetworkingSocketsDebugOutputType_None = 0,
|
||||
k_ESteamNetworkingSocketsDebugOutputType_Bug = 1, // You used the API incorrectly, or an internal error happened
|
||||
k_ESteamNetworkingSocketsDebugOutputType_Error = 2, // Run-time error condition that isn't the result of a bug. (E.g. we are offline, cannot bind a port, etc)
|
||||
@ -1679,9 +1784,11 @@ inline SteamNetworkingPOPID CalculateSteamNetworkingPOPIDFromString(const char*
|
||||
//
|
||||
// There is also extra paranoia to make sure the bytes are not treated as signed.
|
||||
SteamNetworkingPOPID result = (uint32)(uint8)pszCode[0] << 16U;
|
||||
if (result && pszCode[1]) {
|
||||
if ( result && pszCode[1] )
|
||||
{
|
||||
result |= ( (uint32)(uint8)pszCode[1] << 8U );
|
||||
if (pszCode[2]) {
|
||||
if ( pszCode[2] )
|
||||
{
|
||||
result |= (uint32)(uint8)pszCode[2] | ( (uint32)(uint8)pszCode[3] << 24U );
|
||||
}
|
||||
}
|
||||
@ -1708,10 +1815,10 @@ const SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ((uint32)'d' << 16U) | ((u
|
||||
#ifndef API_GEN
|
||||
|
||||
/// Utility class for printing a SteamNetworkingPOPID.
|
||||
struct SteamNetworkingPOPIDRender {
|
||||
struct SteamNetworkingPOPIDRender
|
||||
{
|
||||
SteamNetworkingPOPIDRender( SteamNetworkingPOPID x ) { GetSteamNetworkingLocationPOPStringFromID( x, buf ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
|
||||
private:
|
||||
char buf[ 8 ];
|
||||
};
|
||||
@ -1728,40 +1835,12 @@ typedef SteamNetworkingMessage_t ISteamNetworkingMessage;
|
||||
typedef SteamNetworkingErrMsg SteamDatagramErrMsg;
|
||||
|
||||
inline void SteamNetworkingIPAddr::Clear() { memset( this, 0, sizeof(*this) ); }
|
||||
inline bool SteamNetworkingIPAddr::IsIPv6AllZeros() const
|
||||
{
|
||||
const uint64* q = (const uint64*)m_ipv6;
|
||||
return q[0] == 0 && q[1] == 0;
|
||||
}
|
||||
inline void SteamNetworkingIPAddr::SetIPv6(const uint8* ipv6, uint16 nPort)
|
||||
{
|
||||
memcpy(m_ipv6, ipv6, 16);
|
||||
m_port = nPort;
|
||||
}
|
||||
inline void SteamNetworkingIPAddr::SetIPv4(uint32 nIP, uint16 nPort)
|
||||
{
|
||||
m_ipv4.m_8zeros = 0;
|
||||
m_ipv4.m_0000 = 0;
|
||||
m_ipv4.m_ffff = 0xffff;
|
||||
m_ipv4.m_ip[0] = uint8(nIP >> 24);
|
||||
m_ipv4.m_ip[1] = uint8(nIP >> 16);
|
||||
m_ipv4.m_ip[2] = uint8(nIP >> 8);
|
||||
m_ipv4.m_ip[3] = uint8(nIP);
|
||||
m_port = nPort;
|
||||
}
|
||||
inline bool SteamNetworkingIPAddr::IsIPv6AllZeros() const { const uint64 *q = (const uint64 *)m_ipv6; return q[0] == 0 && q[1] == 0; }
|
||||
inline void SteamNetworkingIPAddr::SetIPv6( const uint8 *ipv6, uint16 nPort ) { memcpy( m_ipv6, ipv6, 16 ); m_port = nPort; }
|
||||
inline void SteamNetworkingIPAddr::SetIPv4( uint32 nIP, uint16 nPort ) { m_ipv4.m_8zeros = 0; m_ipv4.m_0000 = 0; m_ipv4.m_ffff = 0xffff; m_ipv4.m_ip[0] = uint8(nIP>>24); m_ipv4.m_ip[1] = uint8(nIP>>16); m_ipv4.m_ip[2] = uint8(nIP>>8); m_ipv4.m_ip[3] = uint8(nIP); m_port = nPort; }
|
||||
inline bool SteamNetworkingIPAddr::IsIPv4() const { return m_ipv4.m_8zeros == 0 && m_ipv4.m_0000 == 0 && m_ipv4.m_ffff == 0xffff; }
|
||||
inline uint32 SteamNetworkingIPAddr::GetIPv4() const { return IsIPv4() ? ( (uint32(m_ipv4.m_ip[0])<<24) | (uint32(m_ipv4.m_ip[1])<<16) | (uint32(m_ipv4.m_ip[2])<<8) | uint32(m_ipv4.m_ip[3]) ) : 0; }
|
||||
inline void SteamNetworkingIPAddr::SetIPv6LocalHost(uint16 nPort)
|
||||
{
|
||||
m_ipv4.m_8zeros = 0;
|
||||
m_ipv4.m_0000 = 0;
|
||||
m_ipv4.m_ffff = 0;
|
||||
m_ipv6[12] = 0;
|
||||
m_ipv6[13] = 0;
|
||||
m_ipv6[14] = 0;
|
||||
m_ipv6[15] = 1;
|
||||
m_port = nPort;
|
||||
}
|
||||
inline void SteamNetworkingIPAddr::SetIPv6LocalHost( uint16 nPort ) { m_ipv4.m_8zeros = 0; m_ipv4.m_0000 = 0; m_ipv4.m_ffff = 0; m_ipv6[12] = 0; m_ipv6[13] = 0; m_ipv6[14] = 0; m_ipv6[15] = 1; m_port = nPort; }
|
||||
inline bool SteamNetworkingIPAddr::IsLocalHost() const { return ( m_ipv4.m_8zeros == 0 && m_ipv4.m_0000 == 0 && m_ipv4.m_ffff == 0 && m_ipv6[12] == 0 && m_ipv6[13] == 0 && m_ipv6[14] == 0 && m_ipv6[15] == 1 ) || ( GetIPv4() == 0x7f000001 ); }
|
||||
inline bool SteamNetworkingIPAddr::operator==(const SteamNetworkingIPAddr &x ) const { return memcmp( this, &x, sizeof(SteamNetworkingIPAddr) ) == 0; }
|
||||
|
||||
@ -1769,87 +1848,29 @@ inline void SteamNetworkingIdentity::Clear() { memset(this, 0, sizeof(*this)); }
|
||||
inline bool SteamNetworkingIdentity::IsInvalid() const { return m_eType == k_ESteamNetworkingIdentityType_Invalid; }
|
||||
inline void SteamNetworkingIdentity::SetSteamID( CSteamID steamID ) { SetSteamID64( steamID.ConvertToUint64() ); }
|
||||
inline CSteamID SteamNetworkingIdentity::GetSteamID() const { return CSteamID( GetSteamID64() ); }
|
||||
inline void SteamNetworkingIdentity::SetSteamID64(uint64 steamID)
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_SteamID;
|
||||
m_cbSize = sizeof(m_steamID64);
|
||||
m_steamID64 = steamID;
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetSteamID64( uint64 steamID ) { m_eType = k_ESteamNetworkingIdentityType_SteamID; m_cbSize = sizeof( m_steamID64 ); m_steamID64 = steamID; }
|
||||
inline uint64 SteamNetworkingIdentity::GetSteamID64() const { return m_eType == k_ESteamNetworkingIdentityType_SteamID ? m_steamID64 : 0; }
|
||||
inline bool SteamNetworkingIdentity::SetXboxPairwiseID(const char* pszString)
|
||||
{
|
||||
size_t l = strlen(pszString);
|
||||
if (l < 1 || l >= sizeof(m_szXboxPairwiseID))
|
||||
return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_XboxPairwiseID;
|
||||
m_cbSize = int(l + 1);
|
||||
memcpy(m_szXboxPairwiseID, pszString, m_cbSize);
|
||||
return true;
|
||||
}
|
||||
inline bool SteamNetworkingIdentity::SetXboxPairwiseID( const char *pszString ) { size_t l = strlen( pszString ); if ( l < 1 || l >= sizeof(m_szXboxPairwiseID) ) return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_XboxPairwiseID; m_cbSize = int(l+1); memcpy( m_szXboxPairwiseID, pszString, m_cbSize ); return true; }
|
||||
inline const char *SteamNetworkingIdentity::GetXboxPairwiseID() const { return m_eType == k_ESteamNetworkingIdentityType_XboxPairwiseID ? m_szXboxPairwiseID : NULL; }
|
||||
inline void SteamNetworkingIdentity::SetPSNID(uint64 id)
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_SonyPSN;
|
||||
m_cbSize = sizeof(m_PSNID);
|
||||
m_PSNID = id;
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetPSNID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_SonyPSN; m_cbSize = sizeof( m_PSNID ); m_PSNID = id; }
|
||||
inline uint64 SteamNetworkingIdentity::GetPSNID() const { return m_eType == k_ESteamNetworkingIdentityType_SonyPSN ? m_PSNID : 0; }
|
||||
inline void SteamNetworkingIdentity::SetStadiaID(uint64 id)
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_GoogleStadia;
|
||||
m_cbSize = sizeof(m_stadiaID);
|
||||
m_stadiaID = id;
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetStadiaID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_GoogleStadia; m_cbSize = sizeof( m_stadiaID ); m_stadiaID = id; }
|
||||
inline uint64 SteamNetworkingIdentity::GetStadiaID() const { return m_eType == k_ESteamNetworkingIdentityType_GoogleStadia ? m_stadiaID : 0; }
|
||||
inline void SteamNetworkingIdentity::SetIPAddr(const SteamNetworkingIPAddr& addr)
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_IPAddress;
|
||||
m_cbSize = (int)sizeof(m_ip);
|
||||
m_ip = addr;
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetIPAddr( const SteamNetworkingIPAddr &addr ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip = addr; }
|
||||
inline const SteamNetworkingIPAddr *SteamNetworkingIdentity::GetIPAddr() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? &m_ip : NULL; }
|
||||
inline void SteamNetworkingIdentity::SetIPv4Addr(uint32 nIPv4, uint16 nPort)
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_IPAddress;
|
||||
m_cbSize = (int)sizeof(m_ip);
|
||||
m_ip.SetIPv4(nIPv4, nPort);
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetIPv4Addr( uint32 nIPv4, uint16 nPort ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv4( nIPv4, nPort ); }
|
||||
inline uint32 SteamNetworkingIdentity::GetIPv4() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? m_ip.GetIPv4() : 0; }
|
||||
inline ESteamNetworkingFakeIPType SteamNetworkingIdentity::GetFakeIPType() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? m_ip.GetFakeIPType() : k_ESteamNetworkingFakeIPType_Invalid; }
|
||||
inline void SteamNetworkingIdentity::SetLocalHost()
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_IPAddress;
|
||||
m_cbSize = (int)sizeof(m_ip);
|
||||
m_ip.SetIPv6LocalHost();
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetLocalHost() { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv6LocalHost(); }
|
||||
inline bool SteamNetworkingIdentity::IsLocalHost() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress && m_ip.IsLocalHost(); }
|
||||
inline bool SteamNetworkingIdentity::SetGenericString(const char* pszString)
|
||||
{
|
||||
size_t l = strlen(pszString);
|
||||
if (l >= sizeof(m_szGenericString))
|
||||
return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericString;
|
||||
m_cbSize = int(l + 1);
|
||||
memcpy(m_szGenericString, pszString, m_cbSize);
|
||||
return true;
|
||||
}
|
||||
inline bool SteamNetworkingIdentity::SetGenericString( const char *pszString ) { size_t l = strlen( pszString ); if ( l >= sizeof(m_szGenericString) ) return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericString; m_cbSize = int(l+1); memcpy( m_szGenericString, pszString, m_cbSize ); return true; }
|
||||
inline const char *SteamNetworkingIdentity::GetGenericString() const { return m_eType == k_ESteamNetworkingIdentityType_GenericString ? m_szGenericString : NULL; }
|
||||
inline bool SteamNetworkingIdentity::SetGenericBytes(const void* data, size_t cbLen)
|
||||
{
|
||||
if (cbLen > sizeof(m_genericBytes))
|
||||
return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericBytes;
|
||||
m_cbSize = int(cbLen);
|
||||
memcpy(m_genericBytes, data, m_cbSize);
|
||||
return true;
|
||||
}
|
||||
inline const uint8* SteamNetworkingIdentity::GetGenericBytes(int& cbLen) const
|
||||
{
|
||||
if (m_eType != k_ESteamNetworkingIdentityType_GenericBytes)
|
||||
return NULL;
|
||||
cbLen = m_cbSize;
|
||||
return m_genericBytes;
|
||||
}
|
||||
inline bool SteamNetworkingIdentity::SetGenericBytes( const void *data, size_t cbLen ) { if ( cbLen > sizeof(m_genericBytes) ) return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericBytes; m_cbSize = int(cbLen); memcpy( m_genericBytes, data, m_cbSize ); return true; }
|
||||
inline const uint8 *SteamNetworkingIdentity::GetGenericBytes( int &cbLen ) const { if ( m_eType != k_ESteamNetworkingIdentityType_GenericBytes ) return NULL;
|
||||
cbLen = m_cbSize; return m_genericBytes; }
|
||||
inline bool SteamNetworkingIdentity::operator==(const SteamNetworkingIdentity &x ) const { return m_eType == x.m_eType && m_cbSize == x.m_cbSize && memcmp( m_genericBytes, x.m_genericBytes, m_cbSize ) == 0; }
|
||||
inline void SteamNetworkingMessage_t::Release() { (*m_pfnRelease)( this ); }
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
||||
#define STEAM_PS3_LANGUAGE_MAX 64
|
||||
#define STEAM_PS3_REGION_CODE_MAX 16
|
||||
#define STEAM_PS3_CURRENT_PARAMS_VER 2
|
||||
struct SteamPS3Params_t {
|
||||
struct SteamPS3Params_t
|
||||
{
|
||||
uint32 m_unVersion; // set to STEAM_PS3_CURRENT_PARAMS_VER
|
||||
|
||||
void *pReserved;
|
||||
@ -62,35 +63,41 @@ struct SteamPS3Params_t {
|
||||
// like: profile_on, profile_off, profile_dump, mem_stats, mem_validate.
|
||||
unsigned int m_cSteamInputTTY;
|
||||
|
||||
struct Ps3netInit_t {
|
||||
struct Ps3netInit_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
void *m_pMemory;
|
||||
int m_nMemorySize;
|
||||
int m_flags;
|
||||
} m_sysNetInitInfo;
|
||||
|
||||
struct Ps3jpgInit_t {
|
||||
struct Ps3jpgInit_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
} m_sysJpgInitInfo;
|
||||
|
||||
struct Ps3pngInit_t {
|
||||
struct Ps3pngInit_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
} m_sysPngInitInfo;
|
||||
|
||||
struct Ps3sysutilUserInfo_t {
|
||||
struct Ps3sysutilUserInfo_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
} m_sysSysUtilUserInfo;
|
||||
|
||||
bool m_bIncludeNewsPage;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// PlayStation 3 memory structure
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
#define STEAMPS3_MALLOC_INUSE 0x53D04A51
|
||||
#define STEAMPS3_MALLOC_SYSTEM 0x0D102C48
|
||||
#define STEAMPS3_MALLOC_OK 0xFFD04A51
|
||||
struct SteamPS3Memory_t {
|
||||
struct SteamPS3Memory_t
|
||||
{
|
||||
bool m_bSingleAllocation; // If true, Steam will request one 6MB allocation and use the returned memory for all future allocations
|
||||
// If false, Steam will make call malloc for each allocation
|
||||
|
||||
@ -101,4 +108,5 @@ struct SteamPS3Memory_t {
|
||||
size_t (*m_pUsable_size)(void*);
|
||||
};
|
||||
|
||||
|
||||
#endif // STEAMPS3PARAMS_H
|
||||
|
@ -98,19 +98,22 @@ typedef uint64 SteamAPICall_t;
|
||||
const SteamAPICall_t k_uAPICallInvalid = 0x0;
|
||||
|
||||
typedef uint32 AccountID_t;
|
||||
const AccountID_t k_uAccountIdInvalid = 0;
|
||||
|
||||
// Party Beacon ID
|
||||
typedef uint64 PartyBeaconID_t;
|
||||
const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
|
||||
|
||||
enum ESteamIPType {
|
||||
enum ESteamIPType
|
||||
{
|
||||
k_ESteamIPTypeIPv4 = 0,
|
||||
k_ESteamIPTypeIPv6 = 1,
|
||||
};
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
struct SteamIPAddress_t {
|
||||
struct SteamIPAddress_t
|
||||
{
|
||||
union {
|
||||
|
||||
uint32 m_unIPv4; // Host order
|
||||
@ -124,9 +127,12 @@ struct SteamIPAddress_t {
|
||||
|
||||
bool IsSet() const
|
||||
{
|
||||
if (k_ESteamIPTypeIPv4 == m_eType) {
|
||||
if ( k_ESteamIPTypeIPv4 == m_eType )
|
||||
{
|
||||
return m_unIPv4 != 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_ipv6Qword[0] !=0 || m_ipv6Qword[1] != 0;
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,10 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Steam universes. Each universe is a self-contained Steam instance.
|
||||
enum EUniverse {
|
||||
enum EUniverse
|
||||
{
|
||||
k_EUniverseInvalid = 0,
|
||||
k_EUniversePublic = 1,
|
||||
k_EUniverseBeta = 2,
|
||||
@ -21,4 +23,5 @@ enum EUniverse {
|
||||
k_EUniverseMax
|
||||
};
|
||||
|
||||
|
||||
#endif // STEAMUNIVERSE_H
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user