6#include "CoreMinimal.h"
7#include "UObject/NoExportTypes.h"
8#include "PPF_Platform.h"
9#include "OnlineSubsystemPicoNames.h"
10#include "OnlineSubsystemPico.h"
11#include "Pico_Leaderboards.h"
13#include "Pico_Challenges.generated.h"
19class UPico_ChallengeEntry;
20class UPico_ChallengeEntryArray;
21class UPico_ChallengeArray;
25USTRUCT(BlueprintType, meta = (DisplayName =
"ChallengeOptions"))
26struct FPico_ChallengeOptions
28 GENERATED_USTRUCT_BODY()
30 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") FString Title;
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") int32 StartDate;
32 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") int32 EndDate;
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") FString LeaderboardName;
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludeActiveChallenges;
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludeFutureChallenges;
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludePastChallenges;
37 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
EChallengeVisibility Visibility;
38 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
EChallengeViewerFilter ViewerFilter;
43DECLARE_LOG_CATEGORY_EXTERN(PicoChallenges, Log, All);
48DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGet,
bool, bIsError, const FString&, ErrorMessage, UPico_Challenge*,
51DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntries,
bool, bIsError, const FString&, ErrorMessage,
52 UPico_ChallengeEntryArray*, ChallengeEntryList);
54DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntriesAfterRank,
bool, bIsError, const FString&, ErrorMessage,
55 UPico_ChallengeEntryArray*, ChallengeEntryList);
57DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntriesByIds,
bool, bIsError, const FString&, ErrorMessage,
58 UPico_ChallengeEntryArray*, ChallengeEntryList);
60DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetList,
bool, bIsError, const FString&, ErrorMessage,
61 UPico_ChallengeArray*, ChallengeList);
63DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeInvite,
bool, bIsError, const FString&, ErrorMessage,
64 UPico_Challenge*, Challenge);
66DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeLeave,
bool, bIsError, const FString&, ErrorMessage, UPico_Challenge*,
69DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeJoin,
bool, bIsError, const FString&, ErrorMessage, UPico_Challenge*,
86 FOnlineSubsystemPico& PicoSubsystem;
92 FChallengeGet GetDelegate;
93 FChallengeGetEntries GetEntriesDelegate;
94 FChallengeGetEntriesAfterRank GetEntriesAfterRankDelegate;
95 FChallengeGetEntriesByIds GetEntriesByIdsDelegate;
96 FChallengeGetList GetListDelegate;
97 FChallengeJoin JoinDelegate;
98 FChallengeLeave LeaveDelegate;
99 FChallengeInvite InviteDelegate;
110 bool Get(
const FString& ChallengeID, FChallengeGet InGetDelegate);
157 FChallengeGetEntriesAfterRank InGetEntriesAfterRankDelegate);
184 const TArray<FString>& UserIDs, FChallengeGetEntriesByIds InGetEntriesByIdsDelegate);
200 bool GetList(FPico_ChallengeOptions ChallengeOptions,
int PageIdx,
int PageSize, FChallengeGetList InGetListDelegate);
211 bool Join(
const FString& ChallengeID, FChallengeJoin InJoinDelegate);
222 bool Leave(
const FString& ChallengeID, FChallengeLeave InLeaveDelegate);
234 bool Invite(
const FString& ChallengeID,
const TArray<FString>& UserIDs, FChallengeInvite Delegate);
271 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Challenges")
272 static
void Get(UObject* WorldContextObject, const FString& ChallengeID, FChallengeGet InGetDelegate);
303 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
304 static
void GetEntries(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
306 FChallengeGetEntries InGetEntriesDelegate);
322 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
323 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
324 const FString& AfterRank,
325 FChallengeGetEntriesAfterRank InGetEntriesAfterRankDelegate);
352 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
353 static
void GetEntriesByIds(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
355 FChallengeGetEntriesByIds InGetEntriesByIdsDelegate);
371 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
372 static
void GetList(UObject* WorldContextObject, FPico_ChallengeOptions ChallengeOptions,
int PageIdx,
int PageSize,
373 FChallengeGetList InGetListDelegate);
385 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
386 static
void Join(UObject* WorldContextObject, const FString& ChallengeID, FChallengeJoin InJoinDelegate);
398 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
399 static
void Leave(UObject* WorldContextObject, const FString& ChallengeID, FChallengeLeave InLeaveDelegate);
412 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
413 static
void Invite(UObject* WorldContextObject, const FString& ChallengeID, const TArray<FString>& UserIDs,
414 FChallengeInvite Delegate);
422class ONLINESUBSYSTEMPICO_API UPico_Challenge : public UObject
427 void InitParams(ppfChallenge* ppfChallengeHandle);
430 ppfChallengeCreationType CreationType;
431 unsigned long long EndDate = 0;
432 unsigned long long StartDate = 0;
434 FString Title = FString();
435 ppfChallengeVisibility Visibility;
437 UPico_UserArray* InvitedUsersOptional;
439 UPico_UserArray* ParticipantsOptional;
441 UPico_Leaderboard* Leaderboard;
444 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
447 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
448 FDateTime GetEndDateTime();
450 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
451 FDateTime GetStartDateTime();
453 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
454 FString GetEndDate();
456 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
457 FString GetStartDate();
459 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
462 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
465 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
468 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
469 UPico_UserArray* GetInvitedUsersOptional();
471 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
472 UPico_Leaderboard* GetLeaderboard();
474 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
475 UPico_UserArray* GetParticipantsOptional();
480class ONLINESUBSYSTEMPICO_API UPico_ChallengeEntry :
public UObject
485 void InitParams(ppfChallengeEntryHandle ppfChallengeEntryHandle);
488 FString DisplayScore = FString();
489 TArray<uint8> ExtraData;
493 unsigned long long Timestamp;
498 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
499 FString GetDisplayScore();
501 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
502 TArray<uint8> GetExtraData();
504 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
505 FString GetExtraDataString();
507 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
510 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
513 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
516 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
517 FDateTime GetTimestamp();
519 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
520 UPico_User* GetUser();
524class ONLINESUBSYSTEMPICO_API UPico_ChallengeEntryArray : public UObject
529 TArray<UPico_ChallengeEntry*> ChallengeEntryArray;
532 bool bHasPreviousPage;
533 int32 TotalCount = 0;
535 void InitParams(ppfChallengeEntryArrayHandle InppfChallengeEntryArrayHandle);
537 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
538 UPico_ChallengeEntry* GetElement(int32 Index);
540 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
543 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
554class ONLINESUBSYSTEMPICO_API UPico_ChallengeArray : public UObject
559 TArray<UPico_Challenge*> ChallengeArray;
562 bool bHasPreviousPage;
563 int32 TotalCount = 0;
566 void InitParams(ppfChallengeArrayHandle InppfChallengeArrayHandle);
568 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
569 UPico_Challenge* GetElement(int32 Index);
571 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
574 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
PicoChallengesInterface class.
Definition: Pico_Challenges.h:84
bool Leave(const FString &ChallengeID, FChallengeLeave InLeaveDelegate)
Lets the current user leave a challenge.
bool Join(const FString &ChallengeID, FChallengeJoin InJoinDelegate)
Lets the current user join a challenge.
bool GetList(FPico_ChallengeOptions ChallengeOptions, int PageIdx, int PageSize, FChallengeGetList InGetListDelegate)
Gets a list of challenges.
bool GetEntriesAfterRank(ppfID ChallengeID, int PageIdx, int PageSize, unsigned long long AfterRank, FChallengeGetEntriesAfterRank InGetEntriesAfterRankDelegate)
Gets the challenge entries after a specified ranking.
bool GetEntriesByIds(const FString &ChallengeID, int PageIdx, int PageSize, ELeaderboardStartAt StartAt, const TArray< FString > &UserIDs, FChallengeGetEntriesByIds InGetEntriesByIdsDelegate)
Gets the challenge entries for specified user(s).
bool Invite(const FString &ChallengeID, const TArray< FString > &UserIDs, FChallengeInvite Delegate)
Invites user(s) to join a challenge.
bool GetEntries(const FString &ChallengeID, int PageIdx, int PageSize, ELeaderboardFilterType Filter, ELeaderboardStartAt StartAt, FChallengeGetEntries InGetEntriesDelegate)
Gets a list of challenge entries.
bool Get(const FString &ChallengeID, FChallengeGet InGetDelegate)
Gets a specified challenge by ID.
OnlinePicoChallenges Blueprint Function class.
Definition: Pico_Challenges.h:255
ELeaderboardStartAt
The type of sorting to use when getting leaderboard or challenge entries.
Definition: OnlineSubsystemPicoNames.h:648
EChallengeViewerFilter
The challenge viewer filter.
Definition: OnlineSubsystemPicoNames.h:637
EChallengeCreationType
The creator of the challenge.
Definition: OnlineSubsystemPicoNames.h:619
EChallengeVisibility
The visibility type of the challenge.
Definition: OnlineSubsystemPicoNames.h:628
ELeaderboardFilterType
The type of filter to use when using leaderboards or challenges.
Definition: OnlineSubsystemPicoNames.h:664