CloudBuilder  2.8.4
Making social games is easy !
CGameManager.h
Go to the documentation of this file.
1 //
2 // CGameManager.h
3 // CloudBuilder
4 //
5 // Created by Roland Van Leeuwen on 10/04/12.
6 // Copyright (c) 2012 Clan of the Cloud. All rights reserved.
7 //
8 
9 #ifndef CloudBuilder_CGameManager_h
10 #define CloudBuilder_CGameManager_h
11 
12 #include "CloudBuilder.h"
13 #include "CotCHelpers.h"
14 
18 namespace CloudBuilder
19 {
20  class CClan;
21  class CCloudResult;
22 
29  class FACTORY_CLS CGameManager {
30  public:
31 
36  static CGameManager *Instance();
37 
55  void Score(CResultHandler *aHandler, long long aHighScore, const char *aMode, const char *aScoreType, const char *aInfoScore, bool aForce, const char *aDomain="private");
56  DEPRECATED void Score(long long aHighScore, const char *aMode, const char *aScoreType, const char *aInfoScore, bool aMayVary, CResultHandler *aHandler);
57 
68  void GetRank(CResultHandler *aHandler, long long aHighScore, const char *aMode, const char *aDomain="private");
69  DEPRECATED void GetRank(long long aHighScore, const char *aMode, CResultHandler *aHandler);
70 
87  void BestHighScore(CResultHandler *aHandler, int aCount, int aPage, const char *aMode, const char *aDomain="private");
88  DEPRECATED void BestHighScore(int aCount, int aPage, const char *aMode, CResultHandler *aHandler);
89 
105  void CenteredScore(CResultHandler *aHandler, int aCount, const char *aMode, const char *aDomain="private");
106  DEPRECATED void CenteredScore(int aCount, const char *aMode, CResultHandler *aHandler);
107 
121  void UserBestScores(CResultHandler *aHandler, const char *aDomain="private");
122 
134  void KeyValueRead(const CotCHelpers::CHJSON *aConfiguration, CResultHandler *aHandler);
135 
178  void BinaryRead(const CotCHelpers::CHJSON *aConfiguration, CResultHandler *aHandler);
179 
222  void Batch(CResultHandler *aHandler, const CotCHelpers::CHJSON *aConfiguration, const CotCHelpers::CHJSON *aParameters);
223 
224  private:
225  static CGameManager *mInstance;
226 
230  CGameManager();
231  ~CGameManager();
235  void Terminate();
236 
237  void binaryWriteDone(const CCloudResult *result, const void *, size_t, CResultHandler *);
238  void binaryReadDone(const CCloudResult *result, CResultHandler *aHandler);
239 
240  friend class CClan;
241  friend struct singleton_holder<CGameManager>;
242  };
243 
244 }
245 
246 
247 #endif
Definition: CClan.h:30
Definition: CHJSON.h:28
Definition: CGameManager.h:29
Definition: CDelegate.h:17
CDelegate< void(eErrorCode errorCode, const CCloudResult *result)> CResultHandler
Definition: CDelegate.h:107
Definition: CClan.h:18