Skip to content

Commit

Permalink
Merge pull request #188 from Thelvaen/SDK1.60
Browse files Browse the repository at this point in the history
Update SDK to 1.60
  • Loading branch information
Noxime authored Jul 24, 2024
2 parents 88b255e + a0702f9 commit 260e66d
Show file tree
Hide file tree
Showing 33 changed files with 1,079 additions and 1,126 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steamworks = "0.11.0"

| Crate | SDK | MSRV |
|--------|-------|--------|
| git | 1.59 | 1.71.1 |
| git | 1.60 | 1.71.1 |
| 0.11.0 | 1.58a | 1.71.1 |
| 0.10.0 | 1.54 | 1.56.1 |
| 0.9.0 | 1.53a | 1.56.1 |
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl<Manager> Client<Manager> {
/// Returns an accessor to the steam UGC interface (steam workshop)
pub fn ugc(&self) -> UGC<Manager> {
unsafe {
let ugc = sys::SteamAPI_SteamUGC_v018();
let ugc = sys::SteamAPI_SteamUGC_v020();
debug_assert!(!ugc.is_null());
UGC {
ugc,
Expand Down
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ impl Server {
/// **For this to work properly, you need to call `UGC::init_for_game_server()`!**
pub fn ugc(&self) -> UGC<ServerManager> {
unsafe {
let ugc = sys::SteamAPI_SteamGameServerUGC_v018();
let ugc = sys::SteamAPI_SteamGameServerUGC_v020();
debug_assert!(!ugc.is_null());
UGC {
ugc,
Expand Down
2 changes: 1 addition & 1 deletion src/ugc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ impl<Manager> QueryHandle<Manager> {
api_call,
CALLBACK_BASE_ID + 1,
move |v, io_error| {
let ugc = sys::SteamAPI_SteamUGC_v018();
let ugc = sys::SteamAPI_SteamUGC_v020();
if io_error {
sys::SteamAPI_ISteamUGC_ReleaseQueryUGCRequest(ugc, handle);
cb(Err(SteamError::IOFailure));
Expand Down
68 changes: 0 additions & 68 deletions steamworks-sys/lib/steam/public/steam/isteamapplist.h

This file was deleted.

13 changes: 11 additions & 2 deletions steamworks-sys/lib/steam/public/steam/isteamapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 asociated DLC.
// Request all proof of purchase keys for the calling appid and associated DLC.
// A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with
// appropriate appid values, ending with a final callback where the m_nAppId
// member is k_uAppIdInvalid (zero).
Expand All @@ -110,7 +110,16 @@ 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;
virtual bool SetDlcContext( AppId_t nAppID ) = 0;

// returns total number of known app beta branches (including default "public" branch )
virtual int GetNumBetas( int *pnAvailable, int *pnPrivate ) = 0; //

// return beta branch details, name, description, current BuildID and state flags (EBetaBranchFlags)
virtual bool GetBetaInfo( int iBetaIndex, uint32 *punFlags, uint32 *punBuildID, char *pchBetaName, int cchBetaName, char *pchDescription, int cchDescription ) = 0; // iterate through

// select this beta branch for this app as active, might need the game to restart so Steam can update to that branch
virtual bool SetActiveBeta( const char *pchBetaName ) = 0;
};

#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum EParentalFeature
k_EFeatureTest = 12,
k_EFeatureSiteLicense = 13,
k_EFeatureKioskMode_Deprecated = 14,
k_EFeatureBlockAlways = 15,
k_EFeatureMax
};

Expand Down
118 changes: 118 additions & 0 deletions steamworks-sys/lib/steam/public/steam/isteamtimeline.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
//====== Copyright © Valve Corporation, All rights reserved. =======
//
// Purpose: interface to Steam Timeline
//
//=============================================================================

#ifndef ISTEAMTIMELINE_H
#define ISTEAMTIMELINE_H
#ifdef _WIN32
#pragma once
#endif

#include "steam_api_common.h"

// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif

// Controls the color of the timeline bar segments. The value names listed here map to a multiplayer game, where
// the user starts a game (in menus), then joins a multiplayer session that first has a character selection lobby
// then finally the multiplayer session starts. However, you can also map these values to any type of game. In a single
// player game where you visit towns & dungeons, you could set k_ETimelineGameMode_Menus when the player is in a town
// buying items, k_ETimelineGameMode_Staging for when a dungeon is loading and k_ETimelineGameMode_Playing for when
// inside the dungeon fighting monsters.
enum ETimelineGameMode
{
k_ETimelineGameMode_Invalid = 0,
k_ETimelineGameMode_Playing = 1,
k_ETimelineGameMode_Staging = 2,
k_ETimelineGameMode_Menus = 3,
k_ETimelineGameMode_LoadingScreen = 4,

k_ETimelineGameMode_Max, // one past the last valid value
};

// Used in AddTimelineEvent, where Featured events will be offered before Standard events
enum ETimelineEventClipPriority
{
k_ETimelineEventClipPriority_Invalid = 0,
k_ETimelineEventClipPriority_None = 1,
k_ETimelineEventClipPriority_Standard = 2,
k_ETimelineEventClipPriority_Featured = 3,
};

const uint32 k_unMaxTimelinePriority = 1000;
const float k_flMaxTimelineEventDuration = 600.f;

//-----------------------------------------------------------------------------
// Purpose: Steam Timeline API
//-----------------------------------------------------------------------------
class ISteamTimeline
{
public:

// Sets a description for the current game state in the timeline. These help the user to find specific
// moments in the timeline when saving clips. Setting a new state description replaces any previous
// description.
//
// Examples could include:
// * Where the user is in the world in a single player game
// * Which round is happening in a multiplayer game
// * The current score for a sports game
//
// Parameters:
// - pchDescription: provide a localized string in the language returned by SteamUtils()->GetSteamUILanguage()
// - flTimeDelta: The time offset in seconds to apply to this event. Negative times indicate an
// event that happened in the past.
virtual void SetTimelineStateDescription( const char *pchDescription, float flTimeDelta ) = 0;
virtual void ClearTimelineStateDescription( float flTimeDelta ) = 0;

// Use this to mark an event on the Timeline. The event can be instantaneous or take some amount of time
// to complete, depending on the value passed in flDurationSeconds
//
// Examples could include:
// * a boss battle
// * a cut scene
// * a large team fight
// * picking up a new weapon or ammunition
// * scoring a goal
//
// Parameters:
//
// - pchIcon: specify the name of the icon uploaded through the Steamworks Partner Site for your title
// or one of the provided icons that start with steam_
// - pchTitle & pchDescription: provide a localized string in the language returned by
// SteamUtils()->GetSteamUILanguage()
// - unPriority: specify how important this range is compared to other markers provided by the game.
// Ranges with larger priority values will be displayed more prominently in the UI. This value
// may be between 0 and k_unMaxTimelinePriority.
// - flStartOffsetSeconds: The time that this range started relative to now. Negative times
// indicate an event that happened in the past.
// - flDurationSeconds: How long the time range should be in seconds. For instantaneous events, this
// should be 0
// - ePossibleClip: By setting this parameter to Featured or Standard, the game indicates to Steam that it
// would be appropriate to offer this range as a clip to the user. For instantaneous events, the
// suggested clip will be for a short time before and after the event itself.
virtual void AddTimelineEvent( const char *pchIcon, const char *pchTitle, const char *pchDescription, uint32 unPriority, float flStartOffsetSeconds, float flDurationSeconds, ETimelineEventClipPriority ePossibleClip ) = 0;

// Changes the color of the timeline bar. See ETimelineGameMode comments for how to use each value
virtual void SetTimelineGameMode( ETimelineGameMode eMode ) = 0;
};

#define STEAMTIMELINE_INTERFACE_VERSION "STEAMTIMELINE_INTERFACE_V001"

// Global interface accessor
inline ISteamTimeline *SteamTimeline();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamTimeline *, SteamTimeline, STEAMTIMELINE_INTERFACE_VERSION );


#pragma pack( pop )


#endif // ISTEAMTIMELINE_H
15 changes: 12 additions & 3 deletions steamworks-sys/lib/steam/public/steam/isteamugc.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,16 @@ struct SteamUGCDetails_t
UGCHandle_t m_hFile; // The handle of the primary file
UGCHandle_t m_hPreviewFile; // The handle of the preview file
char m_pchFileName[k_cchFilenameMax]; // The cloud filename of the primary file
int32 m_nFileSize; // Size of the primary file
int32 m_nFileSize; // Size of the primary file (for legacy items which only support one file). This may not be accurate for non-legacy items which can be greater than 4gb in size.
int32 m_nPreviewFileSize; // Size of the preview file
char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website)
// voting information
uint32 m_unVotesUp; // number of votes up
uint32 m_unVotesDown; // number of votes down
float m_flScore; // calculated score
// collection details
uint32 m_unNumChildren;
uint32 m_unNumChildren;
uint64 m_ulTotalFilesSize; // Total size of all files (non-legacy), excluding the preview file
};

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -248,6 +249,10 @@ 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
Expand All @@ -267,6 +272,7 @@ 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;
Expand Down Expand Up @@ -308,6 +314,7 @@ 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()
Expand Down Expand Up @@ -389,7 +396,7 @@ class ISteamUGC
virtual uint32 GetUserContentDescriptorPreferences( EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries ) = 0;
};

#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION018"
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION020"

// Global interface accessor
inline ISteamUGC *SteamUGC();
Expand Down Expand Up @@ -457,6 +464,8 @@ struct ItemInstalled_t
enum { k_iCallback = k_iSteamUGCCallbacks + 5 };
AppId_t m_unAppID;
PublishedFileId_t m_nPublishedFileId;
UGCHandle_t m_hLegacyContent;
uint64 m_unManifestID;
};


Expand Down
7 changes: 3 additions & 4 deletions steamworks-sys/lib/steam/public/steam/isteamvideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif




//-----------------------------------------------------------------------------
// Purpose: Steam Video API
//-----------------------------------------------------------------------------
Expand All @@ -41,9 +38,11 @@ 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_V002"
#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V007"

// Global interface accessor
inline ISteamVideo *SteamVideo();
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 260e66d

Please sign in to comment.