GOG GALAXY SDK Documentation
|
The interface for managing of cloud storage files. More...
#include <IStorage.h>
Public Member Functions | |
virtual void | FileWrite (const char *fileName, const void *data, uint32_t dataSize)=0 |
Writes data into the file. More... | |
virtual uint32_t | FileRead (const char *fileName, void *data, uint32_t dataSize)=0 |
Reads file content into the buffer. More... | |
virtual void | FileDelete (const char *fileName)=0 |
Deletes the file. More... | |
virtual bool | FileExists (const char *fileName)=0 |
Returns if the file exists. More... | |
virtual uint32_t | GetFileSize (const char *fileName)=0 |
Returns the size of the file. More... | |
virtual uint32_t | GetFileTimestamp (const char *fileName)=0 |
Returns the timestamp of the last file modification. More... | |
virtual uint32_t | GetFileCount ()=0 |
Returns number of the files in the storage. More... | |
virtual const char * | GetFileNameByIndex (uint32_t index)=0 |
Returns name of the file. More... | |
virtual void | GetFileNameCopyByIndex (uint32_t index, char *buffer, uint32_t bufferLength)=0 |
Copies the name of the file to a buffer. More... | |
virtual void | FileShare (const char *fileName, IFileShareListener *const listener=NULL)=0 |
Uploads the file for sharing. More... | |
virtual void | DownloadSharedFile (SharedFileID sharedFileID, ISharedFileDownloadListener *const listener=NULL)=0 |
Downloads previously shared file. More... | |
virtual const char * | GetSharedFileName (SharedFileID sharedFileID)=0 |
Gets name of downloaded shared file. More... | |
virtual void | GetSharedFileNameCopy (SharedFileID sharedFileID, char *buffer, uint32_t bufferLength)=0 |
Copies the name of downloaded shared file to a buffer. More... | |
virtual uint32_t | GetSharedFileSize (SharedFileID sharedFileID)=0 |
Gets size of downloaded shared file. More... | |
virtual GalaxyID | GetSharedFileOwner (SharedFileID sharedFileID)=0 |
Gets the owner of downloaded shared file. More... | |
virtual uint32_t | SharedFileRead (SharedFileID sharedFileID, void *data, uint32_t dataSize, uint32_t offset=0)=0 |
Reads downloaded shared file content into the buffer. More... | |
virtual void | SharedFileClose (SharedFileID sharedFileID)=0 |
Closes downloaded shared file and frees the memory. More... | |
virtual uint32_t | GetDownloadedSharedFileCount ()=0 |
Returns the number of open downloaded shared files. More... | |
virtual SharedFileID | GetDownloadedSharedFileByIndex (uint32_t index)=0 |
Returns the ID of the open downloaded shared file. More... | |
The interface for managing of cloud storage files.
|
pure virtual |
Downloads previously shared file.
This call is asynchronous. Responses come to the ISharedFileDownloadListener.
[in] | sharedFileID | The ID of the shared file. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Deletes the file.
[in] | fileName | The name of the file in the form of a path (see the description of FileWrite()). |
|
pure virtual |
Returns if the file exists.
[in] | fileName | The name of the file in the form of a path (see the description of FileWrite()). |
|
pure virtual |
Reads file content into the buffer.
[in] | fileName | The name of the file in the form of a path (see the description of FileWrite()). |
[in,out] | data | The output buffer. |
[in] | dataSize | The size of the output buffer. |
|
pure virtual |
Uploads the file for sharing.
This call is asynchronous. Responses come to the IFileShareListener.
[in] | fileName | The name of the file in the form of a path (see the description of FileWrite()). |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Writes data into the file.
[in] | fileName | The name of the file in the form of a path (see the description of the method). |
[in] | data | The data to write. |
[in] | dataSize | The size of the data to write. |
|
pure virtual |
Returns the ID of the open downloaded shared file.
[in] | index | Index as an integer in the range of [0, number of open downloaded shared files). |
|
pure virtual |
Returns the number of open downloaded shared files.
|
pure virtual |
Returns number of the files in the storage.
|
pure virtual |
Returns name of the file.
[in] | index | Index as an integer in the range of [0, number of files). |
|
pure virtual |
Copies the name of the file to a buffer.
[in] | index | Index as an integer in the range of [0, number of files). |
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
|
pure virtual |
Returns the size of the file.
[in] | fileName | The name of the file in the form of a path (see the description of FileWrite()). |
|
pure virtual |
Returns the timestamp of the last file modification.
[in] | fileName | The name of the file in the form of a path (see the description of FileWrite()). |
|
pure virtual |
Gets name of downloaded shared file.
[in] | sharedFileID | The ID of the shared file. |
|
pure virtual |
Copies the name of downloaded shared file to a buffer.
[in] | sharedFileID | The ID of the shared file. |
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
|
pure virtual |
Gets the owner of downloaded shared file.
[in] | sharedFileID | The ID of the shared file. |
|
pure virtual |
Gets size of downloaded shared file.
[in] | sharedFileID | The ID of the shared file. |
|
pure virtual |
Closes downloaded shared file and frees the memory.
The content of the file will not be available until next download.
[in] | sharedFileID | The ID of the shared file. |
|
pure virtual |
Reads downloaded shared file content into the buffer.
[in] | sharedFileID | The ID of the shared file. |
[in,out] | data | The output buffer. |
[in] | dataSize | The size of the output buffer. |
[in] | offset | The number of bytes to skip from the beginning of the file. |