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 "Kismet/BlueprintFunctionLibrary.h"
12#include "Pico_Challenges.generated.h"
24USTRUCT(BlueprintType, meta = (DisplayName =
"ChallengeOptions"))
25struct FPico_ChallengeOptions
27 GENERATED_USTRUCT_BODY()
29 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") FString Title;
30 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") int32 StartDate;
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") int32 EndDate;
32 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options") FString LeaderboardName;
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludeActiveChallenges;
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludeFutureChallenges;
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
bool bIncludePastChallenges;
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
EChallengeVisibility Visibility;
37 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pico Platform|Challenges|Challenge Options")
EChallengeViewerFilter ViewerFilter;
42DECLARE_LOG_CATEGORY_EXTERN(PicoChallenges, Log, All);
47DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGet,
bool, bIsError, const FString&, ErrorMessage,
UPico_Challenge*,
50DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntries,
bool, bIsError, const FString&, ErrorMessage,
53DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntriesAfterRank,
bool, bIsError, const FString&, ErrorMessage,
56DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetEntriesByIds,
bool, bIsError, const FString&, ErrorMessage,
59DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeGetList,
bool, bIsError, const FString&, ErrorMessage,
62DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeInvite,
bool, bIsError, const FString&, ErrorMessage,
65DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeLeave,
bool, bIsError, const FString&, ErrorMessage,
UPico_Challenge*,
68DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeJoin,
bool, bIsError, const FString&, ErrorMessage,
UPico_Challenge*,
70DECLARE_DYNAMIC_DELEGATE_ThreeParams(FChallengeLaunchInvitableUserFlow,
bool, bIsError,
int, ErrorCode, const FString&, ErrorMessage);
72DECLARE_MULTICAST_DELEGATE_FourParams(FChallengeInviteAcceptedOrLaunchAppNotify,
bool,
int, const FString&, const FString& );
87 FOnlineSubsystemPico& PicoSubsystem;
93 FChallengeGet GetDelegate;
94 FChallengeGetEntries GetEntriesDelegate;
95 FChallengeGetEntriesAfterRank GetEntriesAfterRankDelegate;
96 FChallengeGetEntriesByIds GetEntriesByIdsDelegate;
97 FChallengeGetList GetListDelegate;
98 FChallengeJoin JoinDelegate;
99 FChallengeLeave LeaveDelegate;
100 FChallengeInvite InviteDelegate;
101 FChallengeLaunchInvitableUserFlow LaunchInvitableUserFlowDelegate;
103 FChallengeInviteAcceptedOrLaunchAppNotify ChallengeInviteAcceptedOrLaunchAppNotify;
105 FDelegateHandle ChallengeInviteAcceptedOrLaunchAppHandle;
106 void OnChallengeInviteAcceptedOrLaunchAppNotification(ppfMessageHandle Message,
bool bIsError);
118 bool Get(
const FString& ChallengeID, FChallengeGet InGetDelegate);
167 FChallengeGetEntriesAfterRank InGetEntriesAfterRankDelegate);
195 const TArray<FString>& UserIDs, FChallengeGetEntriesByIds InGetEntriesByIdsDelegate);
212 bool GetList(FPico_ChallengeOptions ChallengeOptions,
int PageIdx,
int PageSize, FChallengeGetList InGetListDelegate);
224 bool Join(
const FString& ChallengeID, FChallengeJoin InJoinDelegate);
236 bool Leave(
const FString& ChallengeID, FChallengeLeave InLeaveDelegate);
249 bool Invite(
const FString& ChallengeID,
const TArray<FString>& UserIDs, FChallengeInvite Delegate);
295 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Challenges")
296 static
void Get(UObject* WorldContextObject, const FString& ChallengeID, FChallengeGet InGetDelegate);
322 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
323 static
void GetEntries(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
325 FChallengeGetEntries InGetEntriesDelegate);
336 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
337 static
void GetEntriesAfterRank(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
338 const FString& AfterRank,
339 FChallengeGetEntriesAfterRank InGetEntriesAfterRankDelegate);
361 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
362 static
void GetEntriesByIds(UObject* WorldContextObject, const FString& ChallengeID,
int PageIdx,
int PageSize,
364 FChallengeGetEntriesByIds InGetEntriesByIdsDelegate);
375 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
376 static
void GetList(UObject* WorldContextObject, FPico_ChallengeOptions ChallengeOptions,
int PageIdx,
int PageSize,
377 FChallengeGetList InGetListDelegate);
384 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
385 static
void Join(UObject* WorldContextObject, const FString& ChallengeID, FChallengeJoin InJoinDelegate);
392 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
393 static
void Leave(UObject* WorldContextObject, const FString& ChallengeID, FChallengeLeave InLeaveDelegate);
401 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
402 static
void Invite(UObject* WorldContextObject, const FString& ChallengeID, const TArray<FString>& UserIDs,
403 FChallengeInvite Delegate);
410 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Challenges")
411 static
void LaunchInvitableUserFlow(UObject* WorldContextObject, const FString& ChallengeID, FChallengeLaunchInvitableUserFlow Delegate);
424 void InitParams(ppfChallenge* ppfChallengeHandle);
427 ppfChallengeCreationType CreationType;
428 unsigned long long EndDate = 0;
429 unsigned long long StartDate = 0;
431 FString Title = FString();
432 ppfChallengeVisibility Visibility;
443 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge")
447 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
448 FDateTime GetEndDateTime();
451 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
452 FDateTime GetStartDateTime();
455 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
456 FString GetEndDate();
459 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
460 FString GetStartDate();
463 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
467 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
471 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
475 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
479 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
483 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge")
494 void InitParams(ppfChallengeEntryHandle ppfChallengeEntryHandle);
497 FString DisplayScore = FString();
498 TArray<uint8> ExtraData;
502 unsigned long long Timestamp;
509 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge Entry")
510 FString GetDisplayScore();
513 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
514 TArray<uint8> GetExtraData();
517 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
518 FString GetExtraDataString();
521 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
525 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
529 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
533 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
534 FDateTime GetTimestamp();
537 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry")
548 TArray<UPico_ChallengeEntry*> ChallengeEntryArray;
551 bool bHasPreviousPage;
552 int32 TotalCount = 0;
554 void InitParams(ppfChallengeEntryArrayHandle InppfChallengeEntryArrayHandle);
557 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge Entry Array")
561 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
565 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
568 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
569 bool HasPreviousPage();
571 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Entry Array")
572 int32 GetTotalCount();
582 TArray<UPico_Challenge*> ChallengeArray;
585 bool bHasPreviousPage;
586 int32 TotalCount = 0;
589 void InitParams(ppfChallengeArrayHandle InppfChallengeArrayHandle);
592 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Challenges|Challenge Array")
596 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
600 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
603 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
604 bool HasPreviousPage();
606 UFUNCTION(BlueprintPure, Category = "Pico Platform|Challenges|Challenge Array")
607 int32 GetTotalCount();
PicoChallengesInterface class.
Definition: Pico_Challenges.h:85
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:284
UPico_ChallengeArray class.
Definition: Pico_Challenges.h:578
int32 GetSize()
Get the size of Challenge Array .
bool HasNextPage()
Get whether the list has the next page.
UPico_Challenge * GetElement(int32 Index)
Get Challenge Array element form Index.
UPico_ChallengeEntryArray class.
Definition: Pico_Challenges.h:544
UPico_ChallengeEntry class.
Definition: Pico_Challenges.h:490
UPico_Challenge class.
Definition: Pico_Challenges.h:420
UPico_Leaderboard class.
Definition: Pico_Leaderboards.h:373
UPico_UserArray class.
Definition: Pico_User.h:608
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
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