Giver funktioner til at læse, skrive og tilgå filer, som kan gemmes eksternt i Steam-Cloud'en.
Se
Steam Cloud for at få yderligere oplysninger.
Medlemsfunktioner
Medlemsfunktioner for
ISteamRemoteStorage
kaldes gennem den globale accessor-funktion
SteamRemoteStorage()
.
BeginFileWriteBatch
bool BeginFileWriteBatch( );
Use this along with
EndFileWriteBatch to wrap a set of local file writes/deletes that should be considered part of one single state change. For example, if saving game progress requires updating both
savegame1.dat
and
maxprogress.dat
, wrap those operations with calls to
BeginFileWriteBatch
and
EndFileWriteBatch
.
These functions provide a hint to Steam which will help it manage the app's Cloud files. Using these functions is optional, however it will provide better reliability.
Note that the functions may be used whether the writes are done using the
ISteamRemoteStorage
API, or done directly to local disk (where AutoCloud is used).
Returværdier: bool
true if the write batch was begun,
false if there was a batch already in progress.
CommitPublishedFileUpdate
SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageUpdatePublishedFileResult_t call result.
CreatePublishedFileUpdateRequest
PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: PublishedFileUpdateHandle_tDeletePublishedFile
SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageDeletePublishedFileResult_t call result.
EndFileWriteBatch
bool EndFileWriteBatch( );
Use this along with
BeginFileWriteBatch - see that documentation for more details.
Returværdier: bool
true, if the write batch was ended,
false if there was no batch already in progress.
EnumeratePublishedFilesByUserAction
SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageEnumeratePublishedFilesByUserActionResult_t call result.
EnumeratePublishedWorkshopFiles
SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageEnumerateWorkshopFilesResult_t call result.
EnumerateUserPublishedFiles
SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex );
Navn | Type | Beskrivelse |
unStartIndex | uint32 | |
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageEnumerateUserPublishedFilesResult_t call result.
EnumerateUserSharedWorkshopFiles
SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageEnumerateUserPublishedFilesResult_t call result.
EnumerateUserSubscribedFiles
SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex );
Navn | Type | Beskrivelse |
unStartIndex | uint32 | |
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageEnumerateUserSubscribedFilesResult_t call result.
FileDelete
bool FileDelete( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen, skal vil blive slettet. |
Deletes a file from the local disk, and propagates that delete to the cloud.
This is meant to be used when a user actively deletes a file. Use
FileForget if you want to remove a file from the Steam Cloud but retain it on the users local disk.
When a file has been deleted it can be re-written with
FileWrite to reupload it to the Steam Cloud.
Returværdier: bool
true, if the file exists and has been successfully deleted; otherwise,
false if the file did not exist.
FileExists
bool FileExists( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen. |
Checks whether the specified file exists.
Returværdier: bool
true, if the file exists; otherwise,
false.
FileFetch
bool FileFetch( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | |
Deprecated - PS3 Only.
Returværdier: bool
FileForget
bool FileForget( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen, som vil blive glemt. |
Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.
When you are out of Cloud space, this can be used to allow calls to
FileWrite to keep working without needing to make the user delete files.
How you decide which files to forget are up to you. It could be a simple Least Recently Used (LRU) queue or something more complicated.
Requiring the user to manage their Cloud-ized files for a game, while is possible to do, it is never recommended. For instance, "Which file would you like to delete so that you may store this new one?" removes a significant advantage of using the Cloud in the first place: its transparency.
Once a file has been deleted or forgotten, calling
FileWrite will resynchronize it in the Cloud. Rewriting a forgotten file is the only way to make it persisted again.
Returværdier: bool
true if the file exists and has been successfully forgotten; otherwise,
false.
FilePersist
bool FilePersist( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | |
Deprecated - PS3 Only.
Returværdier: bool
FilePersisted
bool FilePersisted( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen. |
Checks if a specific file is persisted in the steam cloud.
Returværdier: bool
true, if the file exists and the file is persisted in the Steam Cloud.
false, if
FileForget was called on it and is only available locally.
FileRead
int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen, der skal læses fra. |
pvData | void * | Bufferen, som filen vil blive læst til. Bufferen skal være mindst samme størrelse som til cubDataToRead . |
cubDataToRead | int32 | Antallet af bytes, der skal læses. Hentes generelt fra GetFileSize eller GetFileTimestamp. |
Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
BEMÆRK: This is a synchronous call and as such is a will block your calling thread on the disk IO, and will also block the SteamAPI, which can cause other threads in your application to block. To avoid "hitching" due to a busy disk on the client machine using
FileReadAsync, the asynchronous version of this API is recommended.
Returværdier: int32The number of bytes read.
Returns
0 if the file doesn't exist or the read fails.
FileReadAsync
SteamAPICall_t FileReadAsync( const char *pchFile, uint32 nOffset, uint32 cubToRead );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen, der skal læses fra. |
nOffset | uint32 | Forskydningen i bytes i den fil, som læsningen starter fra. 0, hvis du læser hele filen i ét stykke. |
cubToRead | uint32 | Antallet af bytes, der skal læses startende med nOffset . |
Starts an asynchronous read from a file.
The offset and amount to read should be valid for the size of the file, as indicated by
GetFileSize or
GetFileTimestamp.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageFileReadAsyncComplete_t call result.
Returns
k_uAPICallInvalid under the following conditions:
- Du forsøgte at læse fra en ugyldig sti eller et ugyldigt filnavn. Eftersom Steam Cloud er en tværplatform, skal filerne have gyldige navne på alle understøttede operativ- og filsystemer. Se Microsofts dokumentation om navngivning af filer, stier og navneområder.
- Filen eksisterer ikke.
-
cubDataToRead
er <= 0 bytes. Du skal kunne læse noget!
- Kombinationen af
pvData
og cubDataToRead
ville læse forbi filens grænser.
- Der er i forvejen en asynkron læsning, som er i gang på denne fil.
Upon completion of the read request you will receive the call result, if the value of
m_eResult
within the call result is
k_EResultOK you can then call
FileReadAsyncComplete to read the requested data into your buffer. The
hReadCall
parameter should match the return value of this function, and the amount to read should generally be equal to the amount requested as indicated by
m_nOffset
and
m_cubRead
.
FileReadAsyncComplete
bool FileReadAsyncComplete( SteamAPICall_t hReadCall, void *pvBuffer, uint32 cubToRead );
Copies the bytes from a file which was asynchronously read with
FileReadAsync into a byte array.
This should never be called outside of the context of a
RemoteStorageFileReadAsyncComplete_t call result.
Returværdier: bool
true, if the file was successfully read.
Otherwise,
false under the following conditions:
- Handlet, som blev sendt til
hReadCall
, er ugyldigt.
- Læsningen mislykkedes som indikeret af
m_eResult
i RemoteStorageFileReadAsyncComplete_t. Du skulle ikke have kaldt denne.
- Bufferen, som blev givet til
pvBuffer
, er ikke stor nok.
FileShare
SteamAPICall_t FileShare( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | |
Returværdier: SteamAPICall_t to be used with a
RemoteStorageFileShareResult_t call result.
FileWrite
bool FileWrite( const char *pchFile, const void *pvData, int32 cubData );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen, der skal skrives til. |
pvData | const void * | De bytes, der skal skrives til filen. |
cubData | int32 | Antallet af bytes, der skal skrives til filen. Typisk den samlede størrelse af pvData . |
Creates a new file, writes the bytes to the file, and then closes the file. If the target file already exists, it is overwritten.
BEMÆRK: This is a synchronous call and as such is a will block your calling thread on the disk IO, and will also block the SteamAPI, which can cause other threads in your application to block. To avoid "hitching" due to a busy disk on the client machine using
FileWriteAsync, the asynchronous version of this API is recommended.
Returværdier: bool
true if the write was successful.
Otherwise,
false under the following conditions:
- Den fil, du prøver at skrive, er større end 100 MiB som defineret af k_unMaxCloudFileChunkSize.
-
cubData
er mindre end 0.
-
pvData
er NULL.
- Du forsøgte at skrive til en ugyldig sti eller et ugyldigt filnavn. Eftersom Steam Cloud er en tværplatform, skal filerne have gyldige navne på alle understøttede operativ- og filsystemer. Se Microsofts dokumentation om navngivning af filer, stier og navneområder.
- Lagerkvoten i Steam Cloud for den nuværende bruger er overskredet. Brugeren kan være løbet tør for plads, eller der kan være for mange filer.
- Steam kunne ikke skrive til disken. Placeringen er muligvis skrivebeskyttet.
FileWriteAsync
SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen, der skal skrives til. |
pvData | const void * | De bytes, der skal skrives til filen. |
cubData | uint32 | Antallet af bytes, der skal skrives til filen. Typisk den samlede størrelse af pvData . |
Creates a new file and asynchronously writes the raw byte data to the Steam Cloud, and then closes the file. If the target file already exists, it is overwritten.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageFileWriteAsyncComplete_t call result.
Returns
k_uAPICallInvalid under the following conditions:
- Den fil, du prøver at skrive, er større end 100 MiB som defineret af k_unMaxCloudFileChunkSize.
-
cubData
er mindre end 0.
-
pvData
er NULL.
- Du forsøgte at skrive til en ugyldig sti eller et ugyldigt filnavn. Eftersom Steam Cloud er en tværplatform, skal filerne have gyldige navne på alle understøttede operativ- og filsystemer. Se Microsofts dokumentation om navngivning af filer, stier og navneområder.
- Lagerkvoten i Steam Cloud for den nuværende bruger er overskredet. Brugeren kan være løbet tør for plads, eller der kan være for mange filer.
FileWriteStreamCancel
bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle );
Cancels a file write stream that was started by
FileWriteStreamOpen.
This trashes all of the data written and closes the write stream, but if there was an existing file with this name, it remains untouched.
Returværdier: bool
FileWriteStreamClose
bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle );
Closes a file write stream that was started by
FileWriteStreamOpen.
This flushes the stream to the disk, overwriting the existing file if there was one.
Returværdier: bool
true, if the file write stream was successfully closed, the file has been committed to the disk.
false, if
writeHandle
is not a valid file write stream.
FileWriteStreamOpen
UGCFileWriteStreamHandle_t FileWriteStreamOpen( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen, der skal skrives til. |
Creates a new file output stream allowing you to stream out data to the Steam Cloud file in chunks. If the target file already exists, it is not overwritten until
FileWriteStreamClose has been called.
To write data out to this stream you can use
FileWriteStreamWriteChunk, and then to close or cancel you use
FileWriteStreamClose and
FileWriteStreamCancel respectively.
Returværdier: UGCFileWriteStreamHandle_tReturns
k_UGCFileStreamHandleInvalid under the following conditions:
- Du forsøgte at skrive til en ugyldig sti eller et ugyldigt filnavn. Eftersom Steam Cloud er en tværplatform, skal filerne have gyldige navne på alle understøttede operativ- og filsystemer. Se Microsofts dokumentation om navngivning af filer, stier og navneområder.
- Lagerkvoten i Steam Cloud for den nuværende bruger er overskredet. Brugeren kan være løbet tør for plads, eller der kan være for mange filer.
FileWriteStreamWriteChunk
bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, const void *pvData, int32 cubData );
Navn | Type | Beskrivelse |
writeHandle | UGCFileWriteStreamHandle_t | Filskrivningssekvensen, der skal skrives til. |
pvData | const void * | Data, der skal skrives til sekvensen. |
cubData | int32 | Størrelsen på pvData i bytes. |
Writes a blob of data to the file write stream.
Returværdier: bool
true, if the data was successfully written to the file write stream.
false, if
writeHandle
is not a valid file write stream,
cubData
is negative or larger than
k_unMaxCloudFileChunkSize, or the current user's Steam Cloud storage quota has been exceeded. They may have run out of space, or have too many files.
GetCachedUGCCount
int32 GetCachedUGCCount();
Returværdier: int32GetCachedUGCHandle
UGCHandle_t GetCachedUGCHandle( int32 iCachedContent );
Navn | Type | Beskrivelse |
iCachedContent | int32 | |
Returværdier: UGCHandle_tGetFileCount
int32 GetFileCount();
Gets the total number of local files synchronized by Steam Cloud.
Used for enumeration with
GetFileNameAndSize.
Returværdier: int32The number of files present for the current user, including files in subfolders.
GetFileListFromServer
void GetFileListFromServer();
Deprecated - PS3 Only.
GetFileNameAndSize
const char * GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes );
Navn | Type | Beskrivelse |
iFile | int | Indekset for filen. Dette skal være mellem 0 og GetFileCount. |
pnFileSizeInBytes | int32 * | Returnerer filstørrelsen i bytes. |
Gets the file name and size of a file from the index.
BEMÆRK: You must call
GetFileCount first to get the number of files.
Returværdier: const char *
The name of the file at the specified index, if it exists. Returns an empty string ("") if the file doesn't exist.
Eksempel:int32 fileCount = SteamRemoteStorage()->GetFileCount();
for ( int i = 0; i < fileCount; ++i ) {
int32 fileSize;
const char *fileName = SteamRemoteStorage()->GetFileNameAndSize( i, &fileSize );
// Do something with fileSize and fileName
}
GetFileSize
int32 GetFileSize( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen. |
Gets the specified files size in bytes.
Returværdier: int32The size of the file in bytes. Returns
0 if the file does not exist.
GetFileTimestamp
int64 GetFileTimestamp( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | Navnet på filen. |
Gets the specified file's last modified timestamp in Unix epoch format (seconds since Jan 1st 1970).
Returværdier: int64The last modified timestamp in Unix epoch format (seconds since Jan 1st 1970).
GetLocalFileChangeCount
int32 GetLocalFileChangeCount( );
Note: only applies to applications flagged as supporting dynamic Steam Cloud sync.
When your application receives a
RemoteStorageLocalFileChange_t, use this method to get the number of changes (file updates and file deletes) that have been made. You can then iterate the changes using
GetLocalFileChange.
Returværdier: int32The number of local file changes that have occurred.
GetLocalFileChange
const char *GetLocalFileChange( int iFile, ERemoteStorageLocalFileChange *pEChangeType, ERemoteStorageFilePathType *pEFilePathType );
Note: only applies to applications flagged as supporting dynamic Steam Cloud sync.
After calling
GetLocalFileChangeCount, use this method to iterate over the changes. The changes described have already been made to local files. Your application should take appropriate action to reload state from disk, and possibly notify the user.
For example: The local system had been suspended, during which time the user played elsewhere and uploaded changes to the Steam Cloud. On resume, Steam downloads those changes to the local system before resuming the application. The application receives an
RemoteStorageLocalFileChange_t, and uses
GetLocalFileChangeCount and
GetLocalFileChange to iterate those changes. Depending on the application structure and the nature of the changes, the application could:
- Re-load game progress to resume at exactly the point where the user was when they exited the game on the other device
- Notify the user of any synchronized changes that don't require reloading
- etc
Returværdier: const char *
The file name or full path of the file affected by this change. See comments on
pEFilePathType
above for more detail.
GetPublishedFileDetails
SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageGetPublishedFileDetailsResult_t call result.
GetPublishedItemVoteDetails
SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageGetPublishedItemVoteDetailsResult_t call result.
GetQuota
bool GetQuota( uint64 *pnTotalBytes, uint64 *puAvailableBytes );
Navn | Type | Beskrivelse |
pnTotalBytes | uint64 * | Returns the total amount of bytes the user has access to. |
puAvailableBytes | uint64 * | Returns the number of bytes available. |
Gets the number of bytes available, and used on the users Steam Cloud storage.
Returværdier: bool
This function always returns
true.
GetSyncPlatforms
ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile );
Navn | Type | Beskrivelse |
pchFile | const char * | The name of the file. |
Obtains the platforms that the specified file will syncronize to.
Returværdier: ERemoteStoragePlatformBitfield containing the platforms that the file was set to with
SetSyncPlatforms.
GetUGCDetails
bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner );
Returværdier: bool
GetUGCDownloadProgress
bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected );
Returværdier: bool
GetUserPublishedItemVoteDetails
SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageGetPublishedItemVoteDetailsResult_t call result.
IsCloudEnabledForAccount
bool IsCloudEnabledForAccount();
Checks if the account wide Steam Cloud setting is enabled for this user; or if they disabled it in the Settings->Cloud dialog.
Ensure that you are also checking
IsCloudEnabledForApp, as these two options are mutually exclusive.
Returværdier: bool
true if Steam Cloud is enabled for this account; otherwise,
false.
IsCloudEnabledForApp
bool IsCloudEnabledForApp();
Checks if the per game Steam Cloud setting is enabled for this user; or if they disabled it in the Game Properties->Update dialog.
Kontrollér, at du også tjekker
IsCloudEnabledForAccount, da disse to muligheder udelukker hinanden.
It's generally recommended that you allow the user to toggle this setting within your in-game options, you can toggle it with
SetCloudEnabledForApp.
Returværdier: bool
true, if Steam Cloud is enabled for this app; otherwise,
false.
PublishVideo
SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStoragePublishFileProgress_t call result.
PublishWorkshopFile
SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStoragePublishFileProgress_t call result.
ResetFileRequestState
bool ResetFileRequestState();
Deprecated - PS3 Only.
Returværdier: bool
SetCloudEnabledForApp
void SetCloudEnabledForApp( bool bEnabled );
Navn | Type | Beskrivelse |
bEnabled | bool | Enable (true) or disable (false) the Steam Cloud for this application? |
Toggles whether the Steam Cloud is enabled for your application.
This setting can be queried with
IsCloudEnabledForApp.
BEMÆRK: This must only ever be called as the direct result of the user explicitly requesting that it's enabled or not. This is typically accomplished with a checkbox within your in-game options.
SetSyncPlatforms
bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform );
Navn | Type | Beskrivelse |
pchFile | const char * | The name of the file. |
eRemoteStoragePlatform | ERemoteStoragePlatform | The platforms that the file will be syncronized to. |
Allows you to specify which operating systems a file will be synchronized to.
Use this if you have a multiplatform game but have data which is incompatible between platforms.
Files default to
k_ERemoteStoragePlatformAll when they are first created. You can use the bitwise OR operator, "|" to specify multiple platforms.
Returværdier: bool
true if the file exists, otherwise false.
SetUserPublishedFileAction
SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageSetUserPublishedFileActionResult_t call result.
SubscribePublishedFile
SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageSubscribePublishedFileResult_t call result.
UGCDownload
SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 unPriority );
Returværdier: SteamAPICall_t to be used with a
RemoteStorageDownloadUGCResult_t call result.
UGCDownloadToLocation
SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority );
Returværdier: SteamAPICall_t to be used with a
RemoteStorageDownloadUGCResult_t call result.
UGCRead
int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction );
Returværdier: int32UnsubscribePublishedFile
SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageUnsubscribePublishedFileResult_t call result.
UpdatePublishedFileDescription
bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: bool
UpdatePublishedFileFile
bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: bool
UpdatePublishedFilePreviewFile
bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle, const char *pchPreviewFile );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: bool
UpdatePublishedFileSetChangeDescription
bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: bool
UpdatePublishedFileTags
bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: bool
UpdatePublishedFileTitle
bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle, const char *pchTitle );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: bool
UpdatePublishedFileVisibility
bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: bool
UpdateUserPublishedItemVote
SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp );
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Returværdier: SteamAPICall_t to be used with a
RemoteStorageUpdateUserPublishedItemVoteResult_t call result.
Tilbagekald
Disse er tilbagekald, som kan aktiveres ved at kalde
SteamAPI_RunCallbacks. Many of these will be fired directly in response to the member functions of
ISteamRemoteStorage
.
RemoteStorageAppSyncedClient_t
Deprecated - PS3 only.
Navn | Type | Beskrivelse |
m_nAppID | AppId_t | |
m_eResult | EResult | |
m_unNumDownloads | int | |
RemoteStorageAppSyncedServer_t
Deprecated - PS3 only.
Navn | Type | Beskrivelse |
m_nAppID | AppId_t | |
m_eResult | EResult | |
m_unNumUploads | int | |
RemoteStorageAppSyncProgress_t
Deprecated - PS3 only.
Navn | Type | Beskrivelse |
m_rgchCurrentFile | char[k_cchFilenameMax] | Current file being transferred |
m_nAppID | AppId_t | App this info relates to |
m_uBytesTransferredThisChunk | uint32 | Bytes transferred this chunk |
m_dAppPercentComplete | double | Percent complete that this app's transfers are |
m_bUploading | bool | if false, downloading |
RemoteStorageAppSyncStatusCheck_t
Deprecated - PS3 only.
RemoteStorageDeletePublishedFileResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: DeletePublishedFileRemoteStorageDownloadUGCResult_t
Navn | Type | Beskrivelse |
m_eResult | EResult | Resultatet af handlingen. |
m_hFile | UGCHandle_t | The handle to the file that was attempted to be downloaded. |
m_nAppID | AppId_t | ID of the app that created this file. |
m_nSizeInBytes | int32 | The size of the file that was downloaded, in bytes. |
m_pchFileName | char[k_cchFilenameMax] | The name of the file that was downloaded. |
m_ulSteamIDOwner | uint64 | Steam ID of the user who created this content. |
Tilknyttede funktioner: UGCDownload,
UGCDownloadToLocationRemoteStorageEnumeratePublishedFilesByUserActionResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: EnumeratePublishedFilesByUserActionRemoteStorageEnumerateUserPublishedFilesResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: EnumerateUserPublishedFiles,
EnumerateUserSharedWorkshopFilesRemoteStorageEnumerateUserSharedWorkshopFilesResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
RemoteStorageEnumerateUserSubscribedFilesResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: EnumerateUserSubscribedFilesRemoteStorageEnumerateWorkshopFilesResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: EnumeratePublishedWorkshopFilesRemoteStorageFileReadAsyncComplete_t
Response when reading a file asyncrounously with
FileReadAsync.
Navn | Type | Beskrivelse |
m_hFileReadAsync | SteamAPICall_t | Call handle of the async read which was made, must be passed to FileReadAsyncComplete to get the data. |
m_eResult | EResult | The result of the operation. If the local read was successful this will be k_EResultOK, you can then call FileReadAsyncComplete to get the data. |
m_nOffset | uint32 | Offset into the file this read was at. |
m_cubRead | uint32 | Amount of bytes read - will be the <= the amount requested. |
Tilknyttede funktioner: FileReadAsyncRemoteStorageFileShareResult_t
Navn | Type | Beskrivelse |
m_eResult | EResult | Resultatet af handlingen |
m_hFile | UGCHandle_t | The handle that can be shared with users and features |
m_rgchFilename | char[k_cchFilenameMax] | The name of the file that was shared |
Tilknyttede funktioner: FileShareRemoteStorageFileWriteAsyncComplete_t
Response when writing a file asyncrounously with
FileWriteAsync.
Navn | Type | Beskrivelse |
m_eResult | EResult | The result of the operation. If the local write was successful then this will be k_EResultOK - any other value likely indicates that the filename is invalid or the available quota would have been exceeded by the requested write. Any attempt to write files that exceed this size will return an EResult of k_EResultInvalidParam. Writing files to the cloud is limited to 100MiB. |
Tilknyttede funktioner: FileWriteAsyncRemoteStorageGetPublishedFileDetailsResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: GetPublishedFileDetailsRemoteStorageGetPublishedItemVoteDetailsResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: GetPublishedItemVoteDetails,
GetUserPublishedItemVoteDetailsRemoteStorageLocalFileChange_t
If a Steam app is flagged for supporting dynamic Steam Cloud sync, and a sync occurs, this callback will be posted to the app if any local files changed.
Tilknyttede funktioner: GetLocalFileChangeCount,
GetLocalFileChangeRemoteStoragePublishedFileDeleted_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Type | Beskrivelse |
m_nPublishedFileId | PublishedFileId_t | Det udgivne fil-ID |
m_nAppID | AppId_t | ID'et på appen, der skal bruge denne fil. |
RemoteStoragePublishedFileSubscribed_t
Navn | Type | Beskrivelse |
m_nPublishedFileId | PublishedFileId_t | Det udgivne fil-ID |
m_nAppID | AppId_t | ID'et på appen, der skal bruge denne fil. |
RemoteStoragePublishedFileUnsubscribed_t
Navn | Type | Beskrivelse |
m_nPublishedFileId | PublishedFileId_t | Det udgivne fil-ID |
m_nAppID | AppId_t | ID'et på appen, der skal bruge denne fil. |
RemoteStoragePublishedFileUpdated_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Type | Beskrivelse |
m_nPublishedFileId | PublishedFileId_t | The published file id |
m_nAppID | AppId_t | ID of the app that will consume this file. |
m_ulUnused | uint64 | not used anymore |
RemoteStoragePublishFileProgress_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Type | Beskrivelse |
m_dPercentFile | double | |
m_bPreview | bool | |
Tilknyttede funktioner: PublishWorkshopFile,
PublishVideoRemoteStoragePublishFileResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Type | Beskrivelse |
m_eResult | EResult | Resultatet af handlingen. |
m_nPublishedFileId | PublishedFileId_t | |
m_bUserNeedsToAcceptWorkshopLegalAgreement | bool | |
RemoteStorageSetUserPublishedFileActionResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: SetUserPublishedFileActionRemoteStorageSubscribePublishedFileResult_t
Kaldes, når brugeren har abonneret på brugerskabt indhold (UGC). Resultat fra
ISteamUGC::SubscribeItem.
Navn | Type | Beskrivelse |
m_eResult | EResult | Resultatet af handlingen. |
m_nPublishedFileId | PublishedFileId_t | The workshop item that the user subscribed to. |
Tilknyttede funktioner: SubscribePublishedFileRemoteStorageUnsubscribePublishedFileResult_t
Kaldes, når brugeren har stoppet sit abonnement på brugerskabt indhold (UGC). Result from
ISteamUGC::UnsubscribeItem.
Navn | Type | Beskrivelse |
m_eResult | EResult | Resultatet af handlingen. |
m_nPublishedFileId | PublishedFileId_t | The workshop item that the user unsubscribed from. |
Tilknyttede funktioner: UnsubscribePublishedFileRemoteStorageUpdatePublishedFileResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Type | Beskrivelse |
m_eResult | EResult | Resultatet af handlingen. |
m_nPublishedFileId | PublishedFileId_t | |
m_bUserNeedsToAcceptWorkshopLegalAgreement | bool | |
Tilknyttede funktioner: CommitPublishedFileUpdateRemoteStorageUpdateUserPublishedItemVoteResult_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Tilknyttede funktioner: UpdateUserPublishedItemVoteRemoteStorageUserVoteDetails_t
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Structs
Disse er strukturer, som funktioner i ISteamRemoteStorage kan returnere og/eller interagere med.
SteamParamStringArray_t
Navn | Type | Beskrivelse |
m_ppStrings | const char ** | Array of strings. |
m_nNumStrings | int32 | The number of strings that are in [param]m_ppStrings[/param]. |
Enums
Disse er optællinger, som defineres til brug med ISteamRemoteStorage.
ERemoteStorageLocalFileChange
Ways in which a local file may be changed by Steam during the application session. See
GetLocalFileChange.
Navn | Værdi | Beskrivelse |
k_ERemoteStorageLocalFileChange_Invalid | 0 | Ubrugt |
k_ERemoteStorageLocalFileChange_FileUpdated | 1 | The file contents changed. |
k_ERemoteStorageLocalFileChange_FileDeleted | 2 | The file was deleted. |
ERemoteStorageFilePathType
For APIs that may return file paths in different forms. See
GetLocalFileChange.
Navn | Værdi | Beskrivelse |
k_ERemoteStorageFilePathType_Invalid | 0 | Ubrugt |
k_ERemoteStorageFilePathType_Absolute | 1 | An absolute disk path is provided. This type of path is used for files managed via AutoCloud. |
k_ERemoteStorageFilePathType_APIFilename | 2 | An ISteamRemoteStorage API relative path is provided. This type of path is used for files managed via the ISteamRemoteStorage API methods (FileWrite, FileRead, etc). |
ERemoteStoragePlatform
Sync Platforms flags. These can be used with
SetSyncPlatforms to restrict a file to a specific OS.
Navn | Værdi | Beskrivelse |
k_ERemoteStoragePlatformNone | 0 | This file will not be downloaded on any platform. |
k_ERemoteStoragePlatformWindows | (1 << 0) | This file will download on Windows. |
k_ERemoteStoragePlatformOSX | (1 << 1) | This file will download on macOS. |
k_ERemoteStoragePlatformPS3 | (1 << 2) | This file will download on the Playstation 3. |
k_ERemoteStoragePlatformLinux | (1 << 3) | This file will download on SteamOS/Linux. |
k_ERemoteStoragePlatformReserved2 | (1 << 4) | Reserveret. |
k_ERemoteStoragePlatformAll | 0xffffffff | This file will download on every platform. This is the default. |
ERemoteStoragePublishedFileVisibility
Possible visibility states that a Workshop item can be in.
Navn | Værdi | Beskrivelse |
k_ERemoteStoragePublishedFileVisibilityPublic | 0 | Visible to everyone. |
k_ERemoteStoragePublishedFileVisibilityFriendsOnly | 1 | Visible to friends only. |
k_ERemoteStoragePublishedFileVisibilityPrivate | 2 | Only visible to the creator. Setting an item to private is the closest that you can get to deleting a workshop item from the API. |
k_ERemoteStoragePublishedFileVisibilityUnlisted | 3 | Visible to everyone, but will not be returned in any global queries. Will also not be returned in any user lists unless the caller is the creator or a subscriber. |
EUGCReadAction
Possible UGC Read Actions used with
UGCRead.
Navn | Værdi | Beskrivelse |
k_EUGCRead_ContinueReadingUntilFinished | 0 | 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_ContinueReading | 1 | 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_Close | 2 | 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. |
EWorkshopEnumerationType
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Værdi | Beskrivelse |
k_EWorkshopEnumerationTypeRankedByVote | 0 | |
k_EWorkshopEnumerationTypeRecent | 1 | |
k_EWorkshopEnumerationTypeTrending | 2 | |
k_EWorkshopEnumerationTypeFavoritesOfFriends | 3 | |
k_EWorkshopEnumerationTypeVotedByFriends | 4 | |
k_EWorkshopEnumerationTypeContentByFriends | 5 | |
k_EWorkshopEnumerationTypeRecentFromFollowedUsers | 6 | |
EWorkshopFileAction
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Værdi | Beskrivelse |
k_EWorkshopFileActionPlayed | 0 | The user has played with or on this item. (e.g. Loaded a weapon or level.) |
k_EWorkshopFileActionCompleted | 1 | The user has completed this item. (e.g. Got to the end of a linear map.) |
EWorkshopFileType
The way that a shared file will be shared with the community.
Navn | Værdi | Beskrivelse |
k_EWorkshopFileTypeFirst | 0 | Only used for enumerating. |
k_EWorkshopFileTypeMicrotransaction | 1 | Workshop item that is meant to be voted on for the purpose of selling in-game. (See: Curated Workshop) |
k_EWorkshopFileTypeCollection | 2 | En samling af værkstedsemner |
k_EWorkshopFileTypeArt | 3 | Illustrationer |
k_EWorkshopFileTypeVideo | 4 | External video. |
k_EWorkshopFileTypeScreenshot | 5 | SKÆRMBILLEDER. |
k_EWorkshopFileTypeGame | 6 | Unused, used to be for Greenlight game entries |
k_EWorkshopFileTypeSoftware | 7 | Unused, used to be for Greenlight software entries. |
k_EWorkshopFileTypeConcept | 8 | Unused, used to be for Greenlight concepts. |
k_EWorkshopFileTypeWebGuide | 9 | Steam-webguide |
k_EWorkshopFileTypeIntegratedGuide | 10 | Applikationsintegreret guide |
k_EWorkshopFileTypeMerch | 11 | Værkstedsemner, som der skal stemmes om med henblik på salg. |
k_EWorkshopFileTypeControllerBinding | 12 | Steam Controller-bindinger. |
k_EWorkshopFileTypeSteamworksAccessInvite | 13 | Bruges kun internt i Steam. |
k_EWorkshopFileTypeSteamVideo | 14 | Steam video. |
k_EWorkshopFileTypeGameManagedItem | 15 | Administreres fuldstændigt af spillet, ikke brugeren, og vises ikke på nettet. |
k_EWorkshopFileTypeMax | 16 | Only used for enumerating. |
EWorkshopVideoProvider
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Værdi | Beskrivelse |
k_EWorkshopVideoProviderNone | 0 | The item has no video. |
k_EWorkshopVideoProviderYoutube | 1 | The item has a Youtube video. |
EWorkshopVote
Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API.
Navn | Værdi | Beskrivelse |
k_EWorkshopVoteUnvoted | 0 | The user has not voted. |
k_EWorkshopVoteFor | 1 | The user has voted this item up. |
k_EWorkshopVoteAgainst | 2 | The user has voted this item down. |
k_EWorkshopVoteLater | 3 | The user has chosen to vote later. |
Typedefs
These are typedefs which are defined for use with ISteamRemoteStorage.
Navn | Basistype | Beskrivelse |
PublishedFileId_t | uint64 | A unique handle to an individual workshop item. |
PublishedFileUpdateHandle_t | uint64 | Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API. |
UGCFileWriteStreamHandle_t | uint64 | Handle used when asynchronously writing to Steam Cloud. |
UGCHandle_t | uint64 | Et unikt handle til et stykke brugerskabt indhold. |
Konstanter
These are constants which are defined for use with ISteamRemoteStorage.
Navn | Type | Værdi | Beskrivelse |
k_cchFilenameMax | uint32 | 260 | The maximum length that a Steam Cloud file path can be. |
k_cchPublishedDocumentChangeDescriptionMax | uint32 | 8000 | Ubrugt |
k_cchPublishedDocumentDescriptionMax | uint32 | 8000 | The maximum size in bytes that a Workshop item description can be. |
k_cchPublishedDocumentTitleMax | uint32 | 128 + 1 | The maximum size in bytes that a Workshop item title can be. |
k_cchPublishedFileURLMax | uint32 | 256 | The maximum size in bytes that a Workshop item URL can be. |
k_cchTagListMax | uint32 | 1024 + 1 | The maximum size in bytes that a Workshop item comma separated tag list can be. |
k_PublishedFileIdInvalid | PublishedFileId_t | 0 | An invalid Workshop item handle. |
k_PublishedFileUpdateHandleInvalid | PublishedFileUpdateHandle_t | 0xffffffffffffffffull | Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API. |
k_UGCFileStreamHandleInvalid | UGCFileWriteStreamHandle_t | 0xffffffffffffffffull | Returned when an error has occured when using FileWriteStreamOpen. |
k_UGCHandleInvalid | UGCHandle_t | 0xffffffffffffffffull | An invalid UGC Handle. This is often returned by functions signifying an error. |
k_unEnumeratePublishedFilesMaxResults | uint32 | 50 | Forældet – bruges kun med den forældede RemoteStorage-baserede værksteds-API. |
k_unMaxCloudFileChunkSize | uint32 | 100 * 1024 * 1024 | Defines the largest allowed file size for the Steam Cloud. Cloud files cannot be written in a single chunk over 100MiB and cannot be over 200MiB total. |
STEAMREMOTESTORAGE_INTERFACE_VERSION | const char * | "STEAMREMOTESTORAGE_INTERFACE_VERSION014" | |