4#include "CoreMinimal.h"
5#include "UObject/NoExportTypes.h"
6#include "PPF_Platform.h"
7#include "OnlineSubsystemPicoNames.h"
8#include "OnlineSubsystemPico.h"
9#include "Pico_Leaderboards.h"
11#include "Pico_Challenges.generated.h"
23USTRUCT(BlueprintType, meta = (DisplayName =
"ChallengeOptions"))
24struct FPico_ChallengeOptions
26 GENERATED_USTRUCT_BODY()
28 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") FString Title;
29 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") int32 StartDate;
30 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") int32 EndDate;
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") FString LeaderboardName;
32 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludeActiveChallenges;
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludeFutureChallenges;
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludePastChallenges;
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
EChallengeVisibility Visibility;
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
EChallengeViewerFilter ViewerFilter;
41DECLARE_LOG_CATEGORY_EXTERN(PicoChallenges, Log, All);
46DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGet,
bool, bIsError, const FString&, ErrorMessage,
UPico_Challenge*,
49DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntries,
bool, bIsError, const FString&, ErrorMessage,
52DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntriesAfterRank,
bool, bIsError, const FString&, ErrorMessage,
55DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntriesByIds,
bool, bIsError, const FString&, ErrorMessage,
58DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetList,
bool, bIsError, const FString&, ErrorMessage,
61DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeInvite,
bool, bIsError, const FString&, ErrorMessage,
64DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeLeave,
bool, bIsError, const FString&, ErrorMessage,
UPico_Challenge*,
67DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeJoin,
bool, bIsError, const FString&, ErrorMessage,
UPico_Challenge*,
69DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeLaunchInvitableUserFlow,
bool, bIsError,
int, ErrorCode, const FString&, ErrorMessage);
71DECLARE_MULTICAST_DELEGATE_FourParams(FChallengeInviteAcceptedOrLaunchAppNotify,
bool,
int, const FString&, const FString& );
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;
100 FChallengeLaunchInvitableUserFlow LaunchInvitableUserFlowDelegate;
102 FChallengeInviteAcceptedOrLaunchAppNotify ChallengeInviteAcceptedOrLaunchAppNotify;
104 FDelegateHandle ChallengeInviteAcceptedOrLaunchAppHandle;
105 void OnChallengeInviteAcceptedOrLaunchAppNotification(ppfMessageHandle Message,
bool bIsError);
117 bool Get(
const FString& ChallengeID, FChallengeGet InGetDelegate);
166 FChallengeGetEntriesAfterRank InGetEntriesAfterRankDelegate);
194 const TArray<FString>& UserIDs, FChallengeGetEntriesByIds InGetEntriesByIdsDelegate);
211 bool GetList(FPico_ChallengeOptions ChallengeOptions,
int PageIdx,
int PageSize, FChallengeGetList InGetListDelegate);
223 bool Join(
const FString& ChallengeID, FChallengeJoin InJoinDelegate);
235 bool Leave(
const FString& ChallengeID, FChallengeLeave InLeaveDelegate);
248 bool Invite(
const FString& ChallengeID,
const TArray<FString>& UserIDs, FChallengeInvite Delegate);
294 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Challenges")
295 static
void Get(UObject* WorldContextObject, const FString& ChallengeID, FChallengeGet InGetDelegate);
321 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
322 static
void GetEntries(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
324 FChallengeGetEntries InGetEntriesDelegate);
335 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
336 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
337 const FString& AfterRank,
338 FChallengeGetEntriesAfterRank InGetEntriesAfterRankDelegate);
360 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
361 static
void GetEntriesByIds(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
363 FChallengeGetEntriesByIds InGetEntriesByIdsDelegate);
374 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
375 static
void GetList(UObject* WorldContextObject, FPico_ChallengeOptions ChallengeOptions,
int PageIdx,
int PageSize,
376 FChallengeGetList InGetListDelegate);
383 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
384 static
void Join(UObject* WorldContextObject, const FString& ChallengeID, FChallengeJoin InJoinDelegate);
391 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
392 static
void Leave(UObject* WorldContextObject, const FString& ChallengeID, FChallengeLeave InLeaveDelegate);
400 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
401 static
void Invite(UObject* WorldContextObject, const FString& ChallengeID, const TArray<FString>& UserIDs,
402 FChallengeInvite Delegate);
409 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
410 static
void LaunchInvitableUserFlow(UObject* WorldContextObject, const FString& ChallengeID, FChallengeLaunchInvitableUserFlow Delegate);
423 void InitParams(ppfChallenge* ppfChallengeHandle);
426 ppfChallengeCreationType CreationType;
427 unsigned long long EndDate = 0;
428 unsigned long long StartDate = 0;
430 FString Title = FString();
431 ppfChallengeVisibility Visibility;
442 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
446 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
447 FDateTime GetEndDateTime();
450 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
451 FDateTime GetStartDateTime();
454 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
455 FString GetEndDate();
458 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
459 FString GetStartDate();
462 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
466 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
470 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
474 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
478 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
482 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
493 void InitParams(ppfChallengeEntryHandle ppfChallengeEntryHandle);
496 FString DisplayScore = FString();
497 TArray<uint8> ExtraData;
501 unsigned long long Timestamp;
508 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge Entry")
509 FString GetDisplayScore();
512 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
513 TArray<uint8> GetExtraData();
516 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
517 FString GetExtraDataString();
520 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
524 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
528 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
532 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
533 FDateTime GetTimestamp();
536 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
547 TArray<UPico_ChallengeEntry*> ChallengeEntryArray;
550 bool bHasPreviousPage;
551 int32 TotalCount = 0;
553 void InitParams(ppfChallengeEntryArrayHandle InppfChallengeEntryArrayHandle);
556 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge Entry Array")
560 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
564 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
567 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
568 bool HasPreviousPage();
570 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
571 int32 GetTotalCount();
581 TArray<UPico_Challenge*> ChallengeArray;
584 bool bHasPreviousPage;
585 int32 TotalCount = 0;
588 void InitParams(ppfChallengeArrayHandle InppfChallengeArrayHandle);
591 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge Array")
595 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
599 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
602 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
603 bool HasPreviousPage();
605 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
606 int32 GetTotalCount();
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 LaunchInvitableUserFlow(const FString &ChallengeID, FChallengeLaunchInvitableUserFlow Delegate)
Launches the invitation flow to let the current user invite friends to a specified challenge....
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:283
UPico_ChallengeArray class.
Definition: Pico_Challenges.h:577
int32 GetSize()
Get the size of ChallengeEntryArray .
bool HasNextPage()
Get whether the list has the next page.
UPico_Challenge * GetElement(int32 Index)
Get ChallengeEntryArray element form Index.
UPico_ChallengeEntryArray class.
Definition: Pico_Challenges.h:543
UPico_ChallengeEntry class.
Definition: Pico_Challenges.h:489
UPico_Challenge class.
Definition: Pico_Challenges.h:419
UPico_Leaderboard class.
Definition: Pico_Leaderboards.h:372
UPico_UserArray class.
Definition: Pico_User.h:539
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
EChallengeViewerFilter
The challenge viewer filter.
Definition: OnlineSubsystemPicoNames.h:635
EChallengeCreationType
The creator of the challenge.
Definition: OnlineSubsystemPicoNames.h:617
EChallengeVisibility
The visibility type of the challenge.
Definition: OnlineSubsystemPicoNames.h:626
ELeaderboardFilterType
The type of filter to use when using leaderboards or challenges.
Definition: OnlineSubsystemPicoNames.h:662