Package host.anzo.eossdk.eos.sdk
Class EOS_PlayerDataStorage_Interface
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_PlayerDataStorage_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
public class EOS_PlayerDataStorage_Interface
extends com.sun.jna.PointerType
The following EOS_PlayerDataStorage_* functions allow you to query file metadata; create/upload files; and duplicate, read, and delete existing files
- Since:
- 8/22/2023
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum File Name Length in bytes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyFileMetadataAtIndex(EOS_PlayerDataStorage_CopyFileMetadataAtIndexOptions copyFileMetadataOptions) Get the cached copy of a file's metadata by index.copyFileMetadataByFilename(EOS_PlayerDataStorage_CopyFileMetadataByFilenameOptions copyFileMetadataOptions) Create the cached copy of a file's metadata by filename.deleteCache(EOS_PlayerDataStorage_DeleteCacheOptions options, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnDeleteCacheCompleteCallback completionCallback) Clear previously cached file data.voiddeleteFile(EOS_PlayerDataStorage_DeleteFileOptions deleteOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnDeleteFileCompleteCallback completionCallback) Deletes an existing file in the cloud.voidduplicateFile(EOS_PlayerDataStorage_DuplicateFileOptions duplicateOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnDuplicateFileCompleteCallback completionCallback) Copies the data of an existing file to a new filename.intgetFileMetadataCount(EOS_PlayerDataStorage_GetFileMetadataCountOptions getFileMetadataCountOptions) Get the count of files we have previously queried information for and files we have previously read from / written to.voidqueryFile(EOS_PlayerDataStorage_QueryFileOptions queryFileOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnQueryFileCompleteCallback completionCallback) Query a specific file's metadata, such as file names, size, and a MD5 hash of the data.voidqueryFileList(EOS_PlayerDataStorage_QueryFileListOptions queryFileListOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnQueryFileListCompleteCallback completionCallback) Query the file metadata, such as file names, size, and a MD5 hash of the data, for all files owned by this user for this application.readFile(EOS_PlayerDataStorage_ReadFileOptions readOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnReadFileCompleteCallback completionCallback) Retrieve the contents of a specific file, potentially downloading the contents if we do not have a local copy, from the cloud.writeFile(EOS_PlayerDataStorage_WriteFileOptions writeOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnWriteFileCompleteCallback completionCallback) Write new data to a specific file, potentially overwriting any existing file by the same name, to the cloud.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Field Details
-
EOS_PLAYERDATASTORAGE_FILENAME_MAX_LENGTH_BYTES
public static final int EOS_PLAYERDATASTORAGE_FILENAME_MAX_LENGTH_BYTESMaximum File Name Length in bytes- See Also:
-
-
Constructor Details
-
EOS_PlayerDataStorage_Interface
public EOS_PlayerDataStorage_Interface(com.sun.jna.Pointer address) -
EOS_PlayerDataStorage_Interface
public EOS_PlayerDataStorage_Interface()
-
-
Method Details
-
queryFile
public void queryFile(EOS_PlayerDataStorage_QueryFileOptions queryFileOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_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, saved, copied, or deleted. Once a file has been queried, its metadata will be available by the EOS_PlayerDataStorage_CopyFileMetadataAtIndex and EOS_PlayerDataStorage_CopyFileMetadataByFilename functions.- Parameters:
queryFileOptions- 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_PlayerDataStorage_QueryFileListOptions queryFileListOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnQueryFileListCompleteCallback completionCallback) Query the file metadata, such as file names, size, and a MD5 hash of the data, for all files owned by this user for this application. This is not required before a file may be opened, saved, copied, or deleted.- Parameters:
queryFileListOptions- Object containing properties related to which user is querying filesclientData- 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_PlayerDataStorage_FileMetadata copyFileMetadataByFilename(EOS_PlayerDataStorage_CopyFileMetadataByFilenameOptions copyFileMetadataOptions) throws EOSException Create the 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:
copyFileMetadataOptions- 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_PlayerDataStorage_FileMetadata_Release.
- Throws:
EOSException- error result explaining what went wrong if the metadata isn't cached
-
getFileMetadataCount
public int getFileMetadataCount(EOS_PlayerDataStorage_GetFileMetadataCountOptions getFileMetadataCountOptions) throws EOSException Get the count of files we have previously queried information for and files we have previously read from / written to.- Parameters:
getFileMetadataCountOptions- Object containing properties related to which user is requesting the metadata count- Returns:
- the count of metadata currently cached
- Throws:
EOSException- error result explaining what went wrong if the input was invalid- See Also:
-
copyFileMetadataAtIndex
public EOS_PlayerDataStorage_FileMetadata copyFileMetadataAtIndex(EOS_PlayerDataStorage_CopyFileMetadataAtIndexOptions copyFileMetadataOptions) throws EOSException Get the cached copy of a file's metadata by index. The metadata will be for the last retrieved or successfully saved version, and will not include any local changes that have not been committed by calling SaveFile. The returned pointer must be released by the user when no longer needed.- Parameters:
copyFileMetadataOptions- 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_PlayerDataStorage_FileMetadata_Release.
- Throws:
EOSException- error result explaining what went wrong if the requested metadata isn't cached- See Also:
-
duplicateFile
public void duplicateFile(EOS_PlayerDataStorage_DuplicateFileOptions duplicateOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnDuplicateFileCompleteCallback completionCallback) Copies the data of an existing file to a new filename. This action happens entirely on the server and will not upload the contents of the source destination file from the host. This function paired with a subsequent EOS_PlayerDataStorage_DeleteFile can be used to rename a file. If successful, the destination file's metadata will be updated in our local cache.- Parameters:
duplicateOptions- Object containing properties related to which user is duplicating the file, and what the source and destination file names areclientData- Optional pointer to help clients track this request, that is returned in the completion callbackcompletionCallback- This function is called when the duplicate operation completes
-
deleteFile
public void deleteFile(EOS_PlayerDataStorage_DeleteFileOptions deleteOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnDeleteFileCompleteCallback completionCallback) Deletes an existing file in the cloud. If successful, the file's data will be removed from our local cache.- Parameters:
deleteOptions- Object containing properties related to which user is deleting the file, and what file name isclientData- Optional pointer to help clients track this request, that is returned in the completion callbackcompletionCallback- This function is called when the delete operation completes
-
readFile
public EOS_PlayerDataStorageFileTransferRequest readFile(EOS_PlayerDataStorage_ReadFileOptions readOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_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:
readOptions- 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 Player Data 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:
-
writeFile
public EOS_PlayerDataStorageFileTransferRequest writeFile(EOS_PlayerDataStorage_WriteFileOptions writeOptions, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_OnWriteFileCompleteCallback completionCallback) Write new data to a specific file, potentially overwriting any existing file by the same name, to 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:
writeOptions- Object containing properties related to which user is writing the file, what the file's name is, and related mechanisms for writing the dataclientData- Optional pointer to help clients track this request, that is returned in associated callbackscompletionCallback- This function is called when the write operation completes- Returns:
- A valid Player Data 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_PlayerDataStorage_DeleteCacheOptions options, com.sun.jna.Pointer clientData, EOS_PlayerDataStorage_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
-