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_User.generated.h"
15DECLARE_LOG_CATEGORY_EXTERN(PicoUser, Log, All);
22DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetLoggedInUserFriendsAndRooms,
bool, bIsError,
const FString&, ErrorMessage,
UPico_UserAndRoomArray*, UserAndRoomArray);
23DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetNextUserAndRoomArrayPage,
bool, bIsError,
const FString&, ErrorMessage,
UPico_UserAndRoomArray*, UserAndRoomArray);
24DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetLoggedInUserFriends,
bool, bIsError,
const FString&, ErrorMessage,
UPico_UserArray*, UserArray);
25DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetNextUserPage,
bool, bIsError,
const FString&, ErrorMessage,
UPico_UserArray*, UserArray);
26DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetLoginUser,
bool, bIsError,
const FString&, ErrorMessage,
UPico_User*, User);
27DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetUserInfo,
bool, bIsError,
const FString&, ErrorMessage,
UPico_User*, User);
28DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetPermissionResult,
bool, bIsError,
const FString&, ErrorMessage,
UPico_PermissionResult*, PermissionResult);
29DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetAccessTokenResult,
bool, bIsError,
const FString&, ErrorMessage,
const FString&, AccessToken);
30DECLARE_DYNAMIC_DELEGATE_FourParams(FLaunchFriendRequestResult,
bool, bIsError,
const FString&, ErrorMessage,
bool, bDidCancel,
bool, bDidSendRequest);
31DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetUserRelationResult,
bool, bIsError,
const FString&, ErrorMessage,
UPico_UserRelationResult*, UserRelationResult);
32DECLARE_DYNAMIC_DELEGATE_FourParams(FEntitlementCheckResult,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage,
UPico_EntitlementCheckResult*, EntitlementCheck);
33DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetIDToken,
bool, bIsError,
const FString&, ErrorMessage,
const FString&, IDToken);
34DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetOrgScopedID,
bool, bIsError,
const FString&, ErrorMessage,
UPico_OrgScopedID*, OrgScopedID);
51 FOnlineSubsystemPico& PicoSubsystem;
57 FGetLoginUser GetLoginUserDelegate;
58 FGetLoggedInUserFriendsAndRooms GetLoggedInUserFriendsAndRoomsDelegate;
59 FGetNextUserAndRoomArrayPage GetNextUserAndRoomArrayPageDelegate;
60 FGetLoggedInUserFriends GetLoggedInUserFriendsDelegate;
61 FGetNextUserPage GetNextUserFriendsPageDelegate;
62 FGetUserInfo GetUserInfoDelegate;
63 FGetPermissionResult GetAuthorizePermissionsDelegate;
64 FGetPermissionResult RequestUserPermissionsDelegate;
65 FLaunchFriendRequestResult LaunchFriendRequestDelegate;
66 FGetAccessTokenResult GetAccesstokenDelegate;
67 FGetUserRelationResult GetUserRelationDelegate;
68 FEntitlementCheckResult EntitlementCheckResultDelegate;
69 FGetIDToken GetIDTokenDelegate;
70 FGetOrgScopedID GetOrgScopedIDDelegate;
92 bool GetUserInfo(
const FString& UserId, FGetUserInfo InGetUserInfoDelegate);
215 bool GetRelations(TArray<FString> UserIDs, FGetUserRelationResult OnGetUserRelationResultCallback);
231 bool EntitlementCheck(
bool bKillApp, FEntitlementCheckResult OnEntitlementCheckResultCallback);
262 bool GetOrgScopedID(
const FString& UserId, FGetOrgScopedID OnGetOrgScopedIDCallback);
297 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|User")
298 static
void PicoGetLoggedInUserAndRoom(UObject* WorldContextObject, FGetLoggedInUserFriendsAndRooms InGetLoggedInuserFriendsAndRoomsCallback);
311 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
312 static
void PicoGetNextUserAndRoomArrayPage(UObject* WorldContextObject,
UPico_UserAndRoomArray* InUserAndRoomArray, FGetNextUserAndRoomArrayPage InGetNextUserAndRoomArrayPageCallback);
325 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
326 static
void PicoGetUserFriends(UObject* WorldContextObject, FGetLoggedInUserFriends InGetLoggedInUserFriendsDelegate);
339 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
340 static
void PicoGetNextUserPage(UObject* WorldContextObject,
UPico_UserArray* InUserArray, FGetNextUserPage InGetNextUserPageDelegate);
352 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
353 static
bool GetLoginUser(UObject* WorldContextObject, FGetLoginUser InGetLoginUserDelegate);
366 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
367 static
bool GetPicoUserInfo(UObject* WorldContextObject, const FString& UserId, FGetUserInfo InGetUserInfoDelegate);
381 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
382 static
bool GetAuthorizePermissions(UObject* WorldContextObject, FGetPermissionResult OnGetPermissionResultCallback);
403 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
404 static
bool RequestUserPermissions(UObject* WorldContextObject, TArray<FString> Permissions, FGetPermissionResult OnGetPermissionResultCallback);
419 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
420 static
bool LaunchFriendRequestFlow(UObject* WorldContextObject, const FString UserId, FLaunchFriendRequestResult OnLaunchFriendRequestResultCallback);
435 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
436 static
bool GetAccessToken(UObject* WorldContextObject, FGetAccessTokenResult OnGetAccessTokenResultCallback);
454 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
455 static
bool GetRelations(UObject* WorldContextObject, TArray<FString> UserIDs, FGetUserRelationResult OnGetUserRelationResultCallback);
472 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
473 static
bool EntitlementCheck(UObject* WorldContextObject,
bool bKillApp, FEntitlementCheckResult OnEntitlementCheckResultCallback);
489 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
490 static
bool GetIDToken(UObject* WorldContextObject, FGetIDToken OnGetIDTokenResultCallback);
505 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
506 static
bool GetOrgScopedID(UObject* WorldContextObject, const FString& UserId, FGetOrgScopedID OnGetOrgScopedIDCallback);
518 void InitParams(ppfUser* ppfUserHandle);
521 FString DisplayName = FString();
522 FString ImageUrl = FString();
523 FString ID = FString();
524 FString InviteToken = FString();
525 FString SmallImageUrl = FString();
526 FString PresencePackage = FString();
529 FString Presence = FString();
530 FString PresenceDeeplinkMessage = FString();
531 FString PresenceDestinationApiName = FString();
532 FString PresenceLobbySessionId = FString();
533 FString PresenceMatchSessionId = FString();
534 FString PresenceExtra = FString();
535 FString StoreRegion = FString();
536 bool PresenceIsJoinable =
false;
541 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
542 FString GetDisplayName();
545 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
546 FString GetImageURL();
549 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
553 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
554 FString GetInviteToken();
557 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
558 FString GetSmallImageUrl();
561 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
562 FString GetPresencePackage();
565 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
569 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
573 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
574 FString GetPresence();
577 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
578 FString GetPresenceDeeplinkMessage();
581 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
582 FString GetPresenceDestinationApiName();
585 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
586 FString GetPresenceLobbySessionId();
589 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
590 FString GetPresenceMatchSessionId();
593 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
594 FString GetPresenceExtra();
597 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
598 FString GetStoreRegion();
601 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User")
602 bool GetPresenceIsJoinable();
613 void InitParams(ppfUserArray* InppfUserArrayHandle);
617 TArray<UPico_User*> UserArray;
618 FString NextPageParam;
625 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User Array")
628 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User Array")
629 FString GetNextPageParam();
632 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User Array")
636 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User Array")
654 void InitParams(ppfUserAndRoom* InppfUserAndRoomHandle);
657 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User And Room")
661 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room")
674 TArray<UPico_UserAndRoom*> UserAndRoomArray;
675 FString NextPageParam = FString();
679 void InitParams(ppfUserAndRoomArray* InppfUserAndRoomArrayHandle);
682 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User And Room Array")
686 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room Array")
687 FString GetNextPageParam();
690 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room Array")
694 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room Array")
706 TArray<FString> AuthorizedPermissions;
708 FString AccessionToken = FString();
709 FString UserID = FString();
711 void InitParams(ppfPermissionResult* InppfPermissionResultHandle);
714 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|Permission")
715 FString GetAuthorizedPermission(int32 Index);
718 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|Permission")
722 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|Permission")
723 FString GetAccessToken();
726 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|Permission")
740 TMap<FString, EUserRelationType> UserRelationMap;
742 int32 RelationMapSize;
744 TArray<FString> UserIDArray;
747 void InitParams(ppfUserRelationResult* InppfUserRelationResultHandle);
750 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|UserRelationResult")
751 int32 Contains(FString Key);
754 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|UserRelationResult")
755 FString GetUserID(int32 Index);
758 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|UserRelationResult")
759 int32 GetRelationMapSize();
762 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|UserRelationResult")
773 bool bHasEntitlement =
false;
775 int32 StatusCode = -1;
777 FString StatusMessage = FString();
780 void InitParams(ppfEntitlementCheckResult* InppfEntitlementCheckResultHandle);
783 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|EntitlementCheckResult")
784 bool GetHasEntitlement();
787 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|EntitlementCheckResult")
788 int32 GetStatusCode();
791 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|EntitlementCheckResult")
792 FString GetStatusMessage();
802 FString ID = FString();
805 void InitParams(ppfOrgScopedID* InppfOrgScopedIDHandle);
808 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|OrgScopedID")
PicoUserInterface class.
Definition: Pico_User.h:48
bool GetUserFriends(FGetLoggedInUserFriends OnGetLoggedInUserFriendsCallback)
Gets the friend list of the current user. Friends who don't use this app won't appear in this list.
bool LaunchFriendRequestFlow(const FString &UserId, FLaunchFriendRequestResult OnLaunchFriendRequestResultCallback)
Launches the flow to apply for friendship with someone.
bool GetNextUserPage(UPico_UserArray *InUserArray, FGetNextUserPage OnGetNextUserPageCallback)
Gets the next page of user list.
bool GetLoggedInUserAndRoom(FGetLoggedInUserFriendsAndRooms OnGetLoggedInuserFriendsAndRoomsCallback)
Gets the friends of the logged-in user and the rooms the friends might be in. If a friend is not in a...
bool EntitlementCheck(bool bKillApp, FEntitlementCheckResult OnEntitlementCheckResultCallback)
Gets whether the player has entitlement to use the app in the current state.
bool GetAccessToken(FGetAccessTokenResult OnGetAccessTokenResultCallback)
Gets current login user's AccessToken. The system caches the access token upon the first request,...
bool RequestUserPermissions(TArray< FString > Permissions, FGetPermissionResult OnGetPermissionResultCallback)
Requests user permissions. The user will received a pop-up notification window.
bool GetIDToken(FGetIDToken OnGetIDTokenResultCallback)
Gets the ID token of the current user. ID token is for OIDC login. China's issuer url is https://plat...
bool GetAuthorizePermissions(FGetPermissionResult OnGetPermissionResultCallback)
Gets the authorized permissions.
bool GetRelations(TArray< FString > UserIDs, FGetUserRelationResult OnGetUserRelationResultCallback)
Gets the relationship between a specified user and other user(s).
bool GetOrgScopedID(const FString &UserId, FGetOrgScopedID OnGetOrgScopedIDCallback)
Gets a user's organization ID. In an organization's apps, each user is assigned a unique organization...
bool GetUserInfo(const FString &UserId, FGetUserInfo InGetUserInfoDelegate)
Gets the information by user ID.
bool GetNextUserAndRoomArrayPage(UPico_UserAndRoomArray *InUserAndRoomArray, FGetNextUserAndRoomArrayPage OnGetNextUserAndRoomArrayPageCallback)
Get the next page of the list of rooms where the friends of the currently logged in user are located.
bool GetLoginUser(FGetLoginUser InGetLoginUserDelegate)
Gets the information about the current logged-in user.
OnlinePicoUser Blueprint Function class.
Definition: Pico_User.h:281
UPico_EntitlementCheckResult class.
Definition: Pico_User.h:769
UPico_OrgScopedID class.
Definition: Pico_User.h:798
UPico_PermissionResult class.
Definition: Pico_User.h:701
UPico_Room class.
Definition: Pico_Room.h:639
UPico_UserAndRoomArray class.
Definition: Pico_User.h:668
UPico_UserAndRoom class.
Definition: Pico_User.h:644
UPico_UserArray class.
Definition: Pico_User.h:608
UPico_User class.
Definition: Pico_User.h:515
UPico_UserRelationResult class.
Definition: Pico_User.h:733
EUserPresenceStatus
User's current online status.
Definition: OnlineSubsystemPicoNames.h:26
EUserGender
User's gender.
Definition: OnlineSubsystemPicoNames.h:36
EUserRelationType
User relation type.
Definition: OnlineSubsystemPicoNames.h:880