9 #ifndef INCLUDE_FUNAPI_SERVICE_LEADERBOARD_H_ 10 #define INCLUDE_FUNAPI_SERVICE_LEADERBOARD_H_ 22 enum LeaderboardCollection {
28 enum LeaderboardTimespan {
50 const int64_t &in_begin,
51 const int64_t &in_end);
62 const double &in_score,
63 const double &in_percentage);
72 typedef std::vector<LeaderboardRecord> LeaderboardRecordVector;
75 enum LeaderboardScoreSubmissionResult {
98 const LeaderboardTimespan &in_timespan,
100 const RankingType &in_ranking_type = kOrdinal);
103 const string &in_service_provider,
105 const LeaderboardTimespan &in_timespan,
107 const RankingType &in_ranking_type = kOrdinal);
110 const string &in_service_provider,
112 const PlayerAccountVector &in_competitors,
113 const LeaderboardTimespan &in_timespan,
114 const RankingType &in_ranking_type = kOrdinal);
116 string leaderboard_id;
118 LeaderboardCollection collection;
119 PlayerAccountVector competitors;
120 LeaderboardTimespan timespan;
122 RankingType ranking_type;
125 typedef std::vector<LeaderboardQueryRequest> LeaderboardQueryRequestVector;
131 int64_t total_player_count;
132 LeaderboardRecordVector records;
135 typedef std::vector<LeaderboardQueryResponse> LeaderboardQueryResponseVector;
154 const string &in_leaderboard_id,
155 const string &in_service_provider,
157 const double &in_score,
158 const Type &in_type = kHighScore);
162 const string &in_leaderboard_id,
163 const string &in_service_provider,
165 const double &in_score,
166 const LeaderboardQueryRequest::RankingType &in_ranking_type,
167 const LeaderboardTimespan &in_timespan,
168 const Type &in_type = kHighScore);
170 string leaderboard_id;
173 LeaderboardQueryRequest::RankingType ranking_type;
174 LeaderboardTimespan timespan;
182 LeaderboardScoreSubmissionResult result;
184 int64_t total_player_count;
192 const string &in_service_provider,
193 const string &in_id);
195 string leaderboard_id;
199 typedef std::vector<ScoreDeletionRequest> ScoreDeletionRequestVector;
213 typedef std::vector<ScoreDeletionResponse> ScoreDeletionResponseVector;
219 const string leaderboard_id;
227 string reset_date_time;
241 const Period &period,
242 const int64_t &interval,
243 const WallClock::Value &starts,
244 const WallClock::Value &ends);
246 string leaderboard_id;
249 WallClock::Value starts;
250 WallClock::Value ends;
252 WallClock::Value latest_reset_date_time;
253 WallClock::Value upcoming_date_time;
254 WallClock::Duration upcoming_time;
255 WallClock::Value next_date_time;
256 WallClock::Duration next_time;
261 typedef std::vector<LeaderboardResetSchedule> LeaderboardResetScheduleVector;
265 typedef LeaderboardResetSchedule::Period Period;
268 const string &leaderboard_id,
270 const WallClock::Value &latest_reset_date_time);
272 const string leaderboard_id;
274 const string latest_reset_date_time;
288 WallClock::Value reset_date_time;
294 const bool &error)> LeaderboardQueryResponseHandler;
296 typedef function<void(
const LeaderboardQueryRequestVector &requests,
297 const LeaderboardQueryResponseVector &responses,
298 const bool &error)> LeaderboardQueryResponseHandler2;
303 const bool &error)> ScoreSubmissionResponseHandler;
306 typedef function<void(
const ScoreDeletionRequestVector &requests,
307 const ScoreDeletionResponseVector &responses,
308 const bool &error)> ScoreDeletionResponseHandler;
313 const bool &error)> LeaderboardResetResponseHandler;
318 const bool &error)> LeaderboardResetScheduleStatusQueryResponseHandler;
321 FUNAPI_DLL_VISIBILITY
323 const LeaderboardQueryResponseHandler &handler,
324 const string &tag =
"");
326 FUNAPI_DLL_VISIBILITY
327 void GetLeaderboard(
const LeaderboardQueryRequestVector &requests,
328 const LeaderboardQueryResponseHandler2 &handler,
329 const string &tag =
"");
331 FUNAPI_DLL_VISIBILITY
334 const string &tag =
"");
336 FUNAPI_DLL_VISIBILITY
337 bool GetLeaderboardSync(
const LeaderboardQueryRequestVector &requests,
338 LeaderboardQueryResponseVector *responses,
339 const string &tag =
"");
341 FUNAPI_DLL_VISIBILITY
343 const ScoreSubmissionResponseHandler &handler,
344 const string &tag =
"");
346 FUNAPI_DLL_VISIBILITY
349 const string &tag =
"");
351 FUNAPI_DLL_VISIBILITY
352 void DeleteScore(
const ScoreDeletionRequestVector &requests,
353 const ScoreDeletionResponseHandler &handler,
354 const string &tag =
"");
356 FUNAPI_DLL_VISIBILITY
357 bool DeleteScoreSync(
const ScoreDeletionRequestVector &requests,
358 ScoreDeletionResponseVector *responses,
359 const string &tag =
"");
361 FUNAPI_DLL_VISIBILITY
363 const LeaderboardResetResponseHandler &handler,
364 const string &tag =
"");
366 FUNAPI_DLL_VISIBILITY
367 bool GetLeaderboardResetSchedule(
const string &leaderboard_id,
368 const LeaderboardResetSchedule::Period &period,
370 const string &tag =
"");
372 FUNAPI_DLL_VISIBILITY
373 bool GetLeaderboardResetSchedule(
374 LeaderboardResetScheduleVector *reset_schedules,
375 const string &tag =
"");
377 FUNAPI_DLL_VISIBILITY
378 void GetLeaderboardResetScheduleStatusQuery(
380 const LeaderboardResetScheduleStatusQueryResponseHandler &handler,
381 const string &tag =
"");
383 FUNAPI_DLL_VISIBILITY
384 bool GetLeaderboardResetScheduleStatusQuerySync(
387 const string &tag =
"");
391 #endif // INCLUDE_FUNAPI_SERVICE_LEADERBOARD_H_ Definition: leaderboard.h:278
Definition: leaderboard.h:264
Definition: leaderboard.h:41
Definition: leaderboard.h:84
Definition: leaderboard.h:179
Account Id.
Definition: player_account.h:20
Definition: leaderboard.h:223
Definition: leaderboard.h:202
Definition: leaderboard.h:216
Definition: leaderboard.h:59
Definition: leaderboard.h:138
Definition: leaderboard.h:231
Definition: leaderboard.h:128
Definition: leaderboard.h:190