GOG GALAXY SDK Documentation
ICloudStorageGetFileListener Class Referenceabstract

Listener for the event of downloading a file stored in cloud storage. More...

#include <ICloudStorage.h>

Inheritance diagram for ICloudStorageGetFileListener:
[legend]

Public Types

enum  FailureReason {
  FAILURE_REASON_UNDEFINED , FAILURE_REASON_UNAUTHORIZED , FAILURE_REASON_FORBIDDEN , FAILURE_REASON_NOT_FOUND ,
  FAILURE_REASON_UNAVAILABLE , FAILURE_REASON_ABORTED , FAILURE_REASON_CONNECTION_FAILURE , FAILURE_REASON_BUFFER_TOO_SMALL ,
  FAILURE_REASON_WRITE_FUNC_ERROR
}
 The reason of a failure in downloading a file. More...
 

Public Member Functions

virtual void OnGetFileSuccess (const char *container, const char *name, uint32_t fileSize, SavegameType savegameType, const char *savegameID)=0
 Notification for the event of a success in downloading a file. More...
 
virtual void OnGetFileFailure (const char *container, const char *name, FailureReason failureReason)=0
 Notification for the event of a failure in downloading a file. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GalaxyTypeAwareListener< CLOUD_STORAGE_GET_FILE >
static ListenerType GetListenerType ()
 Returns the type of the listener. More...
 

Detailed Description

Listener for the event of downloading a file stored in cloud storage.

Member Enumeration Documentation

◆ FailureReason

The reason of a failure in downloading a file.

Enumerator
FAILURE_REASON_UNDEFINED 

Unspecified error.

FAILURE_REASON_UNAUTHORIZED 

Authorization lost.

FAILURE_REASON_FORBIDDEN 

No access to specified container.

FAILURE_REASON_NOT_FOUND 

Container not found.

FAILURE_REASON_UNAVAILABLE 

Service unavailable.

FAILURE_REASON_ABORTED 

Request aborted.

FAILURE_REASON_CONNECTION_FAILURE 

Unable to communicate with backend services.

FAILURE_REASON_BUFFER_TOO_SMALL 

Buffer passed to ICloudStorage::GetFile() is too small to fit the file content.

FAILURE_REASON_WRITE_FUNC_ERROR 

Function writeFunc passed to ICloudStorage::GetFile() returned an error.

Member Function Documentation

◆ OnGetFileFailure()

virtual void OnGetFileFailure ( const char *  container,
const char *  name,
FailureReason  failureReason 
)
pure virtual

Notification for the event of a failure in downloading a file.

Parameters
[in]containerThe name of the containter.
[in]nameThe name of the file to be downloaded.
[in]failureReasonThe cause of the failure.

◆ OnGetFileSuccess()

virtual void OnGetFileSuccess ( const char *  container,
const char *  name,
uint32_t  fileSize,
SavegameType  savegameType,
const char *  savegameID 
)
pure virtual

Notification for the event of a success in downloading a file.

Parameters
[in]containerThe name of the containter.
[in]nameThe name of the file downloaded.
[in]fileSizeThe size of downloaded data. In case of getting metadata only (GetFileMetadata response) is always zero (no data downloaded).
[in]savegameTypeThe type of the downloaded data (savegame type).
[in]savegameIDThe ID of the savegame the file belongs to.