diff --git a/src/lib/public/steam_api.lib b/src/lib/public/steam_api.lib index f163d0c6a..0cc7011a6 100644 Binary files a/src/lib/public/steam_api.lib and b/src/lib/public/steam_api.lib differ diff --git a/src/public/steam/isteamapplist.h b/src/public/steam/isteamapplist.h new file mode 100644 index 000000000..d0fe2c8d8 --- /dev/null +++ b/src/public/steam/isteamapplist.h @@ -0,0 +1,68 @@ +//====== 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 diff --git a/src/public/steam/isteamapps.h b/src/public/steam/isteamapps.h index c47b18397..8a2197edd 100644 --- a/src/public/steam/isteamapps.h +++ b/src/public/steam/isteamapps.h @@ -84,7 +84,7 @@ class ISteamApps // 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 associated DLC. + // Request all proof of purchase keys for the calling appid and asociated DLC. // A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with // appropriate appid values, ending with a final callback where the m_nAppId // member is k_uAppIdInvalid (zero). @@ -110,16 +110,7 @@ class ISteamApps virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0; // 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; + virtual bool SetDlcContext( AppId_t nAppID ) = 0; }; #define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008" diff --git a/src/public/steam/isteamclient.h b/src/public/steam/isteamclient.h index e457e8749..8cd45891a 100644 --- a/src/public/steam/isteamclient.h +++ b/src/public/steam/isteamclient.h @@ -115,12 +115,18 @@ class ISteamClient // 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; @@ -156,7 +162,7 @@ class ISteamClient STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; ) }; -#define STEAMCLIENT_INTERFACE_VERSION "SteamClient021" +#define STEAMCLIENT_INTERFACE_VERSION "SteamClient020" #ifndef STEAM_API_EXPORTS diff --git a/src/public/steam/isteamcontroller.h b/src/public/steam/isteamcontroller.h index 057606c17..d80745505 100644 --- a/src/public/steam/isteamcontroller.h +++ b/src/public/steam/isteamcontroller.h @@ -539,6 +539,7 @@ 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 { diff --git a/src/public/steam/isteamfriends.h b/src/public/steam/isteamfriends.h index 26351eee3..21c23195c 100644 --- a/src/public/steam/isteamfriends.h +++ b/src/public/steam/isteamfriends.h @@ -103,10 +103,6 @@ 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. @@ -521,7 +517,6 @@ struct GameOverlayActivated_t 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 }; diff --git a/src/public/steam/isteaminput.h b/src/public/steam/isteaminput.h index 335f23fee..9b3027852 100644 --- a/src/public/steam/isteaminput.h +++ b/src/public/steam/isteaminput.h @@ -660,6 +660,58 @@ 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 diff --git a/src/public/steam/isteamnetworkingsockets.h b/src/public/steam/isteamnetworkingsockets.h index 427727a6d..b4e9ec332 100644 --- a/src/public/steam/isteamnetworkingsockets.h +++ b/src/public/steam/isteamnetworkingsockets.h @@ -206,7 +206,7 @@ class ISteamNetworkingSockets /// WARNING: Be *very careful* when using the value provided in callbacks structs. /// Callbacks are queued, and the value that you will receive in your /// callback is the userdata that was effective at the time the callback - /// was queued. There are subtle race conditions that can happen if you + /// was queued. There are subtle race conditions that can hapen if you /// don't understand this! /// /// If any incoming messages for this connection are queued, the userdata @@ -397,9 +397,10 @@ class ISteamNetworkingSockets /// 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". 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 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 also is assigned a weight, which controls the approximate proportion /// of the bandwidth that will be consumed by the lane, relative to other lanes @@ -828,7 +829,7 @@ class ISteamNetworkingSockets /// 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. /// diff --git a/src/public/steam/isteamparentalsettings.h b/src/public/steam/isteamparentalsettings.h index 972e355c7..a1ff15205 100644 --- a/src/public/steam/isteamparentalsettings.h +++ b/src/public/steam/isteamparentalsettings.h @@ -29,8 +29,7 @@ enum EParentalFeature k_EFeatureLibrary = 11, k_EFeatureTest = 12, k_EFeatureSiteLicense = 13, - k_EFeatureKioskMode_Deprecated = 14, - k_EFeatureBlockAlways = 15, + k_EFeatureKioskMode = 14, k_EFeatureMax }; diff --git a/src/public/steam/isteamremoteplay.h b/src/public/steam/isteamremoteplay.h index df5ca3f48..569c2359d 100644 --- a/src/public/steam/isteamremoteplay.h +++ b/src/public/steam/isteamremoteplay.h @@ -19,7 +19,6 @@ enum ESteamDeviceFormFactor k_ESteamDeviceFormFactorTablet = 2, k_ESteamDeviceFormFactorComputer = 3, k_ESteamDeviceFormFactorTV = 4, - k_ESteamDeviceFormFactorVRHeadset = 5, }; // Steam Remote Play session ID @@ -52,17 +51,12 @@ class ISteamRemotePlay // This is set to 0x0 if the resolution is not available virtual bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0; - // 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 + // This returns false if the invite can't be sent virtual bool BSendRemotePlayTogetherInvite( CSteamID steamIDFriend ) = 0; }; -#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION002" +#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION001" // Global interface accessor inline ISteamRemotePlay *SteamRemotePlay(); diff --git a/src/public/steam/isteamremotestorage.h b/src/public/steam/isteamremotestorage.h index c0da367e0..01b8dae3a 100644 --- a/src/public/steam/isteamremotestorage.h +++ b/src/public/steam/isteamremotestorage.h @@ -102,10 +102,9 @@ 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 = 17 + k_EWorkshopFileTypeMax = 16 }; diff --git a/src/public/steam/isteamtimeline.h b/src/public/steam/isteamtimeline.h deleted file mode 100644 index 800c6bd1a..000000000 --- a/src/public/steam/isteamtimeline.h +++ /dev/null @@ -1,118 +0,0 @@ -//====== 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 diff --git a/src/public/steam/isteamugc.h b/src/public/steam/isteamugc.h index 40c5947b5..a528f2d7b 100644 --- a/src/public/steam/isteamugc.h +++ b/src/public/steam/isteamugc.h @@ -121,7 +121,6 @@ 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 @@ -155,7 +154,6 @@ 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 }; @@ -194,7 +192,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 (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_nFileSize; // Size of the primary file int32 m_nPreviewFileSize; // Size of the preview file char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website) // voting information @@ -202,8 +200,7 @@ struct SteamUGCDetails_t uint32 m_unVotesDown; // number of votes down float m_flScore; // calculated score // collection details - uint32 m_unNumChildren; - uint64 m_ulTotalFilesSize; // Total size of all files (non-legacy), excluding the preview file + uint32 m_unNumChildren; }; //----------------------------------------------------------------------------- @@ -249,10 +246,6 @@ class ISteamUGC 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 @@ -272,7 +265,6 @@ class ISteamUGC 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; @@ -300,7 +292,7 @@ class ISteamUGC 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, bool bAllowAdminTags = false ) = 0; // change the tags of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size. @@ -314,7 +306,6 @@ class ISteamUGC 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() @@ -391,12 +382,9 @@ class ISteamUGC // 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_VERSION020" +#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION017" // Global interface accessor inline ISteamUGC *SteamUGC(); @@ -464,8 +452,6 @@ struct ItemInstalled_t enum { k_iCallback = k_iSteamUGCCallbacks + 5 }; AppId_t m_unAppID; PublishedFileId_t m_nPublishedFileId; - UGCHandle_t m_hLegacyContent; - uint64 m_unManifestID; }; diff --git a/src/public/steam/isteamutils.h b/src/public/steam/isteamutils.h index be5acb282..c5651e763 100644 --- a/src/public/steam/isteamutils.h +++ b/src/public/steam/isteamutils.h @@ -215,9 +215,6 @@ class ISteamUtils // Dismisses the floating keyboard. virtual bool DismissFloatingGamepadTextInput() = 0; - - // Dismisses the full-screen text input dialog. - virtual bool DismissGamepadTextInput() = 0; }; #define STEAMUTILS_INTERFACE_VERSION "SteamUtils010" @@ -249,7 +246,7 @@ struct IPCountry_t //----------------------------------------------------------------------------- -// Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute +// Purpose: Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute //----------------------------------------------------------------------------- struct LowBatteryPower_t { diff --git a/src/public/steam/isteamvideo.h b/src/public/steam/isteamvideo.h index cd7b19715..4832d7b69 100644 --- a/src/public/steam/isteamvideo.h +++ b/src/public/steam/isteamvideo.h @@ -21,6 +21,9 @@ #error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif + + + //----------------------------------------------------------------------------- // Purpose: Steam Video API //----------------------------------------------------------------------------- @@ -38,11 +41,9 @@ class ISteamVideo 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_V007" +#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V002" // Global interface accessor inline ISteamVideo *SteamVideo(); diff --git a/src/public/steam/steam_api.h b/src/public/steam/steam_api.h index 71d3a8b79..494f1dd1a 100644 --- a/src/public/steam/steam_api.h +++ b/src/public/steam/steam_api.h @@ -36,9 +36,9 @@ #include "isteamhttp.h" #include "isteamcontroller.h" #include "isteamugc.h" +#include "isteamapplist.h" #include "isteamhtmlsurface.h" #include "isteaminventory.h" -#include "isteamtimeline.h" #include "isteamvideo.h" #include "isteamparentalsettings.h" #include "isteaminput.h" @@ -55,54 +55,10 @@ // //----------------------------------------------------------------------------------------------------------------------------------------------------------// -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_Init must be called before using any other API functions. If it fails, an +// error message will be output to the debugger (or stderr) with further information. +S_API bool S_CALLTYPE SteamAPI_Init(); // SteamAPI_Shutdown should be called during process shutdown if possible. S_API void S_CALLTYPE SteamAPI_Shutdown(); @@ -225,42 +181,117 @@ S_API void S_CALLTYPE SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe hStea /// 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 ); -// 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 ) +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// +// CSteamAPIContext +// +// Deprecated! This is not necessary any more. Please use the global accessors directly +// +//----------------------------------------------------------------------------------------------------------------------------------------------------------// + +#ifndef STEAM_API_EXPORTS + +inline bool CSteamAPIContext::Init() { - 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" - - "\0"; - - return SteamInternal_SteamAPI_Init( pszInternalCheckInterfaceVersions, pOutErrMsg ); + m_pSteamClient = ::SteamClient(); + if ( !m_pSteamClient ) + return false; + + m_pSteamUser = ::SteamUser(); + if ( !m_pSteamUser ) + return false; + + 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; } +#endif + #endif // STEAM_API_H diff --git a/src/public/steam/steam_api_common.h b/src/public/steam/steam_api_common.h index cb8e6b779..f3d93e25c 100644 --- a/src/public/steam/steam_api_common.h +++ b/src/public/steam/steam_api_common.h @@ -36,12 +36,6 @@ #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) @@ -55,11 +49,6 @@ 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 @@ -168,9 +157,9 @@ class CCallbackImpl : protected CCallbackBase protected: friend class CCallbackMgr; - 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; } + virtual void Run( void *pvParam ) = 0; + virtual void Run( void *pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/ ) { Run( pvParam ); } + virtual int GetCallbackSizeBytes() { return sizeof_P; } }; @@ -193,9 +182,9 @@ class CCallResult : private CCallbackBase void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; } private: - 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 ); } + virtual void Run( void *pvParam ); + virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ); + virtual int GetCallbackSizeBytes() { return sizeof( P ); } SteamAPICall_t m_hAPICall; T *m_pObj; @@ -223,7 +212,7 @@ class CCallback : public CCallbackImpl< sizeof( P ) > void Unregister(); protected: - virtual void Run( void *pvParam ) S_OVERRIDE; + virtual void Run( void *pvParam ); T *m_pObj; func_t m_Func; diff --git a/src/public/steam/steam_api_flat.h b/src/public/steam/steam_api_flat.h index b948b94a7..ff3a2a18c 100644 --- a/src/public/steam/steam_api_flat.h +++ b/src/public/steam/steam_api_flat.h @@ -44,6 +44,7 @@ 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 ); @@ -228,7 +229,6 @@ 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 @@ -512,9 +512,6 @@ S_API int SteamAPI_ISteamApps_GetLaunchCommandLine( ISteamApps* self, char * psz 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 @@ -757,14 +754,14 @@ S_API bool SteamAPI_ISteamController_GetControllerBindingRevision( ISteamControl // ISteamUGC // A versioned accessor is exported by the library -S_API ISteamUGC *SteamAPI_SteamUGC_v020(); +S_API ISteamUGC *SteamAPI_SteamUGC_v017(); // 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_v020(); } +inline ISteamUGC *SteamAPI_SteamUGC() { return SteamAPI_SteamUGC_v017(); } // A versioned accessor is exported by the library -S_API ISteamUGC *SteamAPI_SteamGameServerUGC_v020(); +S_API ISteamUGC *SteamAPI_SteamGameServerUGC_v017(); // 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_v020(); } +inline ISteamUGC *SteamAPI_SteamGameServerUGC() { return SteamAPI_SteamGameServerUGC_v017(); } 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 ); @@ -783,8 +780,6 @@ S_API bool SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview( ISteamUGC* self, UGC 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 ); @@ -800,7 +795,6 @@ S_API bool SteamAPI_ISteamUGC_SetReturnTotalOnly( ISteamUGC* self, UGCQueryHandl 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 ); @@ -816,7 +810,7 @@ S_API bool SteamAPI_ISteamUGC_SetItemDescription( ISteamUGC* self, UGCUpdateHand 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, bool bAllowAdminTags ); +S_API bool SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags ); 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 ); @@ -830,7 +824,6 @@ S_API bool SteamAPI_ISteamUGC_UpdateItemPreviewVideo( ISteamUGC* self, UGCUpdate 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 ); @@ -858,7 +851,18 @@ S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies( ISteamUGC* self, Pub 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 ); -S_API uint32 SteamAPI_ISteamUGC_GetUserContentDescriptorPreferences( ISteamUGC* self, EUGCContentDescriptorID * pvecDescriptors, uint32 cMaxEntries ); + +// 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 ); // ISteamHTMLSurface @@ -954,23 +958,12 @@ S_API bool SteamAPI_ISteamInventory_SetPropertyFloat( ISteamInventory* self, Ste 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_v007(); +S_API ISteamVideo *SteamAPI_SteamVideo_v002(); // 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_v007(); } +inline ISteamVideo *SteamAPI_SteamVideo() { return SteamAPI_SteamVideo_v002(); } 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 ); @@ -992,16 +985,15 @@ S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList( ISteamParental // ISteamRemotePlay // A versioned accessor is exported by the library -S_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v002(); +S_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v001(); // 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_v002(); } +inline ISteamRemotePlay *SteamAPI_SteamRemotePlay() { return SteamAPI_SteamRemotePlay_v001(); } 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 diff --git a/src/public/steam/steam_api_internal.h b/src/public/steam/steam_api_internal.h index a1a9bed09..282517439 100644 --- a/src/public/steam/steam_api_internal.h +++ b/src/public/steam/steam_api_internal.h @@ -54,7 +54,6 @@ S_API void S_CALLTYPE SteamAPI_UnregisterCallback( class CCallbackBase *pCallbac 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 @@ -63,8 +62,8 @@ S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallb 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( reinterpret_cast(this) - _STEAM_CALLBACK_OFFSETOF( thisclass, m_steamcallback_ ## func ) ); \ + private: virtual void Run( void *pvParam ) { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \ + thisclass *pOuter = reinterpret_cast( reinterpret_cast(this) - offsetof( thisclass, m_steamcallback_ ## func ) ); \ pOuter->func( reinterpret_cast( pvParam ) ); \ } \ } m_steamcallback_ ## func ; void func( param *pParam ) @@ -229,6 +228,7 @@ class ISteamPS3OverlayRender; class ISteamHTTP; class ISteamController; class ISteamUGC; +class ISteamAppList; class ISteamHTMLSurface; class ISteamInventory; class ISteamVideo; @@ -271,6 +271,7 @@ 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 }; @@ -283,7 +284,6 @@ 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 @@ -308,6 +308,67 @@ enum { k_iSteamTimelineCallbacks = 6000 }; #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 { public: diff --git a/src/public/steam/steam_gameserver.h b/src/public/steam/steam_gameserver.h index f3873db00..28a436f56 100644 --- a/src/public/steam/steam_gameserver.h +++ b/src/public/steam/steam_gameserver.h @@ -48,17 +48,7 @@ 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.) -// -// 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; -} +inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); // Shutdown SteamGameSeverXxx interfaces, log out, and free resources. S_API void SteamGameServer_Shutdown(); @@ -111,23 +101,13 @@ inline bool CSteamGameServerAPIContext::Init() } #endif -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 ) +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 ) { - const char *pszInternalCheckInterfaceVersions = - STEAMUTILS_INTERFACE_VERSION "\0" - STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0" - - 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 ); + if ( !SteamInternal_GameServer_Init( unIP, 0, usGamePort, usQueryPort, eServerMode, pchVersionString ) ) + return false; + + return true; } inline void SteamGameServer_ReleaseCurrentThreadMemory() { diff --git a/src/public/steam/steamclientpublic.h b/src/public/steam/steamclientpublic.h index 2bd66253f..a75e7af0b 100644 --- a/src/public/steam/steamclientpublic.h +++ b/src/public/steam/steamclientpublic.h @@ -141,8 +141,6 @@ 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 @@ -461,16 +459,6 @@ enum EDurationControlOnlineState }; -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 diff --git a/src/public/steam/steamhttpenums.h b/src/public/steam/steamhttpenums.h index 3592116a1..21b03a7ba 100644 --- a/src/public/steam/steamhttpenums.h +++ b/src/public/steam/steamhttpenums.h @@ -97,9 +97,4 @@ enum EHTTPStatusCode k_EHTTPStatusCode5xxUnknown = 599, }; -inline bool BIsHTTPStatusSuccess( EHTTPStatusCode eStatus ) -{ - return eStatus >= 200 && eStatus <= 299; -} - #endif // STEAMHTTPENUMS_H \ No newline at end of file diff --git a/src/public/steam/steamnetworkingtypes.h b/src/public/steam/steamnetworkingtypes.h index 3bd920263..f7f731b9e 100644 --- a/src/public/steam/steamnetworkingtypes.h +++ b/src/public/steam/steamnetworkingtypes.h @@ -26,7 +26,7 @@ #if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" #elif defined( STEAMNETWORKINGSOCKETS_FOREXPORT ) - #if defined( _WIN32 ) || defined( __ORBIS__ ) || defined( __PROSPERO__ ) + #ifdef _WIN32 #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __declspec( dllexport ) #else #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __attribute__((visibility("default"))) @@ -1152,42 +1152,6 @@ 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 @@ -1223,12 +1187,9 @@ enum ESteamNetworkingConfigValue // ensure you have the current value. k_ESteamNetworkingConfig_ConnectionUserData = 40, - /// [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. + /// [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) k_ESteamNetworkingConfig_SendRateMin = 10, k_ESteamNetworkingConfig_SendRateMax = 11, @@ -1247,19 +1208,10 @@ 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 @@ -1441,32 +1393,6 @@ 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 // @@ -1580,24 +1506,24 @@ enum ESteamNetworkingConfigValue // Settings for SDR relayed connections // - /// [global int32] If the first N pings to a port all fail, mark that port as unavailable for + /// [int32 global] If the first N pings to a port all fail, mark that port as unavailable for /// a while, and try a different one. Some ISPs and routers may drop the first /// packet, so setting this to 1 may greatly disrupt communications. k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFailInitial = 19, - /// [global int32] If N consecutive pings to a port fail, after having received successful + /// [int32 global] 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, - /// [global int32] Minimum number of lifetime pings we need to send, before we think our estimate + /// [int32 global] 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, - /// [global int32] Set all steam datagram traffic to originate from the same + /// [int32 global] 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 @@ -1609,13 +1535,10 @@ enum ESteamNetworkingConfigValue /// only use relays in that cluster. E.g. 'iad' k_ESteamNetworkingConfig_SDRClient_ForceRelayCluster = 29, - /// [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, + /// [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, /// [global string] For debugging. Override list of relays from the config with /// this set (maybe just one). Comma-separated list. @@ -1628,10 +1551,6 @@ 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. @@ -1647,10 +1566,6 @@ 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, diff --git a/src/public/steam/steamtypes.h b/src/public/steam/steamtypes.h index 657f5b336..6d6324a46 100644 --- a/src/public/steam/steamtypes.h +++ b/src/public/steam/steamtypes.h @@ -98,7 +98,6 @@ 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;