C# Class Steamworks.SteamRemoteStorage

Show file Open project: rlabrecque/Steamworks.NET

Public Methods

Method Description
CommitPublishedFileUpdate ( PublishedFileUpdateHandle_t updateHandle ) : SteamAPICall_t
CreatePublishedFileUpdateRequest ( PublishedFileId_t unPublishedFileId ) : PublishedFileUpdateHandle_t
DeletePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
EnumeratePublishedFilesByUserAction ( EWorkshopFileAction eAction, uint unStartIndex ) : SteamAPICall_t
EnumeratePublishedWorkshopFiles ( EWorkshopEnumerationType eEnumerationType, uint unStartIndex, uint unCount, uint unDays, System pTags, System pUserTags ) : SteamAPICall_t

this method enumerates the public view of workshop files

EnumerateUserPublishedFiles ( uint unStartIndex ) : SteamAPICall_t

enumerate the files that the current user published with this app

EnumerateUserSharedWorkshopFiles ( CSteamID steamId, uint unStartIndex, System pRequiredTags, System pExcludedTags ) : SteamAPICall_t
EnumerateUserSubscribedFiles ( uint unStartIndex ) : SteamAPICall_t
FileDelete ( string pchFile ) : bool
FileExists ( string pchFile ) : bool

file information

FileFetch ( string pchFile ) : bool

Indicate this file should be downloaded in the next sync

FileForget ( string pchFile ) : bool
FilePersist ( string pchFile ) : bool

Indicate this file should be persisted in the next sync

FilePersisted ( string pchFile ) : bool
FileRead ( string pchFile, byte pvData, int cubDataToRead ) : int
FileReadAsync ( string pchFile, uint nOffset, uint cubToRead ) : SteamAPICall_t
FileReadAsyncComplete ( SteamAPICall_t hReadCall, byte pvBuffer, uint cubToRead ) : bool
FileShare ( string pchFile ) : SteamAPICall_t
FileWrite ( string pchFile, byte pvData, int cubData ) : bool

NOTE

Filenames are case-insensitive, and will be converted to lowercase automatically.

So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then

iterate the files, the filename returned will be "foo.bar".

file operations

FileWriteAsync ( string pchFile, byte pvData, uint cubData ) : SteamAPICall_t
FileWriteStreamCancel ( UGCFileWriteStreamHandle_t writeHandle ) : bool
FileWriteStreamClose ( UGCFileWriteStreamHandle_t writeHandle ) : bool
FileWriteStreamOpen ( string pchFile ) : UGCFileWriteStreamHandle_t

file operations that cause network IO

FileWriteStreamWriteChunk ( UGCFileWriteStreamHandle_t writeHandle, byte pvData, int cubData ) : bool
GetCachedUGCCount ( ) : int

Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead()

GetCachedUGCHandle ( int iCachedContent ) : UGCHandle_t
GetFileCount ( ) : int

iteration

GetFileListFromServer ( ) : void

The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you

On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget.

Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback

GetFileNameAndSize ( int iFile, int &pnFileSizeInBytes ) : string
GetFileSize ( string pchFile ) : int
GetFileTimestamp ( string pchFile ) : long
GetPublishedFileDetails ( PublishedFileId_t unPublishedFileId, uint unMaxSecondsOld ) : SteamAPICall_t

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 k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is.

GetPublishedItemVoteDetails ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
GetQuota ( ulong &pnTotalBytes, ulong &puAvailableBytes ) : bool

configuration management

GetSyncPlatforms ( string pchFile ) : ERemoteStoragePlatform
GetUGCDetails ( UGCHandle_t hContent, AppId_t &pnAppID, string &ppchName, int &pnFileSizeInBytes, CSteamID &pSteamIDOwner ) : bool

Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result

GetUGCDownloadProgress ( UGCHandle_t hContent, int &pnBytesDownloaded, int &pnBytesExpected ) : bool

Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false

or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage

GetUserPublishedItemVoteDetails ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
IsCloudEnabledForAccount ( ) : bool
IsCloudEnabledForApp ( ) : bool
PublishVideo ( EWorkshopVideoProvider eVideoProvider, string pchVideoAccount, string pchVideoIdentifier, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, System pTags ) : SteamAPICall_t
PublishWorkshopFile ( string pchFile, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, System pTags, EWorkshopFileType eWorkshopFileType ) : SteamAPICall_t

publishing UGC

ResetFileRequestState ( ) : bool

Reset any fetch/persist/etc requests

SetCloudEnabledForApp ( bool bEnabled ) : void
SetSyncPlatforms ( string pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) : bool
SetUserPublishedFileAction ( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) : SteamAPICall_t
SubscribePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
SynchronizeToClient ( ) : bool

Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback

SynchronizeToServer ( ) : bool

Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback

UGCDownload ( UGCHandle_t hContent, uint unPriority ) : SteamAPICall_t

user generated content

Downloads a UGC file. A priority value of 0 will download the file immediately,

otherwise it will wait to download the file until all downloads with a lower priority

value are completed. Downloads with equal priority will occur simultaneously.

UGCDownloadToLocation ( UGCHandle_t hContent, string pchLocation, uint unPriority ) : SteamAPICall_t
UGCRead ( UGCHandle_t hContent, byte pvData, int cubDataToRead, uint cOffset, EUGCReadAction eAction ) : int

After download, gets the content of the file.

Small files can be read all at once by calling this function with an offset of 0 and cubDataToRead equal to the size of the file.

