C# Класс Steamworks.SteamRemoteStorage

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

CommitPublishedFileUpdate() публичный статический Метод

public static CommitPublishedFileUpdate ( PublishedFileUpdateHandle_t updateHandle ) : SteamAPICall_t
updateHandle PublishedFileUpdateHandle_t
Результат SteamAPICall_t

CreatePublishedFileUpdateRequest() публичный статический Метод

public static CreatePublishedFileUpdateRequest ( PublishedFileId_t unPublishedFileId ) : PublishedFileUpdateHandle_t
unPublishedFileId PublishedFileId_t
Результат PublishedFileUpdateHandle_t

DeletePublishedFile() публичный статический Метод

public static DeletePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
Результат SteamAPICall_t

EnumeratePublishedFilesByUserAction() публичный статический Метод

public static EnumeratePublishedFilesByUserAction ( EWorkshopFileAction eAction, uint unStartIndex ) : SteamAPICall_t
eAction EWorkshopFileAction
unStartIndex uint
Результат SteamAPICall_t

EnumeratePublishedWorkshopFiles() публичный статический Метод

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
Результат SteamAPICall_t

EnumerateUserPublishedFiles() публичный статический Метод

enumerate the files that the current user published with this app

public static EnumerateUserPublishedFiles ( uint unStartIndex ) : SteamAPICall_t
unStartIndex uint
Результат SteamAPICall_t

EnumerateUserSharedWorkshopFiles() публичный статический Метод

public static EnumerateUserSharedWorkshopFiles ( CSteamID steamId, uint unStartIndex, System pRequiredTags, System pExcludedTags ) : SteamAPICall_t
steamId CSteamID
unStartIndex uint
pRequiredTags System
pExcludedTags System
Результат SteamAPICall_t

EnumerateUserSubscribedFiles() публичный статический Метод

public static EnumerateUserSubscribedFiles ( uint unStartIndex ) : SteamAPICall_t
unStartIndex uint
Результат SteamAPICall_t

FileDelete() публичный статический Метод

public static FileDelete ( string pchFile ) : bool
pchFile string
Результат bool

FileExists() публичный статический Метод

file information

public static FileExists ( string pchFile ) : bool
pchFile string
Результат bool

FileFetch() публичный статический Метод

Indicate this file should be downloaded in the next sync

public static FileFetch ( string pchFile ) : bool
pchFile string
Результат bool

FileForget() публичный статический Метод

public static FileForget ( string pchFile ) : bool
pchFile string
Результат bool

FilePersist() публичный статический Метод

Indicate this file should be persisted in the next sync

public static FilePersist ( string pchFile ) : bool
pchFile string
Результат bool

FilePersisted() публичный статический Метод

public static FilePersisted ( string pchFile ) : bool
pchFile string
Результат bool

FileRead() публичный статический Метод

public static FileRead ( string pchFile, byte pvData, int cubDataToRead ) : int
pchFile string
pvData byte
cubDataToRead int
Результат int

FileReadAsync() публичный статический Метод

public static FileReadAsync ( string pchFile, uint nOffset, uint cubToRead ) : SteamAPICall_t
pchFile string
nOffset uint
cubToRead uint
Результат SteamAPICall_t

FileReadAsyncComplete() публичный статический Метод

public static FileReadAsyncComplete ( SteamAPICall_t hReadCall, byte pvBuffer, uint cubToRead ) : bool
hReadCall SteamAPICall_t
pvBuffer byte
cubToRead uint
Результат bool

FileShare() публичный статический Метод

public static FileShare ( string pchFile ) : SteamAPICall_t
pchFile string
Результат SteamAPICall_t

FileWrite() публичный статический Метод

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
Результат bool

FileWriteAsync() публичный статический Метод

public static FileWriteAsync ( string pchFile, byte pvData, uint cubData ) : SteamAPICall_t
pchFile string
pvData byte
cubData uint
Результат SteamAPICall_t

FileWriteStreamCancel() публичный статический Метод

public static FileWriteStreamCancel ( UGCFileWriteStreamHandle_t writeHandle ) : bool
writeHandle UGCFileWriteStreamHandle_t
Результат bool

FileWriteStreamClose() публичный статический Метод

public static FileWriteStreamClose ( UGCFileWriteStreamHandle_t writeHandle ) : bool
writeHandle UGCFileWriteStreamHandle_t
Результат bool

FileWriteStreamOpen() публичный статический Метод

file operations that cause network IO

public static FileWriteStreamOpen ( string pchFile ) : UGCFileWriteStreamHandle_t
pchFile string
Результат UGCFileWriteStreamHandle_t

FileWriteStreamWriteChunk() публичный статический Метод

public static FileWriteStreamWriteChunk ( UGCFileWriteStreamHandle_t writeHandle, byte pvData, int cubData ) : bool
writeHandle UGCFileWriteStreamHandle_t
pvData byte
cubData int
Результат bool

GetCachedUGCCount() публичный статический Метод

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

public static GetCachedUGCCount ( ) : int
Результат int

GetCachedUGCHandle() публичный статический Метод

public static GetCachedUGCHandle ( int iCachedContent ) : UGCHandle_t
iCachedContent int
Результат UGCHandle_t

GetFileCount() публичный статический Метод

iteration

public static GetFileCount ( ) : int
Результат int

GetFileListFromServer() публичный статический Метод

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
Результат void

GetFileNameAndSize() публичный статический Метод

public static GetFileNameAndSize ( int iFile, int &pnFileSizeInBytes ) : string
iFile int
pnFileSizeInBytes int
Результат string

