diff --git a/Generator/steam_sdk/isteamapps.h b/Generator/steam_sdk/isteamapps.h index 550cb8f..299b95d 100644 --- a/Generator/steam_sdk/isteamapps.h +++ b/Generator/steam_sdk/isteamapps.h @@ -105,6 +105,9 @@ public: // Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID virtual bool BIsSubscribedFromFamilySharing() = 0; + + // check if game is a timed trial with limited playtime + virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0; }; #define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008" @@ -198,5 +201,17 @@ struct FileDetailsResult_t }; +//----------------------------------------------------------------------------- +// Purpose: called for games in Timed Trial mode +//----------------------------------------------------------------------------- +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 + uint32 m_unSecondsAllowed; // how many seconds the app can be played in total + uint32 m_unSecondsPlayed; // how many seconds the app was already played +}; + #pragma pack( pop ) #endif // ISTEAMAPPS_H diff --git a/Generator/steam_sdk/isteamfriends.h b/Generator/steam_sdk/isteamfriends.h index 220e959..520a67f 100644 --- a/Generator/steam_sdk/isteamfriends.h +++ b/Generator/steam_sdk/isteamfriends.h @@ -127,17 +127,6 @@ enum EUserRestriction k_nUserRestrictionTrading = 64, // user cannot participate in trading (console, mobile) }; -//----------------------------------------------------------------------------- -// Purpose: information about user sessions -//----------------------------------------------------------------------------- -struct FriendSessionStateInfo_t -{ - uint32 m_uiOnlineSessionInstances; - uint8 m_uiPublishedToFriendsSessionInstance; -}; - - - // size limit on chat room or member metadata const uint32 k_cubChatMetadataMax = 8192; @@ -425,6 +414,11 @@ public: // activates game overlay to open the remote play together invite dialog. Invitations will be sent for remote play together virtual void ActivateGameOverlayRemotePlayTogetherInviteDialog( CSteamID steamIDLobby ) = 0; + + // Call this before calling ActivateGameOverlayToWebPage() to have the Steam Overlay Browser block navigations + // to your specified protocol (scheme) uris and instead dispatch a OverlayBrowserProtocolNavigation_t callback to your game. + // ActivateGameOverlayToWebPage() must have been called with k_EActivateGameOverlayToWebPageMode_Modal + virtual bool RegisterProtocolInOverlayBrowser( const char *pchProtocol ) = 0; }; #define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017" @@ -680,6 +674,17 @@ 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 +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 49 }; + char rgchURI[ 1024 ]; +}; + + #pragma pack( pop ) #endif // ISTEAMFRIENDS_H diff --git a/Generator/steam_sdk/isteaminventory.h b/Generator/steam_sdk/isteaminventory.h index a3e7dd9..4d19cc9 100644 --- a/Generator/steam_sdk/isteaminventory.h +++ b/Generator/steam_sdk/isteaminventory.h @@ -366,6 +366,8 @@ public: // Submit the update request by handle virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0; + STEAM_METHOD_DESC(Look up the given token and return a pseudo-Inventory item.) + virtual bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) = 0; }; #define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V003" diff --git a/Generator/steam_sdk/isteamnetworkingutils.h b/Generator/steam_sdk/isteamnetworkingutils.h index 284c4e8..2640c48 100644 --- a/Generator/steam_sdk/isteamnetworkingutils.h +++ b/Generator/steam_sdk/isteamnetworkingutils.h @@ -231,6 +231,10 @@ public: /// value means more important, and the value you pass is the lowest priority (highest /// numeric value) you wish to receive callbacks for. /// + /// The value here controls the detail level for most messages. You can control the + /// detail level for various subsystems (perhaps only for certain connections) by + /// adjusting the configuration values k_ESteamNetworkingConfig_LogLevel_Xxxxx. + /// /// Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg /// or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT /// request a high detail level and then filter out messages in your callback. This incurs @@ -364,6 +368,24 @@ struct SteamRelayNetworkStatus_t char m_debugMsg[ 256 ]; }; +/// Utility class for printing a SteamNetworkingIdentity. +/// E.g. printf( "Identity is '%s'\n", SteamNetworkingIdentityRender( identity ).c_str() ); +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 +{ + 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 ]; +}; /////////////////////////////////////////////////////////////////////////////// // diff --git a/Generator/steam_sdk/isteamuser.h b/Generator/steam_sdk/isteamuser.h index 1077cbe..83f2e26 100644 --- a/Generator/steam_sdk/isteamuser.h +++ b/Generator/steam_sdk/isteamuser.h @@ -197,9 +197,14 @@ public: STEAM_CALL_RESULT( DurationControl_t ) virtual SteamAPICall_t GetDurationControl() = 0; + // Advise steam china duration control system about the online state of the game. + // This will prevent offline gameplay time from counting against a user's + // playtime limits. + virtual bool BSetDurationControlOnlineState( EDurationControlOnlineState eNewState ) = 0; + }; -#define STEAMUSER_INTERFACE_VERSION "SteamUser020" +#define STEAMUSER_INTERFACE_VERSION "SteamUser021" // Global interface accessor inline ISteamUser *SteamUser(); diff --git a/Generator/steam_sdk/isteamuserstats.h b/Generator/steam_sdk/isteamuserstats.h index e699169..af37148 100644 --- a/Generator/steam_sdk/isteamuserstats.h +++ b/Generator/steam_sdk/isteamuserstats.h @@ -293,28 +293,18 @@ public: STEAM_FLAT_NAME( GetGlobalStatHistoryDouble ) virtual int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) double *pData, uint32 cubData ) = 0; -#ifdef _PS3 - // Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t - // callback. - virtual bool InstallPS3Trophies() = 0; + // For achievements that have related Progress stats, use this to query what the bounds of that progress are. + // You may want this info to selectively call IndicateAchievementProgress when appropriate milestones of progress + // have been made, to show a progress notification to the user. + STEAM_FLAT_NAME( GetAchievementProgressLimitsInt32 ) + virtual bool GetAchievementProgressLimits( const char *pchName, int32 *pnMinProgress, int32 *pnMaxProgress ) = 0; - // Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed - // by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies(). - virtual uint64 GetTrophySpaceRequiredBeforeInstall() = 0; + STEAM_FLAT_NAME( GetAchievementProgressLimitsFloat ) + virtual bool GetAchievementProgressLimits( const char *pchName, float *pfMinProgress, float *pfMaxProgress ) = 0; - // On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data. - // At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method. - // If you do not have any user data, call this function with pvData = NULL and cubData = 0 - virtual bool SetUserStatsData( const void *pvData, uint32 cubData ) = 0; - - // Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t - // callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required - // buffer size. - virtual bool GetUserStatsData( void *pvData, uint32 cubData, uint32 *pcubWritten ) = 0; -#endif }; -#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION011" +#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION012" // Global interface accessor inline ISteamUserStats *SteamUserStats(); diff --git a/Generator/steam_sdk/steam_api.json b/Generator/steam_sdk/steam_api.json index e162b7b..4473515 100644 --- a/Generator/steam_sdk/steam_api.json +++ b/Generator/steam_sdk/steam_api.json @@ -283,6 +283,13 @@ "fields": [], "struct": "UnreadChatMessagesChanged_t" }, + { + "callback_id": 349, + "fields": [ + { "fieldname":"rgchURI", "fieldtype":"char [1024]" } + ], + "struct": "OverlayBrowserProtocolNavigation_t" + }, { "callback_id": 701, "fields": [], @@ -996,6 +1003,16 @@ ], "struct": "FileDetailsResult_t" }, + { + "callback_id": 1030, + "fields": [ + { "fieldname":"m_unAppID", "fieldtype":"AppId_t" }, + { "fieldname":"m_bIsOffline", "fieldtype":"bool" }, + { "fieldname":"m_unSecondsAllowed", "fieldtype":"uint32" }, + { "fieldname":"m_unSecondsPlayed", "fieldtype":"uint32" } + ], + "struct": "TimedTrialStatus_t" + }, { "callback_id": 1202, "fields": [ @@ -1607,20 +1624,6 @@ ], "struct": "GetOPFSettingsResult_t" }, - { - "callback_id": 4604, - "fields": [ - { "fieldname":"m_bIsRTMP", "fieldtype":"bool" } - ], - "struct": "BroadcastUploadStart_t" - }, - { - "callback_id": 4605, - "fields": [ - { "fieldname":"m_eResult", "fieldtype":"EBroadcastUploadResult" } - ], - "struct": "BroadcastUploadStop_t" - }, { "callback_id": 5001, "fields": [], @@ -1866,6 +1869,12 @@ { "constname":"k_cchMaxSteamNetworkingPingLocationString", "consttype":"int", "constval":"1024" }, { "constname":"k_nSteamNetworkingPing_Failed", "consttype":"int", "constval":"- 1" }, { "constname":"k_nSteamNetworkingPing_Unknown", "consttype":"int", "constval":"- 2" }, + { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Default", "consttype":"int", "constval":"- 1" }, + { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Disable", "consttype":"int", "constval":"0" }, + { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Relay", "consttype":"int", "constval":"1" }, + { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Private", "consttype":"int", "constval":"2" }, + { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Public", "consttype":"int", "constval":"4" }, + { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All", "consttype":"int", "constval":"0x7fffffff" }, { "constname":"k_SteamDatagramPOPID_dev", "consttype":"SteamNetworkingPOPID", "constval":"( ( uint32 ) 'd' << 16U ) | ( ( uint32 ) 'e' << 8U ) | ( uint32 ) 'v'" }, { "constname":"k_unServerFlagNone", "consttype":"uint32", "constval":"0x00" }, { "constname":"k_unServerFlagActive", "consttype":"uint32", "constval":"0x01" }, @@ -2014,7 +2023,8 @@ { "name":"k_EResultLimitedUserAccount", "value":"112" }, { "name":"k_EResultCantRemoveItem", "value":"113" }, { "name":"k_EResultAccountDeleted", "value":"114" }, - { "name":"k_EResultExistingUserCancelledLicense", "value":"115" } + { "name":"k_EResultExistingUserCancelledLicense", "value":"115" }, + { "name":"k_EResultCommunityCooldown", "value":"116" } ] }, { @@ -2138,7 +2148,8 @@ { "name":"k_EAppOwnershipFlags_Rental", "value":"131072" }, { "name":"k_EAppOwnershipFlags_SiteLicense", "value":"262144" }, { "name":"k_EAppOwnershipFlags_LegacyFreeSub", "value":"524288" }, - { "name":"k_EAppOwnershipFlags_InvalidOSType", "value":"1048576" } + { "name":"k_EAppOwnershipFlags_InvalidOSType", "value":"1048576" }, + { "name":"k_EAppOwnershipFlags_TimedTrial", "value":"2097152" } ] }, { @@ -2376,6 +2387,15 @@ { "name":"k_EDurationControlNotification_ExitSoon_Night", "value":"7" } ] }, + { + "enumname": "EDurationControlOnlineState", + "values": [ + { "name":"k_EDurationControlOnlineState_Invalid", "value":"0" }, + { "name":"k_EDurationControlOnlineState_Offline", "value":"1" }, + { "name":"k_EDurationControlOnlineState_Online", "value":"2" }, + { "name":"k_EDurationControlOnlineState_OnlineHighPri", "value":"3" } + ] + }, { "enumname": "EGameSearchErrorCode_t", "values": [ @@ -2859,6 +2879,7 @@ { "name":"k_EHTTPStatusCode417ExpectationFailed", "value":"417" }, { "name":"k_EHTTPStatusCode4xxUnknown", "value":"418" }, { "name":"k_EHTTPStatusCode429TooManyRequests", "value":"429" }, + { "name":"k_EHTTPStatusCode444ConnectionClosed", "value":"444" }, { "name":"k_EHTTPStatusCode500InternalServerError", "value":"500" }, { "name":"k_EHTTPStatusCode501NotImplemented", "value":"501" }, { "name":"k_EHTTPStatusCode502BadGateway", "value":"502" }, @@ -3611,15 +3632,6 @@ { "name":"k_ESteamItemConsumed", "value":"512" } ] }, - { - "enumname": "ESteamTVRegionBehavior", - "values": [ - { "name":"k_ESteamVideoRegionBehaviorInvalid", "value":"-1" }, - { "name":"k_ESteamVideoRegionBehaviorHover", "value":"0" }, - { "name":"k_ESteamVideoRegionBehaviorClickPopup", "value":"1" }, - { "name":"k_ESteamVideoRegionBehaviorClickSurroundingRegion", "value":"2" } - ] - }, { "enumname": "EParentalFeature", "values": [ @@ -3709,6 +3721,7 @@ { "name":"k_ESteamNetConnectionEnd_Local_HostedServerPrimaryRelay", "value":"3003" }, { "name":"k_ESteamNetConnectionEnd_Local_NetworkConfig", "value":"3004" }, { "name":"k_ESteamNetConnectionEnd_Local_Rights", "value":"3005" }, + { "name":"k_ESteamNetConnectionEnd_Local_P2P_ICE_NoPublicAddresses", "value":"3006" }, { "name":"k_ESteamNetConnectionEnd_Local_Max", "value":"3999" }, { "name":"k_ESteamNetConnectionEnd_Remote_Min", "value":"4000" }, { "name":"k_ESteamNetConnectionEnd_Remote_Timeout", "value":"4001" }, @@ -3717,6 +3730,7 @@ { "name":"k_ESteamNetConnectionEnd_Remote_NotLoggedIn", "value":"4004" }, { "name":"k_ESteamNetConnectionEnd_Remote_NotRunningApp", "value":"4005" }, { "name":"k_ESteamNetConnectionEnd_Remote_BadProtocolVersion", "value":"4006" }, + { "name":"k_ESteamNetConnectionEnd_Remote_P2P_ICE_NoPublicAddresses", "value":"4007" }, { "name":"k_ESteamNetConnectionEnd_Remote_Max", "value":"4999" }, { "name":"k_ESteamNetConnectionEnd_Misc_Min", "value":"5000" }, { "name":"k_ESteamNetConnectionEnd_Misc_Generic", "value":"5001" }, @@ -3725,10 +3739,26 @@ { "name":"k_ESteamNetConnectionEnd_Misc_RelayConnectivity", "value":"5004" }, { "name":"k_ESteamNetConnectionEnd_Misc_SteamConnectivity", "value":"5005" }, { "name":"k_ESteamNetConnectionEnd_Misc_NoRelaySessionsToClient", "value":"5006" }, + { "name":"k_ESteamNetConnectionEnd_Misc_P2P_Rendezvous", "value":"5008" }, + { "name":"k_ESteamNetConnectionEnd_Misc_P2P_NAT_Firewall", "value":"5009" }, { "name":"k_ESteamNetConnectionEnd_Misc_Max", "value":"5999" }, { "name":"k_ESteamNetConnectionEnd__Force32Bit", "value":"2147483647" } ] }, + { + "enumname": "ESteamNetTransportKind", + "values": [ + { "name":"k_ESteamNetTransport_Unknown", "value":"0" }, + { "name":"k_ESteamNetTransport_LoopbackBuffers", "value":"1" }, + { "name":"k_ESteamNetTransport_LocalHost", "value":"2" }, + { "name":"k_ESteamNetTransport_UDP", "value":"3" }, + { "name":"k_ESteamNetTransport_UDPProbablyLocal", "value":"4" }, + { "name":"k_ESteamNetTransport_TURN", "value":"5" }, + { "name":"k_ESteamNetTransport_SDRP2P", "value":"6" }, + { "name":"k_ESteamNetTransport_SDRHostedServer", "value":"7" }, + { "name":"k_ESteamNetTransport_Force32Bit", "value":"2147483647" } + ] + }, { "enumname": "ESteamNetworkingConfigScope", "values": [ @@ -3775,6 +3805,10 @@ { "name":"k_ESteamNetworkingConfig_MTU_DataSize", "value":"33" }, { "name":"k_ESteamNetworkingConfig_Unencrypted", "value":"34" }, { "name":"k_ESteamNetworkingConfig_EnumerateDevVars", "value":"35" }, + { "name":"k_ESteamNetworkingConfig_P2P_STUN_ServerList", "value":"103" }, + { "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Enable", "value":"104" }, + { "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty", "value":"105" }, + { "name":"k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty", "value":"106" }, { "name":"k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFailInitial", "value":"19" }, { "name":"k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFail", "value":"20" }, { "name":"k_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate", "value":"21" }, @@ -4178,7 +4212,7 @@ { "kind": "user", "name": "SteamUser", - "name_flat": "SteamAPI_SteamUser_v020" + "name_flat": "SteamAPI_SteamUser_v021" } ], "classname": "ISteamUser", @@ -4443,9 +4477,17 @@ "methodname_flat": "SteamAPI_ISteamUser_GetDurationControl", "params": [], "returntype": "SteamAPICall_t" + }, + { + "methodname": "BSetDurationControlOnlineState", + "methodname_flat": "SteamAPI_ISteamUser_BSetDurationControlOnlineState", + "params": [ + { "paramname":"eNewState", "paramtype":"EDurationControlOnlineState" } + ], + "returntype": "bool" } ], - "version_string": "SteamUser020" + "version_string": "SteamUser021" }, { "accessors": [ @@ -5098,6 +5140,14 @@ { "paramname":"steamIDLobby", "paramtype":"CSteamID", "paramtype_flat":"uint64_steamid" } ], "returntype": "void" + }, + { + "methodname": "RegisterProtocolInOverlayBrowser", + "methodname_flat": "SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser", + "params": [ + { "paramname":"pchProtocol", "paramtype":"const char *" } + ], + "returntype": "bool" } ], "version_string": "SteamFriends017" @@ -6862,7 +6912,7 @@ { "kind": "user", "name": "SteamUserStats", - "name_flat": "SteamAPI_SteamUserStats_v011" + "name_flat": "SteamAPI_SteamUserStats_v012" } ], "classname": "ISteamUserStats", @@ -7277,9 +7327,29 @@ { "paramname":"cubData", "paramtype":"uint32" } ], "returntype": "int32" + }, + { + "methodname": "GetAchievementProgressLimits", + "methodname_flat": "SteamAPI_ISteamUserStats_GetAchievementProgressLimitsInt32", + "params": [ + { "paramname":"pchName", "paramtype":"const char *" }, + { "paramname":"pnMinProgress", "paramtype":"int32 *" }, + { "paramname":"pnMaxProgress", "paramtype":"int32 *" } + ], + "returntype": "bool" + }, + { + "methodname": "GetAchievementProgressLimits", + "methodname_flat": "SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat", + "params": [ + { "paramname":"pchName", "paramtype":"const char *" }, + { "paramname":"pfMinProgress", "paramtype":"float *" }, + { "paramname":"pfMaxProgress", "paramtype":"float *" } + ], + "returntype": "bool" } ], - "version_string": "STEAMUSERSTATS_INTERFACE_VERSION011" + "version_string": "STEAMUSERSTATS_INTERFACE_VERSION012" }, { "accessors": [ @@ -7510,6 +7580,15 @@ "methodname_flat": "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing", "params": [], "returntype": "bool" + }, + { + "methodname": "BIsTimedTrial", + "methodname_flat": "SteamAPI_ISteamApps_BIsTimedTrial", + "params": [ + { "paramname":"punSecondsAllowed", "paramtype":"uint32 *" }, + { "paramname":"punSecondsPlayed", "paramtype":"uint32 *" } + ], + "returntype": "bool" } ], "version_string": "STEAMAPPS_INTERFACE_VERSION008" @@ -10873,6 +10952,16 @@ { "paramname":"pResultHandle", "paramtype":"SteamInventoryResult_t *" } ], "returntype": "bool" + }, + { + "desc": "Look up the given token and return a pseudo-Inventory item.", + "methodname": "InspectItem", + "methodname_flat": "SteamAPI_ISteamInventory_InspectItem", + "params": [ + { "paramname":"pResultHandle", "paramtype":"SteamInventoryResult_t *" }, + { "paramname":"pchItemToken", "paramtype":"const char *" } + ], + "returntype": "bool" } ], "version_string": "STEAMINVENTORY_INTERFACE_V003" @@ -10926,82 +11015,6 @@ ], "version_string": "STEAMVIDEO_INTERFACE_V002" }, - { - "accessors": [ - { - "kind": "user", - "name": "SteamTV", - "name_flat": "SteamAPI_SteamTV_v001" - } - ], - "classname": "ISteamTV", - "fields": [], - "methods": [ - { - "methodname": "IsBroadcasting", - "methodname_flat": "SteamAPI_ISteamTV_IsBroadcasting", - "params": [ - { "paramname":"pnNumViewers", "paramtype":"int *" } - ], - "returntype": "bool" - }, - { - "methodname": "AddBroadcastGameData", - "methodname_flat": "SteamAPI_ISteamTV_AddBroadcastGameData", - "params": [ - { "paramname":"pchKey", "paramtype":"const char *" }, - { "paramname":"pchValue", "paramtype":"const char *" } - ], - "returntype": "void" - }, - { - "methodname": "RemoveBroadcastGameData", - "methodname_flat": "SteamAPI_ISteamTV_RemoveBroadcastGameData", - "params": [ - { "paramname":"pchKey", "paramtype":"const char *" } - ], - "returntype": "void" - }, - { - "methodname": "AddTimelineMarker", - "methodname_flat": "SteamAPI_ISteamTV_AddTimelineMarker", - "params": [ - { "paramname":"pchTemplateName", "paramtype":"const char *" }, - { "paramname":"bPersistent", "paramtype":"bool" }, - { "paramname":"nColorR", "paramtype":"uint8" }, - { "paramname":"nColorG", "paramtype":"uint8" }, - { "paramname":"nColorB", "paramtype":"uint8" } - ], - "returntype": "void" - }, - { - "methodname": "RemoveTimelineMarker", - "methodname_flat": "SteamAPI_ISteamTV_RemoveTimelineMarker", - "params": [], - "returntype": "void" - }, - { - "methodname": "AddRegion", - "methodname_flat": "SteamAPI_ISteamTV_AddRegion", - "params": [ - { "paramname":"pchElementName", "paramtype":"const char *" }, - { "paramname":"pchTimelineDataSection", "paramtype":"const char *" }, - { "paramname":"pSteamTVRegion", "paramtype":"const SteamTVRegion_t *" }, - { "paramname":"eSteamTVRegionBehavior", "paramtype":"ESteamTVRegionBehavior" } - ], - "returntype": "uint32" - }, - { - "methodname": "RemoveRegion", - "methodname_flat": "SteamAPI_ISteamTV_RemoveRegion", - "params": [ - { "paramname":"unRegionHandle", "paramtype":"uint32" } - ], - "returntype": "void" - } - ], - "version_string": "STEAMTV_INTERFACE_V001" - }, { "accessors": [ { @@ -12337,13 +12350,6 @@ ], "struct": "FriendGameInfo_t" }, - { - "fields": [ - { "fieldname":"m_uiOnlineSessionInstances", "fieldtype":"uint32" }, - { "fieldname":"m_uiPublishedToFriendsSessionInstance", "fieldtype":"uint8" } - ], - "struct": "FriendSessionStateInfo_t" - }, { "fields": [ { "fieldname":"m_szKey", "fieldtype":"char [256]" }, @@ -12624,15 +12630,6 @@ ], "struct": "SteamItemDetails_t" }, - { - "fields": [ - { "fieldname":"unMinX", "fieldtype":"uint32" }, - { "fieldname":"unMinY", "fieldtype":"uint32" }, - { "fieldname":"unMaxX", "fieldtype":"uint32" }, - { "fieldname":"unMaxY", "fieldtype":"uint32" } - ], - "struct": "SteamTVRegion_t" - }, { "consts": [ { "constname":"k_cchMaxString", "consttype":"int", "constval":"48" } @@ -12731,7 +12728,7 @@ "consts": [ { "constname":"k_cchMaxString", "consttype":"int", "constval":"128" }, { "constname":"k_cchMaxGenericString", "consttype":"int", "constval":"32" }, - { "constname":"k_cchMaxXboxPairwiseID", "consttype":"int", "constval":"32" }, + { "constname":"k_cchMaxXboxPairwiseID", "consttype":"int", "constval":"33" }, { "constname":"k_cbMaxGenericBytes", "consttype":"int", "constval":"32" } ], "fields": [ @@ -12893,7 +12890,8 @@ { "fieldname":"m_eEndReason", "fieldtype":"int" }, { "fieldname":"m_szEndDebug", "fieldtype":"char [128]" }, { "fieldname":"m_szConnectionDescription", "fieldtype":"char [128]" }, - { "fieldname":"reserved", "fieldtype":"uint32 [64]" } + { "fieldname":"m_eTransportKind", "fieldtype":"ESteamNetTransportKind" }, + { "fieldname":"reserved", "fieldtype":"uint32 [63]" } ], "struct": "SteamNetConnectionInfo_t" }, @@ -12955,6 +12953,60 @@ ], "struct": "SteamNetworkingConfigValue_t" }, + { + "fields": [ + { + "fieldname": "buf", + "fieldtype": "char [8]", + "private": true + } + ], + "methods": [ + { + "methodname": "c_str", + "methodname_flat": "SteamAPI_SteamNetworkingPOPIDRender_c_str", + "params": [], + "returntype": "const char *" + } + ], + "struct": "SteamNetworkingPOPIDRender" + }, + { + "fields": [ + { + "fieldname": "buf", + "fieldtype": "char [128]", + "private": true + } + ], + "methods": [ + { + "methodname": "c_str", + "methodname_flat": "SteamAPI_SteamNetworkingIdentityRender_c_str", + "params": [], + "returntype": "const char *" + } + ], + "struct": "SteamNetworkingIdentityRender" + }, + { + "fields": [ + { + "fieldname": "buf", + "fieldtype": "char [48]", + "private": true + } + ], + "methods": [ + { + "methodname": "c_str", + "methodname_flat": "SteamAPI_SteamNetworkingIPAddrRender_c_str", + "params": [], + "returntype": "const char *" + } + ], + "struct": "SteamNetworkingIPAddrRender" + }, { "fields": [ { "fieldname":"m_cbSize", "fieldtype":"int" }, diff --git a/Generator/steam_sdk/steam_api_flat.h b/Generator/steam_sdk/steam_api_flat.h index 5a9125d..d03f1b1 100644 --- a/Generator/steam_sdk/steam_api_flat.h +++ b/Generator/steam_sdk/steam_api_flat.h @@ -56,7 +56,7 @@ S_API ISteamParties * SteamAPI_ISteamClient_GetISteamParties( ISteamClient* self S_API ISteamRemotePlay * SteamAPI_ISteamClient_GetISteamRemotePlay( ISteamClient* self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion ); // ISteamUser -S_API ISteamUser *SteamAPI_SteamUser_v020(); +S_API ISteamUser *SteamAPI_SteamUser_v021(); S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser( ISteamUser* self ); S_API bool SteamAPI_ISteamUser_BLoggedOn( ISteamUser* self ); S_API uint64_steamid SteamAPI_ISteamUser_GetSteamID( ISteamUser* self ); @@ -88,6 +88,7 @@ S_API bool SteamAPI_ISteamUser_BIsPhoneIdentifying( ISteamUser* self ); S_API bool SteamAPI_ISteamUser_BIsPhoneRequiringVerification( ISteamUser* self ); S_API SteamAPICall_t SteamAPI_ISteamUser_GetMarketEligibility( ISteamUser* self ); S_API SteamAPICall_t SteamAPI_ISteamUser_GetDurationControl( ISteamUser* self ); +S_API bool SteamAPI_ISteamUser_BSetDurationControlOnlineState( ISteamUser* self, EDurationControlOnlineState eNewState ); // ISteamFriends S_API ISteamFriends *SteamAPI_SteamFriends_v017(); @@ -165,6 +166,7 @@ S_API bool SteamAPI_ISteamFriends_IsClanPublic( ISteamFriends* self, uint64_stea S_API bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup( ISteamFriends* self, uint64_steamid steamIDClan ); S_API int SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages( ISteamFriends* self ); S_API void SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog( ISteamFriends* self, uint64_steamid steamIDLobby ); +S_API bool SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser( ISteamFriends* self, const char * pchProtocol ); // ISteamUtils S_API ISteamUtils *SteamAPI_SteamUtils_v009(); @@ -374,7 +376,7 @@ S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorkshopFile S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation( ISteamRemoteStorage* self, UGCHandle_t hContent, const char * pchLocation, uint32 unPriority ); // ISteamUserStats -S_API ISteamUserStats *SteamAPI_SteamUserStats_v011(); +S_API ISteamUserStats *SteamAPI_SteamUserStats_v012(); S_API bool SteamAPI_ISteamUserStats_RequestCurrentStats( ISteamUserStats* self ); S_API bool SteamAPI_ISteamUserStats_GetStatInt32( ISteamUserStats* self, const char * pchName, int32 * pData ); S_API bool SteamAPI_ISteamUserStats_GetStatFloat( ISteamUserStats* self, const char * pchName, float * pData ); @@ -418,6 +420,8 @@ S_API bool SteamAPI_ISteamUserStats_GetGlobalStatInt64( ISteamUserStats* self, c S_API bool SteamAPI_ISteamUserStats_GetGlobalStatDouble( ISteamUserStats* self, const char * pchStatName, double * pData ); S_API int32 SteamAPI_ISteamUserStats_GetGlobalStatHistoryInt64( ISteamUserStats* self, const char * pchStatName, int64 * pData, uint32 cubData ); S_API int32 SteamAPI_ISteamUserStats_GetGlobalStatHistoryDouble( ISteamUserStats* self, const char * pchStatName, double * pData, uint32 cubData ); +S_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsInt32( ISteamUserStats* self, const char * pchName, int32 * pnMinProgress, int32 * pnMaxProgress ); +S_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat( ISteamUserStats* self, const char * pchName, float * pfMinProgress, float * pfMaxProgress ); // ISteamApps S_API ISteamApps *SteamAPI_SteamApps_v008(); @@ -450,6 +454,7 @@ S_API void SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys( ISteamApps* self ) S_API SteamAPICall_t SteamAPI_ISteamApps_GetFileDetails( ISteamApps* self, const char * pszFileName ); S_API int SteamAPI_ISteamApps_GetLaunchCommandLine( ISteamApps* self, char * pszCommandLine, int cubCommandLine ); S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self ); +S_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed ); // ISteamNetworking S_API ISteamNetworking *SteamAPI_SteamNetworking_v006(); @@ -811,6 +816,7 @@ S_API bool SteamAPI_ISteamInventory_SetPropertyBool( ISteamInventory* self, Stea S_API bool SteamAPI_ISteamInventory_SetPropertyInt64( ISteamInventory* self, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, int64 nValue ); S_API bool SteamAPI_ISteamInventory_SetPropertyFloat( ISteamInventory* self, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, float flValue ); 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 ); // ISteamVideo S_API ISteamVideo *SteamAPI_SteamVideo_v002(); @@ -819,16 +825,6 @@ S_API bool SteamAPI_ISteamVideo_IsBroadcasting( ISteamVideo* self, int * pnNumVi S_API void SteamAPI_ISteamVideo_GetOPFSettings( ISteamVideo* self, AppId_t unVideoAppID ); S_API bool SteamAPI_ISteamVideo_GetOPFStringForApp( ISteamVideo* self, AppId_t unVideoAppID, char * pchBuffer, int32 * pnBufferSize ); -// ISteamTV -S_API ISteamTV *SteamAPI_SteamTV_v001(); -S_API bool SteamAPI_ISteamTV_IsBroadcasting( ISteamTV* self, int * pnNumViewers ); -S_API void SteamAPI_ISteamTV_AddBroadcastGameData( ISteamTV* self, const char * pchKey, const char * pchValue ); -S_API void SteamAPI_ISteamTV_RemoveBroadcastGameData( ISteamTV* self, const char * pchKey ); -S_API void SteamAPI_ISteamTV_AddTimelineMarker( ISteamTV* self, const char * pchTemplateName, bool bPersistent, uint8 nColorR, uint8 nColorG, uint8 nColorB ); -S_API void SteamAPI_ISteamTV_RemoveTimelineMarker( ISteamTV* self ); -S_API uint32 SteamAPI_ISteamTV_AddRegion( ISteamTV* self, const char * pchElementName, const char * pchTimelineDataSection, const SteamTVRegion_t * pSteamTVRegion, ESteamTVRegionBehavior eSteamTVRegionBehavior ); -S_API void SteamAPI_ISteamTV_RemoveRegion( ISteamTV* self, uint32 unRegionHandle ); - // ISteamParentalSettings S_API ISteamParentalSettings *SteamAPI_SteamParentalSettings_v001(); S_API bool SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled( ISteamParentalSettings* self ); @@ -1053,6 +1049,15 @@ S_API bool SteamAPI_SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity // SteamNetworkingMessage_t S_API void SteamAPI_SteamNetworkingMessage_t_Release( SteamNetworkingMessage_t* self ); +// SteamNetworkingPOPIDRender +S_API const char * SteamAPI_SteamNetworkingPOPIDRender_c_str( SteamNetworkingPOPIDRender* self ); + +// SteamNetworkingIdentityRender +S_API const char * SteamAPI_SteamNetworkingIdentityRender_c_str( SteamNetworkingIdentityRender* self ); + +// SteamNetworkingIPAddrRender +S_API const char * SteamAPI_SteamNetworkingIPAddrRender_c_str( SteamNetworkingIPAddrRender* self ); + // SteamDatagramHostedAddress S_API void SteamAPI_SteamDatagramHostedAddress_Clear( SteamDatagramHostedAddress* self ); S_API SteamNetworkingPOPID SteamAPI_SteamDatagramHostedAddress_GetPopID( SteamDatagramHostedAddress* self ); diff --git a/Generator/steam_sdk/steam_api_internal.h b/Generator/steam_sdk/steam_api_internal.h index f8bf38e..16657ac 100644 --- a/Generator/steam_sdk/steam_api_internal.h +++ b/Generator/steam_sdk/steam_api_internal.h @@ -242,7 +242,6 @@ class ISteamParentalSettings; class ISteamGameSearch; class ISteamInput; class ISteamParties; -class ISteamTV; class ISteamRemotePlay; //----------------------------------------------------------------------------- @@ -310,6 +309,7 @@ enum { k_iSteamSTARCallbacks = 5500 }; enum { k_iClientSTARCallbacks = 5600 }; enum { k_iSteamRemotePlayCallbacks = 5700 }; enum { k_iClientCompatCallbacks = 5800 }; +enum { k_iSteamChatCallbacks = 5900 }; #ifdef _MSVC_VER #pragma warning( pop ) @@ -348,7 +348,6 @@ public: ISteamHTMLSurface* SteamHTMLSurface() const { return m_pSteamHTMLSurface; } ISteamInventory* SteamInventory() const { return m_pSteamInventory; } ISteamVideo* SteamVideo() const { return m_pSteamVideo; } - ISteamTV* SteamTV() const { return m_pSteamTV; } ISteamParentalSettings* SteamParentalSettings() const { return m_pSteamParentalSettings; } ISteamInput* SteamInput() const { return m_pSteamInput; } private: @@ -373,7 +372,6 @@ private: ISteamHTMLSurface *m_pSteamHTMLSurface; ISteamInventory *m_pSteamInventory; ISteamVideo *m_pSteamVideo; - ISteamTV *m_pSteamTV; ISteamParentalSettings *m_pSteamParentalSettings; ISteamInput *m_pSteamInput; }; diff --git a/Generator/steam_sdk/steamclientpublic.h b/Generator/steam_sdk/steamclientpublic.h index f568ec7..f744263 100644 --- a/Generator/steam_sdk/steamclientpublic.h +++ b/Generator/steam_sdk/steamclientpublic.h @@ -141,6 +141,7 @@ enum EResult k_EResultCantRemoveItem = 113, // item can't be removed k_EResultAccountDeleted = 114, // account has been deleted k_EResultExistingUserCancelledLicense = 115, // A license for this already exists, but cancelled + k_EResultCommunityCooldown = 116, // access is denied because of a community cooldown (probably from support profile data resets) }; // Error codes for use with the voice functions @@ -246,9 +247,9 @@ enum EAccountType enum EAppReleaseState { k_EAppReleaseState_Unknown = 0, // unknown, required appinfo or license info is missing - k_EAppReleaseState_Unavailable = 1, // even if user 'just' owns it, can see game at all - k_EAppReleaseState_Prerelease = 2, // can be purchased and is visible in games list, nothing else. Common appInfo section released - k_EAppReleaseState_PreloadOnly = 3, // owners can preload app, not play it. AppInfo fully released. + k_EAppReleaseState_Unavailable = 1, // even owners can't see game in library yet, no AppInfo released + k_EAppReleaseState_Prerelease = 2, // app can be purchased and is visible in library, nothing else. Only Common AppInfo section released + k_EAppReleaseState_PreloadOnly = 3, // owners can preload app, but not play it. All AppInfo sections fully released k_EAppReleaseState_Released = 4, // owners can download and play app. }; @@ -280,6 +281,7 @@ enum EAppOwnershipFlags k_EAppOwnershipFlags_SiteLicense = 0x40000, // Is from a site license k_EAppOwnershipFlags_LegacyFreeSub = 0x80000, // App only owned through Steam's legacy free sub k_EAppOwnershipFlags_InvalidOSType = 0x100000, // app not supported on current OS version, used to indicate a game is 32-bit on post-catalina. Currently it's own flag so the library will display a notice. + k_EAppOwnershipFlags_TimedTrial = 0x200000, // App is playable only for limited time }; @@ -504,6 +506,18 @@ static inline bool BIsVRLaunchOptionType( const ELaunchOptionType eType ) } +//----------------------------------------------------------------------------- +// Purpose: true if this launch option is any of the vr launching types +//----------------------------------------------------------------------------- +static inline bool BIsLaunchOptionTypeExemptFromGameTheater( const ELaunchOptionType eType ) +{ + return eType == k_ELaunchOptionType_Config + || eType == k_ELaunchOptionType_Server + || eType == k_ELaunchOptionType_Editor + || eType == k_ELaunchOptionType_Manual; +} + + //----------------------------------------------------------------------------- // Purpose: code points for VR HMD vendors and models // WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN A DATABASE @@ -693,6 +707,18 @@ enum EDurationControlNotification }; +// +// Specifies a game's online state in relation to duration control +// +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 +}; + + #pragma pack( push, 1 ) #define CSTEAMID_DEFINED diff --git a/Generator/steam_sdk/steamencryptedappticket.h b/Generator/steam_sdk/steamencryptedappticket.h index ca900ea..4419a0b 100644 --- a/Generator/steam_sdk/steamencryptedappticket.h +++ b/Generator/steam_sdk/steamencryptedappticket.h @@ -34,3 +34,7 @@ S_API bool SteamEncryptedAppTicket_BGetAppDefinedValue( uint8 *rgubTicketDecrypt S_API const uint8 *SteamEncryptedAppTicket_GetUserVariableData( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, uint32 *pcubUserData ); S_API bool SteamEncryptedAppTicket_BIsTicketSigned( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, const uint8 *pubRSAKey, uint32 cubRSAKey ); + +S_API bool SteamEncryptedAppTicket_BIsLicenseBorrowed( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted ); + +S_API bool SteamEncryptedAppTicket_BIsLicenseTemporary( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted ); diff --git a/Generator/steam_sdk/steamhttpenums.h b/Generator/steam_sdk/steamhttpenums.h index d95f195..056b0e5 100644 --- a/Generator/steam_sdk/steamhttpenums.h +++ b/Generator/steam_sdk/steamhttpenums.h @@ -84,6 +84,7 @@ enum EHTTPStatusCode k_EHTTPStatusCode417ExpectationFailed = 417, k_EHTTPStatusCode4xxUnknown = 418, // 418 is reserved, so we'll use it to mean unknown k_EHTTPStatusCode429TooManyRequests = 429, + k_EHTTPStatusCode444ConnectionClosed = 444, // nginx only? // Server error codes k_EHTTPStatusCode500InternalServerError = 500, diff --git a/Generator/steam_sdk/steamnetworkingtypes.h b/Generator/steam_sdk/steamnetworkingtypes.h index 54383c0..5f92c38 100644 --- a/Generator/steam_sdk/steamnetworkingtypes.h +++ b/Generator/steam_sdk/steamnetworkingtypes.h @@ -22,7 +22,6 @@ #endif #define STEAMNETWORKINGSOCKETS_STEAMCLIENT #define STEAMNETWORKINGSOCKETS_ENABLE_SDR -#define STEAMNETWORKINGSOCKETS_ENABLE_P2P #include "steam_api_common.h" // //---------------------------------------- @@ -180,6 +179,8 @@ struct SteamNetworkingIPAddr /// form according to RFC5952. If you include the port, IPv6 will be surrounded by /// brackets, e.g. [::1:2]:80. Your buffer should be at least k_cchMaxString bytes /// to avoid truncation + /// + /// See also SteamNetworkingIdentityRender inline void ToString( char *buf, size_t cbBuf, bool bWithPort ) const; /// Parse an IP address and optional port. If a port is not present, it is set to 0. @@ -248,11 +249,13 @@ struct SteamNetworkingIdentity /// or any other time you need to encode the identity as a string. It has a /// URL-like format (type:). Your buffer should be at least /// k_cchMaxString bytes big to avoid truncation. + /// + /// See also SteamNetworkingIPAddrRender void ToString( char *buf, size_t cbBuf ) const; /// Parse back a string that was generated using ToString. If we don't understand the /// string, but it looks "reasonable" (it matches the pattern type: and doesn't - /// have any funcky characters, etc), then we will return true, and the type is set to + /// have any funky characters, etc), then we will return true, and the type is set to /// k_ESteamNetworkingIdentityType_UnknownType. false will only be returned if the string /// looks invalid. bool ParseString( const char *pszStr ); @@ -463,7 +466,7 @@ enum ESteamNetConnectionEnd // on our end k_ESteamNetConnectionEnd_Local_HostedServerPrimaryRelay = 3003, - // We're not able to get the network config. This is + // We're not able to get the SDR network config. This is // *almost* always a local issue, since the network config // comes from the CDN, which is pretty darn reliable. k_ESteamNetConnectionEnd_Local_NetworkConfig = 3004, @@ -472,6 +475,14 @@ enum ESteamNetConnectionEnd // to do this. k_ESteamNetConnectionEnd_Local_Rights = 3005, + // ICE P2P rendezvous failed because we were not able to + // determine our "public" address (e.g. reflexive address via STUN) + // + // If relay fallback is available (it always is on Steam), then + // this is only used internally and will not be returned as a high + // level failure. + k_ESteamNetConnectionEnd_Local_P2P_ICE_NoPublicAddresses = 3006, + k_ESteamNetConnectionEnd_Local_Max = 3999, // 4xxx: Connection failed or ended, and it appears that the @@ -514,6 +525,15 @@ enum ESteamNetConnectionEnd // (Probably the code you are running is too old.) k_ESteamNetConnectionEnd_Remote_BadProtocolVersion = 4006, + // NAT punch failed failed because we never received any public + // addresses from the remote host. (But we did receive some + // signals form them.) + // + // If relay fallback is available (it always is on Steam), then + // this is only used internally and will not be returned as a high + // level failure. + k_ESteamNetConnectionEnd_Remote_P2P_ICE_NoPublicAddresses = 4007, + k_ESteamNetConnectionEnd_Remote_Max = 4999, // 5xxx: Connection failed for some other reason. @@ -546,6 +566,21 @@ enum ESteamNetConnectionEnd // job to open and maintain those sessions.) k_ESteamNetConnectionEnd_Misc_NoRelaySessionsToClient = 5006, + // While trying to initiate a connection, we never received + // *any* communication from the peer. + //k_ESteamNetConnectionEnd_Misc_ServerNeverReplied = 5007, + + // P2P rendezvous failed in a way that we don't have more specific + // information + k_ESteamNetConnectionEnd_Misc_P2P_Rendezvous = 5008, + + // NAT punch failed, probably due to NAT/firewall configuration. + // + // If relay fallback is available (it always is on Steam), then + // this is only used internally and will not be returned as a high + // level failure. + k_ESteamNetConnectionEnd_Misc_P2P_NAT_Firewall = 5009, + k_ESteamNetConnectionEnd_Misc_Max = 5999, k_ESteamNetConnectionEnd__Force32Bit = 0x7fffffff @@ -1055,6 +1090,39 @@ enum ESteamNetworkingConfigValue /// (This flag is itself a dev variable.) k_ESteamNetworkingConfig_EnumerateDevVars = 35, + // + // P2P settings + // + +// /// [listen socket int32] When you create a P2P listen socket, we will automatically +// /// open up a UDP port to listen for LAN connections. LAN connections can be made +// /// without any signaling: both sides can be disconnected from the Internet. +// /// +// /// This value can be set to zero to disable the feature. +// k_ESteamNetworkingConfig_P2P_Discovery_Server_LocalPort = 101, +// +// /// [connection int32] P2P connections can perform broadcasts looking for the peer +// /// on the LAN. +// k_ESteamNetworkingConfig_P2P_Discovery_Client_RemotePort = 102, + + /// [connection string] Comma-separated list of STUN servers that can be used + /// for NAT piercing. If you set this to an empty string, NAT piercing will + /// not be attempted. Also if "public" candidates are not allowed for + /// P2P_Transport_ICE_Enable, then this is ignored. + k_ESteamNetworkingConfig_P2P_STUN_ServerList = 103, + + /// [connection int32] What types of ICE candidates to share with the peer. + /// See k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_xxx values + k_ESteamNetworkingConfig_P2P_Transport_ICE_Enable = 104, + + /// [connection int32] When selecting P2P transport, add various + /// penalties to the scores for selected transports. (Route selection + /// scores are on a scale of milliseconds. The score begins with the + /// route ping time and is then adjusted.) + k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty = 105, + k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106, + //k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107, + // // Settings for SDR relayed connections // @@ -1105,11 +1173,15 @@ enum ESteamNetworkingConfigValue k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36, // - // Log levels for debuging information. A higher priority - // (lower numeric value) will cause more stuff to be printed. + // Log levels for debugging information of various subsystems. + // Higher numeric values will cause more stuff to be printed. + // See ISteamNetworkingUtils::SetDebugOutputFunction for more + // information + // + // The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning. // k_ESteamNetworkingConfig_LogLevel_AckRTT = 13, // [connection int32] RTT calculations for inline pings and replies - k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send + k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send/recv k_ESteamNetworkingConfig_LogLevel_Message = 15, // [connection int32] log each message send/recv k_ESteamNetworkingConfig_LogLevel_PacketGaps = 16, // [connection int32] dropped packets k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, // [connection int32] P2P rendezvous messages @@ -1118,6 +1190,14 @@ enum ESteamNetworkingConfigValue k_ESteamNetworkingConfigValue__Force32Bit = 0x7fffffff }; +// Bitmask of types to share +const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Default = -1; // Special value - use user defaults +const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Disable = 0; // Do not do any ICE work at all or share any IP addresses with peer +const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Relay = 1; // Relayed connection via TURN server. +const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Private = 2; // host addresses that appear to be link-local or RFC1918 addresses +const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Public = 4; // STUN reflexive addresses, or host address that isn't a "private" address +const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All = 0x7fffffff; + /// In a few places we need to set configuration options on listen sockets and connections, and /// have them take effect *before* the listen socket or connection really starts doing anything. /// Creating the object and then setting the options "immediately" after creation doesn't work @@ -1214,6 +1294,8 @@ inline SteamNetworkingPOPID CalculateSteamNetworkingPOPIDFromString( const char } /// Unpack integer to string representation, including terminating '\0' +/// +/// See also SteamNetworkingPOPIDRender template inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id, char (&szCode)[N] ) { @@ -1228,6 +1310,16 @@ inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id, /// The POPID "dev" is used in non-production environments for testing. const SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( (uint32)'d' << 16U ) | ( (uint32)'e' << 8U ) | (uint32)'v'; +/// Utility class for printing a SteamNetworkingPOPID. +struct SteamNetworkingPOPIDRender +{ + SteamNetworkingPOPIDRender( SteamNetworkingPOPID x ) { GetSteamNetworkingLocationPOPStringFromID( x, buf ); } + inline const char *c_str() const { return buf; } +private: + char buf[ 8 ]; +}; + + /////////////////////////////////////////////////////////////////////////////// // // Internal stuff @@ -1268,14 +1360,14 @@ inline bool SteamNetworkingIdentity::operator==(const SteamNetworkingIdentity &x inline void SteamNetworkingMessage_t::Release() { (*m_pfnRelease)( this ); } #if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || !defined( STEAMNETWORKINGSOCKETS_STEAMCLIENT ) -STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort ); -STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ); -STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf ); -STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr ); -inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamAPI_SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); } -inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamAPI_SteamNetworkingIPAddr_ParseString( this, pszStr ); } -inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamAPI_SteamNetworkingIdentity_ToString( *this, buf, cbBuf ); } -inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamAPI_SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); } +STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort ); +STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ); +STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *pIdentity, char *buf, size_t cbBuf ); +STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr ); +inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); } +inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingIPAddr_ParseString( this, pszStr ); } +inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingIdentity_ToString( this, buf, cbBuf ); } +inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); } #endif #endif // #ifndef API_GEN