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 Details

    • EOS_PLAYERDATASTORAGE_FILENAME_MAX_LENGTH_BYTES

      public static final int EOS_PLAYERDATASTORAGE_FILENAME_MAX_LENGTH_BYTES
      Maximum 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 queried
      clientData - Optional pointer to help clients track this request, that is returned in the completion callback
      completionCallback - 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 files
      clientData - Optional pointer to help clients track this request, that is returned in the completion callback
      completionCallback - 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 are
      clientData - Optional pointer to help clients track this request, that is returned in the completion callback
      completionCallback - 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 is
      clientData - Optional pointer to help clients track this request, that is returned in the completion callback
      completionCallback - 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 data
      clientData - Optional pointer to help clients track this request, that is returned in associated callbacks
      completionCallback - 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 data
      clientData - Optional pointer to help clients track this request, that is returned in associated callbacks
      completionCallback - 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 cache
      clientData - Optional pointer to help clients track this request, that is returned in associated callbacks
      completionCallback - This function is called when the delete cache operation completes
      Returns:
      EOS_EResult.EOS_Success if the operation was started correctly, otherwise an error result explaining what went wrong