16#include "CoreMinimal.h"
17#include "UObject/NoExportTypes.h"
18#include "PPF_Platform.h"
19#include "OnlineSubsystemPicoNames.h"
20#include "OnlineSubsystemPico.h"
22#include "Pico_User.generated.h"
26DECLARE_LOG_CATEGORY_EXTERN(PicoUser, Log, All);
33DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetLoggedInUserFriendsAndRooms,
bool, bIsError,
const FString&, ErrorMessage, UPico_UserAndRoomArray*, UserAndRoomArray);
34DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetNextUserAndRoomArrayPage,
bool, bIsError,
const FString&, ErrorMessage, UPico_UserAndRoomArray*, UserAndRoomArray);
35DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetLoggedInUserFriends,
bool, bIsError,
const FString&, ErrorMessage, UPico_UserArray*, UserArray);
36DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetNextUserPage,
bool, bIsError,
const FString&, ErrorMessage, UPico_UserArray*, UserArray);
37DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetLoginUser,
bool, bIsError,
const FString&, ErrorMessage, UPico_User*, User);
38DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetUserInfo,
bool, bIsError,
const FString&, ErrorMessage, UPico_User*, User);
39DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetPermissionResult,
bool, bIsError,
const FString&, ErrorMessage, UPico_PermissionResult*, PermissionResult);
40DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetAccessTokenResult,
bool, bIsError,
const FString&, ErrorMessage,
const FString&, AccessToken);
41DECLARE_DYNAMIC_DELEGATE_FourParams(FLaunchFriendRequestResult,
bool, bIsError,
const FString&, ErrorMessage,
bool, bDidCancel,
bool, bDidSendRequest);
58 FOnlineSubsystemPico& PicoSubsystem;
64 FGetLoginUser GetLoginUserDelegate;
65 FGetLoggedInUserFriendsAndRooms GetLoggedInUserFriendsAndRoomsDelegate;
66 FGetNextUserAndRoomArrayPage GetNextUserAndRoomArrayPageDelegate;
67 FGetLoggedInUserFriends GetLoggedInUserFriendsDelegate;
68 FGetNextUserPage GetNextUserFriendsPageDelegate;
69 FGetUserInfo GetUserInfoDelegate;
70 FGetPermissionResult GetAuthorizePermissionsDelegate;
71 FGetPermissionResult RequestUserPermissionsDelegate;
72 FLaunchFriendRequestResult LaunchFriendRequestDelegate;
73 FGetAccessTokenResult GetAccesstokenDelegate;
94 bool GetUserInfo(
const FString& UserId, FGetUserInfo InGetUserInfoDelegate);
137 bool GetNextUserPage(UPico_UserArray* InUserArray, FGetNextUserPage OnGetNextUserPageCallback);
182 bool GetAccessToken(FGetAccessTokenResult OnGetAccessTokenResultCallback);
216 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|User")
217 static
void PicoGetLoggedInUserAndRoom(UObject* WorldContextObject, FGetLoggedInUserFriendsAndRooms InGetLoggedInuserFriendsAndRoomsCallback);
229 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
230 static
void PicoGetNextUserAndRoomArrayPage(UObject* WorldContextObject, UPico_UserAndRoomArray* InUserAndRoomArray, FGetNextUserAndRoomArrayPage InGetNextUserAndRoomArrayPageCallback);
242 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
243 static
void PicoGetUserFriends(UObject* WorldContextObject, FGetLoggedInUserFriends InGetLoggedInUserFriendsDelegate);
255 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
256 static
void PicoGetNextUserPage(UObject* WorldContextObject, UPico_UserArray* InUserArray, FGetNextUserPage InGetNextUserPageDelegate);
267 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
268 static
bool GetLoginUser(UObject* WorldContextObject, FGetLoginUser InGetLoginUserDelegate);
280 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
281 static
bool GetPicoUserInfo(UObject* WorldContextObject, const FString& UserId, FGetUserInfo InGetUserInfoDelegate);
294 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
295 static
bool GetAuthorizePermissions(UObject* WorldContextObject, FGetPermissionResult OnGetPermissionResultCallback);
315 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
316 static
bool RequestUserPermissions(UObject* WorldContextObject, TArray<FString> Permissions, FGetPermissionResult OnGetPermissionResultCallback);
330 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
331 static
bool LaunchFriendRequestFlow(UObject* WorldContextObject, const FString UserId, FLaunchFriendRequestResult OnLaunchFriendRequestResultCallback);
333 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|User")
334 static
bool GetAccessToken(UObject* WorldContextObject, FGetAccessTokenResult OnGetAccessTokenResultCallback);
341class ONLINESUBSYSTEMPICO_API UPico_User : public UObject
345 void InitParams(ppfUser* ppfUserHandle);
348 FString DisplayName = FString();
349 FString ImageUrl = FString();
350 FString ID = FString();
351 FString InviteToken = FString();
352 FString SmallImageUrl = FString();
353 FString PresencePackage = FString();
356 FString Presence = FString();
357 FString PresenceDeeplinkMessage = FString();
358 FString PresenceDestinationApiName = FString();
359 FString PresenceLobbySessionId = FString();
360 FString PresenceMatchSessionId = FString();
361 FString PresenceExtra = FString();
362 FString StoreRegion = FString();
366 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
367 FString GetDisplayName();
369 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
370 FString GetImageURL();
372 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
375 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
376 FString GetInviteToken();
378 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
379 FString GetSmallImageUrl();
381 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
382 FString GetPresencePackage();
384 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
387 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
390 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
391 FString GetPresence();
393 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
394 FString GetPresenceDeeplinkMessage();
396 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
397 FString GetPresenceDestinationApiName();
399 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
400 FString GetPresenceLobbySessionId();
402 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
403 FString GetPresenceMatchSessionId();
405 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
406 FString GetPresenceExtra();
408 UFUNCTION(BlueprintPure, Category =
"Pico Platform|User|User")
409 FString GetStoreRegion();
413class ONLINESUBSYSTEMPICO_API UPico_UserArray :
public UObject
419 void InitParams(ppfUserArray* InppfUserArrayHandle);
423 TArray<UPico_User*> UserArray;
424 FString NextPageParam;
431 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User Array")
432 UPico_User* GetElement(int32 Index);
434 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User Array")
435 FString GetNextPageParam();
437 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User Array")
440 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User Array")
446class ONLINESUBSYSTEMPICO_API UPico_UserAndRoom : public UObject
452 UPico_Room* Room =
nullptr;
455 UPico_User* User =
nullptr;
457 void InitParams(ppfUserAndRoom* InppfUserAndRoomHandle);
459 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room")
460 UPico_Room* GetRoom();
462 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room")
463 UPico_User* GetUser();
467class ONLINESUBSYSTEMPICO_API UPico_UserAndRoomArray : public UObject
474 TArray<UPico_UserAndRoom*> UserAndRoomArray;
475 FString NextPageParam = FString();
479 void InitParams(ppfUserAndRoomArray* InppfUserAndRoomArrayHandle);
481 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room Array")
482 UPico_UserAndRoom* GetElement(int32 Index);
484 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room Array")
485 FString GetNextPageParam();
487 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room Array")
490 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|User And Room Array")
495class ONLINESUBSYSTEMPICO_API UPico_PermissionResult : public UObject
501 TArray<FString> AuthorizedPermissions;
503 FString AccessionToken = FString();
504 FString UserID = FString();
506 void InitParams(ppfPermissionResult* InppfPermissionResultHandle);
508 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|Permission")
509 FString GetAuthorizedPermission(int32 Index);
511 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|Permission")
514 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|Permission")
515 FString GetAccessToken();
517 UFUNCTION(BlueprintPure, Category = "Pico Platform|User|Permission")
PicoUserInterface class.
Definition: Pico_User.h:55
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 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 RequestUserPermissions(TArray< FString > Permissions, FGetPermissionResult OnGetPermissionResultCallback)
Requests user permissions. The user will received a pop-up notification window.
bool GetAuthorizePermissions(FGetPermissionResult OnGetPermissionResultCallback)
Gets the authorized permissions.
bool LaunchFriendRequestFlow(const FString UserId, FLaunchFriendRequestResult OnLaunchFriendRequestResultCallback)
Launches the flow to apply for friendship with someone.
bool GetUserInfo(const FString &UserId, FGetUserInfo InGetUserInfoDelegate)
Gets the information by user ID.
bool GetNextUserAndRoomArrayPage(UPico_UserAndRoomArray *InUserAndRoomArray, FGetNextUserAndRoomArrayPage OnGetNextUserAndRoomArrayPageCallback)
Gets the friend list of the current user.
bool GetLoginUser(FGetLoginUser InGetLoginUserDelegate)
Gets the information about the current logged-in user.
OnlinePicoUser Blueprint Function class.
Definition: Pico_User.h:201
EUserPresenceStatus
User's current online status.
Definition: OnlineSubsystemPicoNames.h:38
EUserGender
User's gender.
Definition: OnlineSubsystemPicoNames.h:48