Package host.anzo.eossdk.eos.sdk
Class EOS_TitleStorage_Interface
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_TitleStorage_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
public class EOS_TitleStorage_Interface
extends com.sun.jna.PointerType
The following EOS_TitleStorage_* functions allow you to query metadata for available files from title storage as well as download and read their contents.
- Since:
- 8/31/2023
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the cached copy of a file's metadata by index.Create a cached copy of a file's metadata by filename.deleteCache(EOS_TitleStorage_DeleteCacheOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnDeleteCacheCompleteCallback completionCallback) Clear previously cached file data.intGet the count of files we have previously queried information for and files we have previously read from / written to.voidqueryFile(EOS_TitleStorage_QueryFileOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnQueryFileCompleteCallback completionCallback) Query a specific file's metadata, such as file names, size, and a MD5 hash of the data.voidqueryFileList(EOS_TitleStorage_QueryFileListOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnQueryFileListCompleteCallback completionCallback) Query the file metadata, such as file names, size, and a MD5 hash of the data, for all files available for current user based on their settings (such as game role) and tags provided.readFile(EOS_TitleStorage_ReadFileOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnReadFileCompleteCallback completionCallback) Retrieve the contents of a specific file, potentially downloading the contents if we do not have a local copy, from the cloud.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_TitleStorage_Interface
public EOS_TitleStorage_Interface(com.sun.jna.Pointer address) -
EOS_TitleStorage_Interface
public EOS_TitleStorage_Interface()
-
-
Method Details
-
queryFile
public void queryFile(EOS_TitleStorage_QueryFileOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnQueryFileCompleteCallback completionCallback) Query a specific file's metadata, such as file names, size, and a MD5 hash of the data. This is not required before a file may be opened. Once a file has been queried, its metadata will be available by the EOS_TitleStorage_CopyFileMetadataAtIndex and EOS_TitleStorage_CopyFileMetadataByFilename functions.- Parameters:
options- Object containing properties related to which user is querying files, and what file is being queriedclientData- Optional pointer to help clients track this request, that is returned in the completion callbackcompletionCallback- This function is called when the query operation completes- See Also:
-
queryFileList
public void queryFileList(EOS_TitleStorage_QueryFileListOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnQueryFileListCompleteCallback completionCallback) Query the file metadata, such as file names, size, and a MD5 hash of the data, for all files available for current user based on their settings (such as game role) and tags provided. This is not required before a file can be downloaded by name.- Parameters:
options- Object containing properties related to which user is querying files and the list of tagsclientData- Optional pointer to help clients track this request, that is returned in the completion callbackcompletionCallback- This function is called when the query operation completes- See Also:
-
copyFileMetadataByFilename
public EOS_TitleStorage_FileMetadata copyFileMetadataByFilename(EOS_TitleStorage_CopyFileMetadataByFilenameOptions options) throws EOSException Create a cached copy of a file's metadata by filename. The metadata will be for the last retrieved or successfully saved version, and will not include any changes that have not completed writing. The returned pointer must be released by the user when no longer needed.- Parameters:
options- Object containing properties related to which user is requesting metadata, and for which filename- Returns:
- A copy of the FileMetadata structure will be set if successful. This data must be released by calling EOS_TitleStorage_FileMetadata_Release.
- Throws:
EOSException
-
getFileMetadataCount
Get the count of files we have previously queried information for and files we have previously read from / written to.- Parameters:
options- Object containing properties related to which user is requesting the metadata count- Returns:
- If successful, the count of metadata currently cached. Returns 0 on failure.
- See Also:
-
copyFileMetadataAtIndex
public EOS_TitleStorage_FileMetadata copyFileMetadataAtIndex(EOS_TitleStorage_CopyFileMetadataAtIndexOptions options) throws EOSException Get the cached copy of a file's metadata by index. The metadata will be for the last retrieved version. The returned pointer must be released by the user when no longer needed.- Parameters:
options- Object containing properties related to which user is requesting metadata, and at what index- Returns:
- A copy of the FileMetadata structure will be set if successful. This data must be released by calling EOS_TitleStorage_FileMetadata_Release.
- Throws:
EOSException- See Also:
-
readFile
public EOS_TitleStorageFileTransferRequest readFile(EOS_TitleStorage_ReadFileOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnReadFileCompleteCallback completionCallback) Retrieve the contents of a specific file, potentially downloading the contents if we do not have a local copy, from the cloud. This request will occur asynchronously, potentially over multiple frames. All callbacks for this function will come from the same thread that the SDK is ticked from. If specified, the FileTransferProgressCallback will always be called at least once if the request is started successfully.- Parameters:
options- Object containing properties related to which user is opening the file, what the file's name is, and related mechanisms for copying the dataclientData- Optional pointer to help clients track this request, that is returned in associated callbackscompletionCallback- This function is called when the read operation completes- Returns:
- A valid Title Storage File Request handle if successful, or NULL otherwise. Data contained in the completion callback will have more detailed information about issues with the request in failure cases. This handle must be released when it is no longer needed
- See Also:
-
deleteCache
public EOS_EResult deleteCache(EOS_TitleStorage_DeleteCacheOptions options, com.sun.jna.Pointer clientData, EOS_TitleStorage_OnDeleteCacheCompleteCallback completionCallback) Clear previously cached file data. This operation will be done asynchronously. All cached files except those corresponding to the transfers in progress will be removed.
Warning: Use this with care. Cache system generally tries to clear old and unused cached files from time to time. Unnecessarily clearing cache can degrade performance as SDK will have to re-download data.- Parameters:
options- Object containing properties related to which user is deleting cacheclientData- Optional pointer to help clients track this request, that is returned in associated callbackscompletionCallback- This function is called when the delete cache operation completes- Returns:
EOS_EResult.EOS_Successif the operation was started correctly, otherwise an error result explaining what went wrong
-