4#include "CoreMinimal.h"
5#include "UObject/NoExportTypes.h"
6#include "PPF_Platform.h"
7#include "OnlineSubsystemPicoNames.h"
8#include "OnlineSubsystemPico.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include "Pico_Leaderboards.generated.h"
15DECLARE_LOG_CATEGORY_EXTERN(PicoLeaderboards, Log, All);
27DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGet,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardArray*, LeaderboardList);
28DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntries,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
29DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesAfterRank,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
30DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetEntriesByIds,
bool, bIsError,
const FString&, ErrorMessage,
UPico_LeaderboardEntryArray*, LeaderboardEntryList);
31DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntry,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
32DECLARE_DYNAMIC_DELEGATE_ThreeParams(FWriteEntryWithSupplementaryMetric,
bool, bIsError,
const FString&, ErrorMessage,
bool, WriteResult);
49 FOnlineSubsystemPico& PicoSubsystem;
56 FGetEntries GetEntriesDelegate;
57 FGetEntriesAfterRank GetEntriesAfterRankDelegate;
58 FGetEntriesByIds GetEntriesByIdsDelegate;
59 FWriteEntry WriteEntryDelegate;
60 FWriteEntryWithSupplementaryMetric WriteEntryWithSupplementaryMetricDelegate;
72 bool Get(
const FString& LeaderboardName, FGet InGetDelegate);
103 bool GetEntries(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardFilterType Filter, ppfLeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate);
119 bool GetEntriesAfterRank(
const FString& LeaderboardName,
int PageIdx,
int PageSize,
unsigned long long AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
146 bool GetEntriesByIds(
const FString& LeaderboardName,
int PageIdx,
int PageSize, ppfLeaderboardStartAt StartAt,
const TArray<FString>& UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate);
163 bool WriteEntry(
const FString& LeaderboardName,
const int64& Score,
const FString& ExtraData,
bool ForceUpdate, FWriteEntry InWriteEntryDelegate);
181 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);
239 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
251 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
252 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& LeaderboardName,
int PageIdx,
int PageSize, const FString& AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate);
274 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
275 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);
301 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Leaderboards")
302 static
void WriteEntryWithSupplementaryMetric(UObject* WorldContextObject, const FString& LeaderboardName, const FString& Score, const FString& SupplementaryMetric, const FString& ExtraData,
bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate);
318 void InitParams(ppfLeaderboardEntryHandle ppfLeaderboardEntryHandle);
322 FString DisplayScore = FString();
326 unsigned long long Timestamp = 0;
329 TArray<uint8> ExtraData;
333 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry")
337 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
338 FString GetDisplayScore();
341 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
345 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
349 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
353 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
354 FString GetTimestamp();
357 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
358 FDateTime GetTimestampDateTime();
361 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
365 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry")
366 FString GetExtraDataString();
378 void InitParams(ppfLeaderboard* ppfLeaderboardHandle);
381 FString ApiName = FString();
387 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard")
388 FString GetApiName();
391 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
398 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard")
409 TArray<UPico_LeaderboardEntry*> LeaderboardEntryArray;
411 unsigned long long TotalSize = 0;
413 bool bHasPreviousPage;
415 void InitParams(ppfLeaderboardEntryArrayHandle InppfLeaderboardEntryArrayHandle);
418 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Entry Array")
423 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
427 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
428 int32 GetTotalSize();
431 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
434 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
435 bool HasPreviousPage();
437 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Entry Array")
438 FString GetDebugString();
449 TArray<UPico_Leaderboard*> LeaderboardArray;
452 unsigned long long TotalSize = 0;
455 void InitParams(ppfLeaderboardArrayHandle InppfLeaderboardArrayHandle);
458 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Leaderboards|Leaderboard Definition Array")
462 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
467 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
468 int32 GetTotalSize();
471 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
474 UFUNCTION(BlueprintPure, Category = "Pico Platform|Leaderboards|Leaderboard Definition Array")
475 FString GetDebugString();
PicoLeaderboardsInterface class.
Definition: Pico_Leaderboards.h:46
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:201
UPico_LeaderboardArray class.
Definition: Pico_Leaderboards.h:444
UPico_LeaderboardEntryArray class.
Definition: Pico_Leaderboards.h:405
UPico_LeaderboardEntry class.
Definition: Pico_Leaderboards.h:313
UPico_Leaderboard class.
Definition: Pico_Leaderboards.h:373
UPico_User class.
Definition: Pico_User.h:515
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