GetFileSize() публичный статический Метод

public static GetFileSize ( string pchFile ) : int
pchFile string
Результат int

GetFileTimestamp() публичный статический Метод

public static GetFileTimestamp ( string pchFile ) : long
pchFile string
Результат long

GetPublishedFileDetails() публичный статический Метод

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
Результат SteamAPICall_t

GetPublishedItemVoteDetails() публичный статический Метод

public static GetPublishedItemVoteDetails ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
Результат SteamAPICall_t

GetQuota() публичный статический Метод

configuration management

public static GetQuota ( ulong &pnTotalBytes, ulong &puAvailableBytes ) : bool
pnTotalBytes ulong
puAvailableBytes ulong
Результат bool

GetSyncPlatforms() публичный статический Метод

public static GetSyncPlatforms ( string pchFile ) : ERemoteStoragePlatform
pchFile string
Результат ERemoteStoragePlatform

GetUGCDetails() публичный статический Метод

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
Результат bool

GetUGCDownloadProgress() публичный статический Метод

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
Результат bool

GetUserPublishedItemVoteDetails() публичный статический Метод

public static GetUserPublishedItemVoteDetails ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
Результат SteamAPICall_t

IsCloudEnabledForAccount() публичный статический Метод

public static IsCloudEnabledForAccount ( ) : bool
Результат bool

IsCloudEnabledForApp() публичный статический Метод

public static IsCloudEnabledForApp ( ) : bool
Результат bool

PublishVideo() публичный статический Метод

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
Результат SteamAPICall_t

PublishWorkshopFile() публичный статический Метод

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
Результат SteamAPICall_t

ResetFileRequestState() публичный статический Метод

Reset any fetch/persist/etc requests

public static ResetFileRequestState ( ) : bool
Результат bool

SetCloudEnabledForApp() публичный статический Метод

public static SetCloudEnabledForApp ( bool bEnabled ) : void
bEnabled bool
Результат void

SetSyncPlatforms() публичный статический Метод

public static SetSyncPlatforms ( string pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) : bool
pchFile string
eRemoteStoragePlatform ERemoteStoragePlatform
Результат bool

SetUserPublishedFileAction() публичный статический Метод

public static SetUserPublishedFileAction ( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
eAction EWorkshopFileAction
Результат SteamAPICall_t

SubscribePublishedFile() публичный статический Метод

public static SubscribePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
Результат SteamAPICall_t

SynchronizeToClient() публичный статический Метод

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

public static SynchronizeToClient ( ) : bool
Результат bool

SynchronizeToServer() публичный статический Метод

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

public static SynchronizeToServer ( ) : bool
Результат bool

UGCDownload() публичный статический Метод

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
Результат SteamAPICall_t

UGCDownloadToLocation() публичный статический Метод

public static UGCDownloadToLocation ( UGCHandle_t hContent, string pchLocation, uint unPriority ) : SteamAPICall_t
hContent UGCHandle_t
pchLocation string
unPriority uint
Результат SteamAPICall_t

UGCRead() публичный статический Метод

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
Результат int

UnsubscribePublishedFile() публичный статический Метод

public static UnsubscribePublishedFile ( PublishedFileId_t unPublishedFileId ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
Результат SteamAPICall_t

UpdatePublishedFileDescription() публичный статический Метод

public static UpdatePublishedFileDescription ( PublishedFileUpdateHandle_t updateHandle, string pchDescription ) : bool
updateHandle PublishedFileUpdateHandle_t
pchDescription string
Результат bool

UpdatePublishedFileFile() публичный статический Метод

public static UpdatePublishedFileFile ( PublishedFileUpdateHandle_t updateHandle, string pchFile ) : bool
updateHandle PublishedFileUpdateHandle_t
pchFile string
Результат bool

UpdatePublishedFilePreviewFile() публичный статический Метод

public static UpdatePublishedFilePreviewFile ( PublishedFileUpdateHandle_t updateHandle, string pchPreviewFile ) : bool
updateHandle PublishedFileUpdateHandle_t
pchPreviewFile string
Результат bool

UpdatePublishedFileSetChangeDescription() публичный статический Метод

public static UpdatePublishedFileSetChangeDescription ( PublishedFileUpdateHandle_t updateHandle, string pchChangeDescription ) : bool
updateHandle PublishedFileUpdateHandle_t
pchChangeDescription string
Результат bool

UpdatePublishedFileTags() публичный статический Метод

public static UpdatePublishedFileTags ( PublishedFileUpdateHandle_t updateHandle, System pTags ) : bool
updateHandle PublishedFileUpdateHandle_t
pTags System
Результат bool

UpdatePublishedFileTitle() публичный статический Метод

public static UpdatePublishedFileTitle ( PublishedFileUpdateHandle_t updateHandle, string pchTitle ) : bool
updateHandle PublishedFileUpdateHandle_t
pchTitle string
Результат bool

UpdatePublishedFileVisibility() публичный статический Метод

public static UpdatePublishedFileVisibility ( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) : bool
updateHandle PublishedFileUpdateHandle_t
eVisibility ERemoteStoragePublishedFileVisibility
Результат bool

UpdateUserPublishedItemVote() публичный статический Метод

public static UpdateUserPublishedItemVote ( PublishedFileId_t unPublishedFileId, bool bVoteUp ) : SteamAPICall_t
unPublishedFileId PublishedFileId_t
bVoteUp bool
Результат SteamAPICall_t