4#include "CoreMinimal.h"
5#include "UObject/NoExportTypes.h"
6#include "PPF_Platform.h"
7#include "OnlineSubsystemPicoNames.h"
8#include "OnlineSubsystemPico.h"
10#include "Pico_Leaderboards.generated.h"
14DECLARE_LOG_CATEGORY_EXTERN(PicoLeaderboards, Log, All);
26DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGet,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardArray*, LeaderboardList);
27DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntries,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
28DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesAfterRank,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
29DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesByIds,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
30DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntry,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
31DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntryWithSupplementaryMetric,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
48 FOnlineSubsystemPico& PicoSubsystem;
55 FGetEntries GetEntriesDelegate;
56 FGetEntriesAfterRank GetEntriesAfterRankDelegate;
57 FGetEntriesByIds GetEntriesByIdsDelegate;
58 FWriteEntry WriteEntryDelegate;
59 FWriteEntryWithSupplementaryMetric WriteEntryWithSupplementaryMetricDelegate;
71 bool Get(
const FString& LeaderboardName, FGet InGetDelegate);
102 bool GetEntries(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardFilterType Filter, ppfLeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate);
118 bool GetEntriesAfterRank(
const FString& LeaderboardName,
int PageIdx,
int PageSize,
unsigned long long AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
145 bool GetEntriesByIds(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardStartAt StartAt,
const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
162 bool WriteEntry(
const FString& LeaderboardName,
const int64& Score,
const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
180 bool WriteEntryWithSupplementaryMetric(
const FString& LeaderboardName,
const int64& Score,
const int64& SupplementaryMetric,
const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
211 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Leaderboards")
212 static
void Get(UObject* WorldContextObject, const FString& LeaderboardName, FGet InGetDelegate);
238 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
250 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
251 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize, const FString& AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
273 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
274 static
void GetEntriesByIds(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize,
ELeaderboardStartAt StartAt, const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
286 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
287 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);
317 void InitParams(ppfLeaderboardEntryHandle ppfLeaderboardEntryHandle);
321 FString DisplayScore = FString();
325 unsigned long long Timestamp = 0;
328 TArray<uint8> ExtraData;
332 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
336 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
337 FString GetDisplayScore();
340 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
344 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
348 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
352 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
353 FString GetTimestamp();
356 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
357 FDateTime GetTimestampDateTime();
360 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
364 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
365 FString GetExtraDataString();
377 void InitParams(ppfLeaderboard* ppfLeaderboardHandle);
380 FString ApiName = FString();
386 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard")
387 FString GetApiName();
390 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
397 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
408 TArray<UPico_LeaderboardEntry*> LeaderboardEntryArray;
410 unsigned long long TotalSize = 0;
412 bool bHasPreviousPage;
414 void InitParams(ppfLeaderboardEntryArrayHandle InppfLeaderboardEntryArrayHandle);
417 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry Array")
422 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
426 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
427 int32 GetTotalSize();
430 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
433 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
434 bool HasPreviousPage();
436 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
437 FString GetDebugString();
448 TArray<UPico_Leaderboard*> LeaderboardArray;
451 unsigned long long TotalSize = 0;
454 void InitParams(ppfLeaderboardArrayHandle InppfLeaderboardArrayHandle);
457 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Definition Array")
461 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
466 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
467 int32 GetTotalSize();
470 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
473 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
474 FString GetDebugString();
PicoLeaderboardsInterface class.
Definition: Pico_Leaderboards.h:45
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:200
UPico_LeaderboardArray class.
Definition: Pico_Leaderboards.h:443
UPico_LeaderboardEntryArray class.
Definition: Pico_Leaderboards.h:404
UPico_LeaderboardEntry class.
Definition: Pico_Leaderboards.h:312
UPico_Leaderboard class.
Definition: Pico_Leaderboards.h:372
UPico_User class.
Definition: Pico_User.h:451
ELeaderboardStartAt
The type of sorting to use when getting leaderboard or challenge entries.
Definition: OnlineSubsystemPicoNames.h:646
ELeaderboardFilterType
The type of filter to use when using leaderboards or challenges.
Definition: OnlineSubsystemPicoNames.h:662
The destination information.
Definition: OnlineSubsystemPicoNames.h:196
Supplementary metrics for leaderboards.
Definition: OnlineSubsystemPicoNames.h:672