Larger files can be read in chunks to reduce memory usage (since both sides of the IPC client and the game itself must allocate

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.

UnsubscribePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
UpdatePublishedFileDescription ( PublishedFileUpdateHandle_t updateHandle, string pchDescription ) : bool
UpdatePublishedFileFile ( PublishedFileUpdateHandle_t updateHandle, string pchFile ) : bool
UpdatePublishedFilePreviewFile ( PublishedFileUpdateHandle_t updateHandle, string pchPreviewFile ) : bool
UpdatePublishedFileSetChangeDescription ( PublishedFileUpdateHandle_t updateHandle, string pchChangeDescription ) : bool
UpdatePublishedFileTags ( PublishedFileUpdateHandle_t updateHandle, System pTags ) : bool
UpdatePublishedFileTitle ( PublishedFileUpdateHandle_t updateHandle, string pchTitle ) : bool
UpdatePublishedFileVisibility ( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) : bool
UpdateUserPublishedItemVote ( PublishedFileId_t unPublishedFileId, bool bVoteUp ) : SteamAPICall_t

Method Details

CommitPublishedFileUpdate() public static method

public static CommitPublishedFileUpdate ( PublishedFileUpdateHandle_t updateHandle ) : SteamAPICall_t
updateHandle PublishedFileUpdateHandle_t
return SteamAPICall_t

CreatePublishedFileUpdateRequest() public static method

public static CreatePublishedFileUpdateRequest ( PublishedFileId_t unPublishedFileId ) : PublishedFileUpdateHandle_t
unPublishedFileId PublishedFileId_t
return PublishedFileUpdateHandle_t

DeletePublishedFile() public static method

public static DeletePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
return SteamAPICall_t

EnumeratePublishedFilesByUserAction() public static method

public static EnumeratePublishedFilesByUserAction ( EWorkshopFileAction eAction, uint unStartIndex ) : SteamAPICall_t
eAction EWorkshopFileAction
unStartIndex uint
return SteamAPICall_t

EnumeratePublishedWorkshopFiles() public static method

this method enumerates the public view of workshop files

public static EnumeratePublishedWorkshopFiles ( EWorkshopEnumerationType eEnumerationType, uint unStartIndex, uint unCount, uint unDays, System pTags, System pUserTags ) : SteamAPICall_t
eEnumerationType EWorkshopEnumerationType
unStartIndex uint
unCount uint
unDays uint
pTags System
pUserTags System
return SteamAPICall_t

EnumerateUserPublishedFiles() public static method

enumerate the files that the current user published with this app

public static EnumerateUserPublishedFiles ( uint unStartIndex ) : SteamAPICall_t
unStartIndex uint
return SteamAPICall_t

EnumerateUserSharedWorkshopFiles() public static method

public static EnumerateUserSharedWorkshopFiles ( CSteamID steamId, uint unStartIndex, System pRequiredTags, System pExcludedTags ) : SteamAPICall_t
steamId CSteamID
unStartIndex uint
pRequiredTags System
pExcludedTags System
return SteamAPICall_t

EnumerateUserSubscribedFiles() public static method

public static EnumerateUserSubscribedFiles ( uint unStartIndex ) : SteamAPICall_t
unStartIndex uint
return SteamAPICall_t

FileDelete() public static method

public static FileDelete ( string pchFile ) : bool
pchFile string
return bool

FileExists() public static method

file information

public static FileExists ( string pchFile ) : bool
pchFile string
return bool

FileFetch() public static method

Indicate this file should be downloaded in the next sync

public static FileFetch ( string pchFile ) : bool
pchFile string
return bool

FileForget() public static method

public static FileForget ( string pchFile ) : bool
pchFile string
return bool

FilePersist() public static method

Indicate this file should be persisted in the next sync

public static FilePersist ( string pchFile ) : bool
pchFile string
return bool

FilePersisted() public static method

public static FilePersisted ( string pchFile ) : bool
pchFile string
return bool

FileRead() public static method

public static FileRead ( string pchFile, byte pvData, int cubDataToRead ) : int
pchFile string
pvData byte
cubDataToRead int
return int

FileReadAsync() public static method

public static FileReadAsync ( string pchFile, uint nOffset, uint cubToRead ) : SteamAPICall_t
pchFile string
nOffset uint
cubToRead uint
return SteamAPICall_t

FileReadAsyncComplete() public static method

public static FileReadAsyncComplete ( SteamAPICall_t hReadCall, byte pvBuffer, uint cubToRead ) : bool
hReadCall SteamAPICall_t
pvBuffer byte
cubToRead uint
return bool

FileShare() public static method

public static FileShare ( string pchFile ) : SteamAPICall_t
pchFile string
return SteamAPICall_t

FileWrite() public static method

NOTE

Filenames are case-insensitive, and will be converted to lowercase automatically.

So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then

iterate the files, the filename returned will be "foo.bar".

file operations

public static FileWrite ( string pchFile, byte pvData, int cubData ) : bool
pchFile string
pvData byte
cubData int
return bool

FileWriteAsync() public static method

public static FileWriteAsync ( string pchFile, byte pvData, uint cubData ) : SteamAPICall_t
pchFile string
pvData byte
cubData uint
return SteamAPICall_t

FileWriteStreamCancel() public static method

public static FileWriteStreamCancel ( UGCFileWriteStreamHandle_t writeHandle ) : bool
writeHandle UGCFileWriteStreamHandle_t
return bool

FileWriteStreamClose() public static method

public static FileWriteStreamClose ( UGCFileWriteStreamHandle_t writeHandle ) : bool
writeHandle UGCFileWriteStreamHandle_t
return bool

FileWriteStreamOpen() public static method

file operations that cause network IO

public static FileWriteStreamOpen ( string pchFile ) : UGCFileWriteStreamHandle_t
pchFile string
return UGCFileWriteStreamHandle_t

FileWriteStreamWriteChunk() public static method

public static FileWriteStreamWriteChunk ( UGCFileWriteStreamHandle_t writeHandle, byte pvData, int cubData ) : bool
writeHandle UGCFileWriteStreamHandle_t
pvData byte
cubData int
return bool

GetCachedUGCCount() public static method

Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead()

public static GetCachedUGCCount ( ) : int
return int

GetCachedUGCHandle() public static method

public static GetCachedUGCHandle ( int iCachedContent ) : UGCHandle_t
iCachedContent int
return UGCHandle_t

GetFileCount() public static method

iteration

public static GetFileCount ( ) : int
return int

GetFileListFromServer() public static method

The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you

On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget.

Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback

public static GetFileListFromServer ( ) : void
return void

GetFileNameAndSize() public static method

public static GetFileNameAndSize ( int iFile, int &pnFileSizeInBytes ) : string
iFile int
pnFileSizeInBytes int
return string

GetFileSize() public static method

public static GetFileSize ( string pchFile ) : int
pchFile string
return int

GetFileTimestamp() public static method

public static GetFileTimestamp ( string pchFile ) : long
pchFile string
return long

GetPublishedFileDetails() public static method

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 k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is.

public static GetPublishedFileDetails ( PublishedFileId_t unPublishedFileId, uint unMaxSecondsOld ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
unMaxSecondsOld uint
return SteamAPICall_t

GetPublishedItemVoteDetails() public static method

public static GetPublishedItemVoteDetails ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
return SteamAPICall_t

GetQuota() public static method

configuration management

public static GetQuota ( ulong &pnTotalBytes, ulong &puAvailableBytes ) : bool
pnTotalBytes ulong
puAvailableBytes ulong
return bool

GetSyncPlatforms() public static method

public static GetSyncPlatforms ( string pchFile ) : ERemoteStoragePlatform
pchFile string
return ERemoteStoragePlatform

GetUGCDetails() public static method

Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result

public static GetUGCDetails ( UGCHandle_t hContent, AppId_t &pnAppID, string &ppchName, int &pnFileSizeInBytes, CSteamID &pSteamIDOwner ) : bool
hContent UGCHandle_t
pnAppID AppId_t
ppchName string
pnFileSizeInBytes int
pSteamIDOwner CSteamID
return bool

GetUGCDownloadProgress() public static method

Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false

or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage

public static GetUGCDownloadProgress ( UGCHandle_t hContent, int &pnBytesDownloaded, int &pnBytesExpected ) : bool
hContent UGCHandle_t
pnBytesDownloaded int
pnBytesExpected int
return bool

GetUserPublishedItemVoteDetails() public static method

public static GetUserPublishedItemVoteDetails ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
return SteamAPICall_t

IsCloudEnabledForAccount() public static method

public static IsCloudEnabledForAccount ( ) : bool
return bool

IsCloudEnabledForApp() public static method

public static IsCloudEnabledForApp ( ) : bool
return bool

PublishVideo() public static method

public static PublishVideo ( EWorkshopVideoProvider eVideoProvider, string pchVideoAccount, string pchVideoIdentifier, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, System pTags ) : SteamAPICall_t
eVideoProvider EWorkshopVideoProvider
pchVideoAccount string
pchVideoIdentifier string
pchPreviewFile string
nConsumerAppId AppId_t
pchTitle string
pchDescription string
eVisibility ERemoteStoragePublishedFileVisibility
pTags System
return SteamAPICall_t

PublishWorkshopFile() public static method

publishing UGC

public static PublishWorkshopFile ( string pchFile, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, System pTags, EWorkshopFileType eWorkshopFileType ) : SteamAPICall_t
pchFile string
pchPreviewFile string
nConsumerAppId AppId_t
pchTitle string
pchDescription string
eVisibility ERemoteStoragePublishedFileVisibility
pTags System
eWorkshopFileType EWorkshopFileType
return SteamAPICall_t

ResetFileRequestState() public static method

Reset any fetch/persist/etc requests

public static ResetFileRequestState ( ) : bool
return bool

SetCloudEnabledForApp() public static method

public static SetCloudEnabledForApp ( bool bEnabled ) : void
bEnabled bool
return void

SetSyncPlatforms() public static method

public static SetSyncPlatforms ( string pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) : bool
pchFile string
eRemoteStoragePlatform ERemoteStoragePlatform
return bool

SetUserPublishedFileAction() public static method

public static SetUserPublishedFileAction ( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
eAction EWorkshopFileAction
return SteamAPICall_t

SubscribePublishedFile() public static method

public static SubscribePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
return SteamAPICall_t

SynchronizeToClient() public static method

Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback

public static SynchronizeToClient ( ) : bool
return bool

SynchronizeToServer() public static method

Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback

public static SynchronizeToServer ( ) : bool
return bool

UGCDownload() public static method

user generated content

Downloads a UGC file. A priority value of 0 will download the file immediately,

otherwise it will wait to download the file until all downloads with a lower priority

value are completed. Downloads with equal priority will occur simultaneously.

public static UGCDownload ( UGCHandle_t hContent, uint unPriority ) : SteamAPICall_t
hContent UGCHandle_t
unPriority uint
return SteamAPICall_t

UGCDownloadToLocation() public static method

public static UGCDownloadToLocation ( UGCHandle_t hContent, string pchLocation, uint unPriority ) : SteamAPICall_t
hContent UGCHandle_t
pchLocation string
unPriority uint
return SteamAPICall_t

UGCRead() public static method

After download, gets the content of the file.

Small files can be read all at once by calling this function with an offset of 0 and cubDataToRead equal to the size of the file.

Larger files can be read in chunks to reduce memory usage (since both sides of the IPC client and the game itself must allocate

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.

public static UGCRead ( UGCHandle_t hContent, byte pvData, int cubDataToRead, uint cOffset, EUGCReadAction eAction ) : int
hContent UGCHandle_t
pvData byte
cubDataToRead int
cOffset uint
eAction EUGCReadAction
return int

UnsubscribePublishedFile() public static method

public static UnsubscribePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
return SteamAPICall_t

UpdatePublishedFileDescription() public static method

public static UpdatePublishedFileDescription ( PublishedFileUpdateHandle_t updateHandle, string pchDescription ) : bool
updateHandle PublishedFileUpdateHandle_t
pchDescription string
return bool

UpdatePublishedFileFile() public static method

public static UpdatePublishedFileFile ( PublishedFileUpdateHandle_t updateHandle, string pchFile ) : bool
updateHandle PublishedFileUpdateHandle_t
pchFile string
return bool

UpdatePublishedFilePreviewFile() public static method

public static UpdatePublishedFilePreviewFile ( PublishedFileUpdateHandle_t updateHandle, string pchPreviewFile ) : bool
updateHandle PublishedFileUpdateHandle_t
pchPreviewFile string
return bool

UpdatePublishedFileSetChangeDescription() public static method

public static UpdatePublishedFileSetChangeDescription ( PublishedFileUpdateHandle_t updateHandle, string pchChangeDescription ) : bool
updateHandle PublishedFileUpdateHandle_t
pchChangeDescription string
return bool

UpdatePublishedFileTags() public static method

public static UpdatePublishedFileTags ( PublishedFileUpdateHandle_t updateHandle, System pTags ) : bool
updateHandle PublishedFileUpdateHandle_t
pTags System
return bool

UpdatePublishedFileTitle() public static method

public static UpdatePublishedFileTitle ( PublishedFileUpdateHandle_t updateHandle, string pchTitle ) : bool
updateHandle PublishedFileUpdateHandle_t
pchTitle string
return bool

UpdatePublishedFileVisibility() public static method

public static UpdatePublishedFileVisibility ( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) : bool
updateHandle PublishedFileUpdateHandle_t
eVisibility ERemoteStoragePublishedFileVisibility
return bool

UpdateUserPublishedItemVote() public static method

public static UpdateUserPublishedItemVote ( PublishedFileId_t unPublishedFileId, bool bVoteUp ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
bVoteUp bool
return SteamAPICall_t