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);
28class UPico_Leaderboard;
29class UPico_LeaderboardEntry;
30class UPico_LeaderboardEntryArray;
31class UPico_LeaderboardArray;
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;
82 bool Get(
const FString& LeaderboardName, FGet InGetDelegate);
112 bool GetEntries(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardFilterType Filter, ppfLeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate);
127 bool GetEntriesAfterRank(
const FString& LeaderboardName,
int PageIdx,
int PageSize,
unsigned long long AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
153 bool GetEntriesByIds(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardStartAt StartAt,
const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
169 bool WriteEntry(
const FString& LeaderboardName,
const int64& Score,
const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
186 bool WriteEntryWithSupplementaryMetric(
const FString& LeaderboardName,
const int64& Score,
const int64& SupplementaryMetric,
const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
216 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Leaderboards")
217 static
void Get(UObject* WorldContextObject, const FString& LeaderboardName, FGet InGetDelegate);
242 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
253 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
254 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize, const FString& AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
275 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
276 static
void GetEntriesByIds(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize,
ELeaderboardStartAt StartAt, const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
287 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
288 static
void WriteEntry(UObject* WorldContextObject, const FString& LeaderboardName, const FString& Score, const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
300 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
301 static
void WriteEntryWithSupplementaryMetric(UObject* WorldContextObject, const FString& LeaderboardName, const FString& Score, const FString& SupplementaryMetric, const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
311class ONLINESUBSYSTEMPICO_API UPico_LeaderboardEntry : public UObject
317 void InitParams(ppfLeaderboardEntryHandle ppfLeaderboardEntryHandle);
321 FString DisplayScore = FString();
325 unsigned long long Timestamp = 0;
327 UPico_User* User =
nullptr;
328 TArray<uint8> ExtraData;
331 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
333 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
334 FString GetDisplayScore();
335 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
337 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
339 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
341 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
342 FString GetTimestamp();
343 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
344 FDateTime GetTimestampDateTime();
345 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
346 UPico_User* GetUser();
347 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
348 FString GetExtraDataString();
352class ONLINESUBSYSTEMPICO_API UPico_Leaderboard :
public UObject
358 void InitParams(ppfLeaderboard* ppfLeaderboardHandle);
361 FString ApiName = FString();
366 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
367 FString GetApiName();
369 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
372 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
377class ONLINESUBSYSTEMPICO_API UPico_LeaderboardEntryArray : public UObject
382 TArray<UPico_LeaderboardEntry*> LeaderboardEntryArray;
383 FString NextPageParam = FString();
388 void InitParams(ppfLeaderboardEntryArrayHandle InppfLeaderboardEntryArrayHandle);
390 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
391 UPico_LeaderboardEntry* GetElement(int32 Index);
393 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
394 FString GetNextPageParam();
396 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
399 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
400 int32 GetTotalSize();
402 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
407class ONLINESUBSYSTEMPICO_API UPico_LeaderboardArray : public UObject
413 TArray<UPico_Leaderboard*> LeaderboardArray;
414 FString NextPageParam = FString();
419 void InitParams(ppfLeaderboardArrayHandle InppfLeaderboardArrayHandle);
421 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
422 UPico_Leaderboard* GetElement(int32 Index);
424 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
425 FString GetNextPageParam();
427 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
430 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:206
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