mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Sync with latest source-sdk-2013.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: public interface to user remote file storage in Steam
|
||||
//
|
||||
@ -41,6 +41,7 @@ struct SteamParamStringArray_t
|
||||
typedef uint64 UGCHandle_t;
|
||||
typedef uint64 PublishedFileUpdateHandle_t;
|
||||
typedef uint64 PublishedFileId_t;
|
||||
const PublishedFileId_t k_PublishedFileIdInvalid = 0;
|
||||
const UGCHandle_t k_UGCHandleInvalid = 0xffffffffffffffffull;
|
||||
const PublishedFileUpdateHandle_t k_PublishedFileUpdateHandleInvalid = 0xffffffffffffffffull;
|
||||
|
||||
@ -87,21 +88,24 @@ enum EWorkshopFileType
|
||||
{
|
||||
k_EWorkshopFileTypeFirst = 0,
|
||||
|
||||
k_EWorkshopFileTypeCommunity = 0,
|
||||
k_EWorkshopFileTypeMicrotransaction = 1,
|
||||
k_EWorkshopFileTypeCollection = 2,
|
||||
k_EWorkshopFileTypeArt = 3,
|
||||
k_EWorkshopFileTypeVideo = 4,
|
||||
k_EWorkshopFileTypeScreenshot = 5,
|
||||
k_EWorkshopFileTypeGame = 6,
|
||||
k_EWorkshopFileTypeSoftware = 7,
|
||||
k_EWorkshopFileTypeConcept = 8,
|
||||
k_EWorkshopFileTypeWebGuide = 9,
|
||||
k_EWorkshopFileTypeIntegratedGuide = 10,
|
||||
k_EWorkshopFileTypeMerch = 11,
|
||||
k_EWorkshopFileTypeCommunity = 0,
|
||||
k_EWorkshopFileTypeMicrotransaction = 1,
|
||||
k_EWorkshopFileTypeCollection = 2,
|
||||
k_EWorkshopFileTypeArt = 3,
|
||||
k_EWorkshopFileTypeVideo = 4,
|
||||
k_EWorkshopFileTypeScreenshot = 5,
|
||||
k_EWorkshopFileTypeGame = 6,
|
||||
k_EWorkshopFileTypeSoftware = 7,
|
||||
k_EWorkshopFileTypeConcept = 8,
|
||||
k_EWorkshopFileTypeWebGuide = 9,
|
||||
k_EWorkshopFileTypeIntegratedGuide = 10,
|
||||
k_EWorkshopFileTypeMerch = 11,
|
||||
k_EWorkshopFileTypeControllerBinding = 12,
|
||||
k_EWorkshopFileTypeSteamworksAccessInvite = 13,
|
||||
k_EWorkshopFileTypeSteamVideo = 14,
|
||||
|
||||
// Update k_EWorkshopFileTypeMax if you add values
|
||||
k_EWorkshopFileTypeMax = 12
|
||||
// Update k_EWorkshopFileTypeMax if you add values.
|
||||
k_EWorkshopFileTypeMax = 15
|
||||
|
||||
};
|
||||
|
||||
@ -135,6 +139,24 @@ enum EWorkshopVideoProvider
|
||||
k_EWorkshopVideoProviderYoutube = 1
|
||||
};
|
||||
|
||||
|
||||
enum EUGCReadAction
|
||||
{
|
||||
// Keeps the file handle open unless the last byte is read. You can use this when reading large files (over 100MB) in sequential chunks.
|
||||
// If the last byte is read, this will behave the same as k_EUGCRead_Close. Otherwise, it behaves the same as k_EUGCRead_ContinueReading.
|
||||
// This value maintains the same behavior as before the EUGCReadAction parameter was introduced.
|
||||
k_EUGCRead_ContinueReadingUntilFinished = 0,
|
||||
|
||||
// Keeps the file handle open. Use this when using UGCRead to seek to different parts of the file.
|
||||
// When you are done seeking around the file, make a final call with k_EUGCRead_Close to close it.
|
||||
k_EUGCRead_ContinueReading = 1,
|
||||
|
||||
// Frees the file handle. Use this when you're done reading the content.
|
||||
// To read the file from Steam again you will need to call UGCDownload again.
|
||||
k_EUGCRead_Close = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing, reading and writing files stored remotely
|
||||
// and cached locally
|
||||
@ -200,7 +222,7 @@ class ISteamRemoteStorage
|
||||
// enough memory for each chunk). Once the last byte is read, the file is implicitly closed and further calls to UGCRead will fail
|
||||
// unless UGCDownload is called again.
|
||||
// For especially large files (anything over 100MB) it is a requirement that the file is read in chunks.
|
||||
virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset ) = 0;
|
||||
virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction ) = 0;
|
||||
|
||||
// Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead()
|
||||
virtual int32 GetCachedUGCCount() = 0;
|
||||
@ -235,8 +257,8 @@ class ISteamRemoteStorage
|
||||
virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0;
|
||||
virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0;
|
||||
// Gets published file details for the given publishedfileid. If unMaxSecondsOld is greater than 0,
|
||||
// cached data may be returned, depending on how long ago it was cached. A value of 0 will force a refresh,
|
||||
// a value of -1 will use cached data if it exists, no matter how old it is.
|
||||
// cached data may be returned, depending on how long ago it was cached. A value of 0 will force a refresh.
|
||||
// A value of k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is.
|
||||
virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0;
|
||||
virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
|
||||
// enumerate the files that the current user published with this app
|
||||
@ -258,7 +280,7 @@ class ISteamRemoteStorage
|
||||
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION011"
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION012"
|
||||
|
||||
|
||||
// callbacks
|
||||
@ -342,6 +364,7 @@ struct RemoteStorageFileShareResult_t
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 7 };
|
||||
EResult m_eResult; // The result of the operation
|
||||
UGCHandle_t m_hFile; // The handle that can be shared with users and features
|
||||
char m_rgchFilename[k_cchFilenameMax]; // The name of the file that was shared
|
||||
};
|
||||
|
||||
|
||||
@ -480,6 +503,7 @@ struct RemoteStorageGetPublishedFileDetailsResult_t
|
||||
int32 m_nPreviewFileSize; // Size of the preview file
|
||||
char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website)
|
||||
EWorkshopFileType m_eFileType; // Type of the file
|
||||
bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
|
||||
};
|
||||
|
||||
|
||||
@ -491,6 +515,8 @@ struct RemoteStorageEnumerateWorkshopFilesResult_t
|
||||
int32 m_nTotalResultCount;
|
||||
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
float m_rgScore[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
AppId_t m_nAppId;
|
||||
uint32 m_unStartIndex;
|
||||
};
|
||||
|
||||
|
||||
@ -603,6 +629,18 @@ struct RemoteStoragePublishFileProgress_t
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when the content for a published file is updated
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 30 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
UGCHandle_t m_hFile; // The new content
|
||||
};
|
||||
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
Reference in New Issue
Block a user