16#include "CoreMinimal.h"
17#include "UObject/NoExportTypes.h"
18#include "PPF_Platform.h"
19#include "OnlineSubsystemPicoNames.h"
20#include "OnlineSubsystemPico.h"
22#include "Pico_Leaderboards.generated.h"
26DECLARE_LOG_CATEGORY_EXTERN(PicoLeaderboards, Log, All);
38DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGet,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardArray*, LeaderboardList);
39DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntries,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
40DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesAfterRank,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
41DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesByIds,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
42DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntry,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
43DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntryWithSupplementaryMetric,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
60 FOnlineSubsystemPico& PicoSubsystem;
67 FGetEntries GetEntriesDelegate;
68 FGetEntriesAfterRank GetEntriesAfterRankDelegate;
69 FGetEntriesByIds GetEntriesByIdsDelegate;
70 FWriteEntry WriteEntryDelegate;
71 FWriteEntryWithSupplementaryMetric WriteEntryWithSupplementaryMetricDelegate;
83 bool Get(
const FString& LeaderboardName, FGet InGetDelegate);
114 bool GetEntries(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardFilterType Filter, ppfLeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate);
130 bool GetEntriesAfterRank(
const FString& LeaderboardName,
int PageIdx,
int PageSize,
unsigned long long AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
157 bool GetEntriesByIds(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardStartAt StartAt,
const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
174 bool WriteEntry(
const FString& LeaderboardName,
const int64& Score,
const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
192 bool WriteEntryWithSupplementaryMetric(
const FString& LeaderboardName,
const int64& Score,
const int64& SupplementaryMetric,
const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
223 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Leaderboards")
224 static
void Get(UObject* WorldContextObject, const FString& LeaderboardName, FGet InGetDelegate);
250 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
262 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
263 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize, const FString& AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
285 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
286 static
void GetEntriesByIds(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize,
ELeaderboardStartAt StartAt, const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
298 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
299 static
void WriteEntry(UObject* WorldContextObject, const FString& LeaderboardName, const FString& Score, const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
312 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
313 static
void WriteEntryWithSupplementaryMetric(UObject* WorldContextObject, const FString& LeaderboardName, const FString& Score, const FString& SupplementaryMetric, const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
329 void InitParams(ppfLeaderboardEntryHandle ppfLeaderboardEntryHandle);
333 FString DisplayScore = FString();
337 unsigned long long Timestamp = 0;
340 TArray<uint8> ExtraData;
344 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
348 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
349 FString GetDisplayScore();
352 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
356 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
360 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
364 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
365 FString GetTimestamp();
368 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
369 FDateTime GetTimestampDateTime();
372 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
376 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
377 FString GetExtraDataString();
389 void InitParams(ppfLeaderboard* ppfLeaderboardHandle);
392 FString ApiName = FString();
398 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard")
399 FString GetApiName();
402 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
409 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
420 TArray<UPico_LeaderboardEntry*> LeaderboardEntryArray;
421 FString NextPageParam = FString();
426 void InitParams(ppfLeaderboardEntryArrayHandle InppfLeaderboardEntryArrayHandle);
429 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry Array")
432 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
433 FString GetNextPageParam();
436 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
440 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
441 int32 GetTotalSize();
444 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
456 TArray<UPico_Leaderboard*> LeaderboardArray;
457 FString NextPageParam = FString();
462 void InitParams(ppfLeaderboardArrayHandle InppfLeaderboardArrayHandle);
465 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Definition Array")
468 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
469 FString GetNextPageParam();
472 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
476 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
PicoLeaderboardsInterface class.
Definition: Pico_Leaderboards.h:57
bool WriteEntry(const FString &LeaderboardName, const int64 &Score, const FString &ExtraData, bool ForceUpdate, FWriteEntry InWriteEntryDelegate)
Writes a user's score to the leaderboard.
bool WriteEntryWithSupplementaryMetric(const FString &LeaderboardName, const int64 &Score, const int64 &SupplementaryMetric, const FString &ExtraData, bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate)
Adds custom contents when writing a user's score to a leaderboard.
bool GetEntries(const FString &LeaderboardName, int PageIdx, int PageSize, ppfLeaderboardFilterType Filter, ppfLeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate)
Gets a list of leaderboard entries.
bool GetEntriesAfterRank(const FString &LeaderboardName, int PageIdx, int PageSize, unsigned long long AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate)
Gets the leaderboard entries after a specified ranking.
bool GetEntriesByIds(const FString &LeaderboardName, int PageIdx, int PageSize, ppfLeaderboardStartAt StartAt, const TArray< FString > &UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate)
Gets the leaderboard entries for a specified user.
bool Get(const FString &LeaderboardName, FGet InGetDelegate)
Gets a specified leaderboard.
OnlinePicoLeaderboards Blueprint Function class.
Definition: Pico_Leaderboards.h:212
UPico_LeaderboardArray class.
Definition: Pico_Leaderboards.h:451
UPico_LeaderboardEntryArray class.
Definition: Pico_Leaderboards.h:416
UPico_LeaderboardEntry class.
Definition: Pico_Leaderboards.h:324
UPico_Leaderboard class.
Definition: Pico_Leaderboards.h:384
UPico_User class.
Definition: Pico_User.h:422
ELeaderboardStartAt
The type of sorting to use when getting leaderboard or challenge entries.
Definition: OnlineSubsystemPicoNames.h:658
ELeaderboardFilterType
The type of filter to use when using leaderboards or challenges.
Definition: OnlineSubsystemPicoNames.h:674
The destination information.
Definition: OnlineSubsystemPicoNames.h:208
Supplementary metrics for leaderboards.
Definition: OnlineSubsystemPicoNames.h:684