6#include "CoreMinimal.h"
7#include "UObject/NoExportTypes.h"
8#include "PPF_Platform.h"
9#include "OnlineSubsystemPicoNames.h"
10#include "OnlineSubsystemPico.h"
12#include "Pico_Leaderboards.generated.h"
16DECLARE_LOG_CATEGORY_EXTERN(PicoLeaderboards, Log, All);
18class UPico_Leaderboard;
19class UPico_LeaderboardEntry;
20class UPico_LeaderboardEntryArray;
21class UPico_LeaderboardArray;
28DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGet,
bool, bIsError,
const FString&, ErrorMessage, UPico_LeaderboardArray*, LeaderboardList);
29DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntries,
bool, bIsError,
const FString&, ErrorMessage, UPico_LeaderboardEntryArray*, LeaderboardEntryList);
30DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesAfterRank,
bool, bIsError,
const FString&, ErrorMessage, UPico_LeaderboardEntryArray*, LeaderboardEntryList);
31DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesByIds,
bool, bIsError,
const FString&, ErrorMessage, UPico_LeaderboardEntryArray*, LeaderboardEntryList);
32DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntry,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
33DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntryWithSupplementaryMetric,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
50 FOnlineSubsystemPico& PicoSubsystem;
57 FGetEntries GetEntriesDelegate;
58 FGetEntriesAfterRank GetEntriesAfterRankDelegate;
59 FGetEntriesByIds GetEntriesByIdsDelegate;
60 FWriteEntry WriteEntryDelegate;
61 FWriteEntryWithSupplementaryMetric WriteEntryWithSupplementaryMetricDelegate;
72 bool Get(
const FString& LeaderboardName, FGet InGetDelegate);
102 bool GetEntries(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardFilterType Filter, ppfLeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate);
117 bool GetEntriesAfterRank(
const FString& LeaderboardName,
int PageIdx,
int PageSize,
unsigned long long AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
143 bool GetEntriesByIds(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardStartAt StartAt,
const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
159 bool WriteEntry(
const FString& LeaderboardName,
const int64& Score,
const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
176 bool WriteEntryWithSupplementaryMetric(
const FString& LeaderboardName,
const int64& Score,
const int64& SupplementaryMetric,
const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
212 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Leaderboards")
213 static
void Get(UObject* WorldContextObject, const FString& LeaderboardName, FGet InGetDelegate);
244 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
261 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
262 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize, const FString& AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
289 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
290 static
void GetEntriesByIds(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize,
ELeaderboardStartAt StartAt, const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
307 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
308 static
void WriteEntry(UObject* WorldContextObject, const FString& LeaderboardName, const FString& Score, const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
326 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
327 static
void WriteEntryWithSupplementaryMetric(UObject* WorldContextObject, const FString& LeaderboardName, const FString& Score, const FString& SupplementaryMetric, const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
337class ONLINESUBSYSTEMPICO_API UPico_LeaderboardEntry : public UObject
343 void InitParams(ppfLeaderboardEntryHandle ppfLeaderboardEntryHandle);
347 FString DisplayScore = FString();
351 unsigned long long Timestamp = 0;
353 UPico_User* User =
nullptr;
354 TArray<uint8> ExtraData;
357 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
359 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
360 FString GetDisplayScore();
361 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
363 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
365 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
367 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
368 FString GetTimestamp();
369 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
370 FDateTime GetTimestampDateTime();
371 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
372 UPico_User* GetUser();
373 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
374 FString GetExtraDataString();
378class ONLINESUBSYSTEMPICO_API UPico_Leaderboard :
public UObject
384 void InitParams(ppfLeaderboard* ppfLeaderboardHandle);
387 FString ApiName = FString();
392 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
393 FString GetApiName();
395 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
398 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
403class ONLINESUBSYSTEMPICO_API UPico_LeaderboardEntryArray : public UObject
408 TArray<UPico_LeaderboardEntry*> LeaderboardEntryArray;
409 FString NextPageParam = FString();
414 void InitParams(ppfLeaderboardEntryArrayHandle InppfLeaderboardEntryArrayHandle);
416 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
417 UPico_LeaderboardEntry* GetElement(int32 Index);
419 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
420 FString GetNextPageParam();
422 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
425 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
426 int32 GetTotalSize();
428 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
433class ONLINESUBSYSTEMPICO_API UPico_LeaderboardArray : public UObject
439 TArray<UPico_Leaderboard*> LeaderboardArray;
440 FString NextPageParam = FString();
445 void InitParams(ppfLeaderboardArrayHandle InppfLeaderboardArrayHandle);
447 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
448 UPico_Leaderboard* GetElement(int32 Index);
450 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
451 FString GetNextPageParam();
453 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
456 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
PicoLeaderboardsInterface class.
Definition: Pico_Leaderboards.h:47
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:196
ELeaderboardStartAt
The type of sorting to use when getting leaderboard or challenge entries.
Definition: OnlineSubsystemPicoNames.h:648
ELeaderboardFilterType
The type of filter to use when using leaderboards or challenges.
Definition: OnlineSubsystemPicoNames.h:664
The destination information.
Definition: OnlineSubsystemPicoNames.h:199
Supplementary metrics for leaderboards.
Definition: OnlineSubsystemPicoNames.h:674