GOG GALAXY SDK Documentation
IApps.h
Go to the documentation of this file.
1 #ifndef GALAXY_I_APPS_H
2 #define GALAXY_I_APPS_H
3 
9 #include "IListenerRegistrar.h"
10 
11 namespace galaxy
12 {
13  namespace api
14  {
23  typedef uint64_t ProductID;
24 
28  class IIsDlcOwnedListener : public GalaxyTypeAwareListener<IS_DLC_OWNED>
29  {
30  public:
31 
38  virtual void OnDlcCheckSuccess(ProductID productId, bool isOwned) = 0;
39 
44  {
49  };
50 
57  virtual void OnDlcCheckFailure(ProductID productId, FailureReason failureReason) = 0;
58  };
59 
67  class IApps
68  {
69  public:
70 
71  virtual ~IApps()
72  {
73  }
74 
81  virtual bool IsDlcInstalled(ProductID productID) = 0;
82 
92  virtual void IsDlcOwned(ProductID productID, IIsDlcOwnedListener* const listener) = 0;
93 
102  virtual const char* GetCurrentGameLanguage(ProductID productID = 0) = 0;
103 
113  virtual void GetCurrentGameLanguageCopy(char* buffer, uint32_t bufferLength, ProductID productID = 0) = 0;
114 
123  virtual const char* GetCurrentGameLanguageCode(ProductID productID = 0) = 0;
124 
134  virtual void GetCurrentGameLanguageCodeCopy(char* buffer, uint32_t bufferLength, ProductID productID = 0) = 0;
135  };
136 
138  }
139 }
140 
141 #endif
Contains data structures and interfaces related to callback listeners.
The class that is inherited by all specific callback listeners and provides a static method that retu...
Definition: IListenerRegistrar.h:117
The interface for managing application activities.
Definition: IApps.h:68
virtual void GetCurrentGameLanguageCodeCopy(char *buffer, uint32_t bufferLength, ProductID productID=0)=0
Copies the current game language code for given product ID to a buffer.
virtual void GetCurrentGameLanguageCopy(char *buffer, uint32_t bufferLength, ProductID productID=0)=0
Copies the current game language for given product ID to a buffer.
virtual const char * GetCurrentGameLanguage(ProductID productID=0)=0
Returns current game language for given product ID.
virtual bool IsDlcInstalled(ProductID productID)=0
Checks if specified DLC is installed.
virtual const char * GetCurrentGameLanguageCode(ProductID productID=0)=0
Returns current game language code for given product ID.
virtual void IsDlcOwned(ProductID productID, IIsDlcOwnedListener *const listener)=0
Check if user has license for specified DLC.
Listener for the result of IsDLCOwned method.
Definition: IApps.h:29
virtual void OnDlcCheckSuccess(ProductID productId, bool isOwned)=0
Notification for the result fetched.
FailureReason
Reason of fetching result failure.
Definition: IApps.h:44
@ FAILURE_REASON_GALAXY_SERVICE_NOT_SIGNED_IN
Galaxy Service is not signed in properly.
Definition: IApps.h:46
@ FAILURE_REASON_UNDEFINED
Undefined error.
Definition: IApps.h:45
@ FAILURE_REASON_EXTERNAL_SERVICE_FAILURE
Unable to communicate with external service.
Definition: IApps.h:48
@ FAILURE_REASON_CONNECTION_FAILURE
Unable to communicate with backend services.
Definition: IApps.h:47
virtual void OnDlcCheckFailure(ProductID productId, FailureReason failureReason)=0
Notification for the fail on fetching result.
uint64_t ProductID
The ID of the DLC.
Definition: IApps.h:23