PICO Unreal Platform SDK
UOnlinePicoRoomFunction Class Reference

OnlinePicoRoom Blueprint Function class. More...

#include <Pico_Room.h>

Static Public Member Functions

static void LaunchInvitableUserFlow (UObject *WorldContextObject, const FString &RoomID, FRoomLaunchInvitableUserFlow OnLaunchInvitableUserFlowCallback)
 Gets the friends of the logged-in user and the rooms the friends might be in. If a friend is not in any room, the 'room' field will be null. More...
 
static void UpdateDataStore (UObject *WorldContextObject, const FString &RoomID, const TMap< FString, FString > &Data, FRoomUpdateDataStore OnUpdateDataStoreCallback)
 Updates the data store of the current room (the caller should be the room owner). More...
 
static void CreateAndJoinPrivate2 (UObject *WorldContextObject, ERoomJoinPolicy JoinPolicy, int32 MaxUsers, FPicoRoomOptions RoomOptions, FRoomCreateAndJoinPrivate2 OnCreateAndJoinPrivate2Callback)
 Creates a new private room and joins it. More...
 
static void Get (UObject *WorldContextObject, const FString &RoomID, FRoomGet OnGetCallback)
 Gets the information about a specified room. More...
 
static void GetCurrent (UObject *WorldContextObject, FRoomGetCurrent OnGetCurrentCallback)
 Gets the data of the room you are currently in. More...
 
static void GetCurrentForUser (UObject *WorldContextObject, const FString &UserId, FRoomGetCurrentForUser OnGetCurrentForUserCallback)
 Gets the current room of the specified user. More...
 
static void GetInvitableUsers2 (UObject *WorldContextObject, FPicoRoomOptions RoomOptions, FRoomGetInvitableUsers2 OnGetInvitableUsers2Callback)
 Gets a list of members the user can invite to the room. These members are drawn from the user's friends list and recently encountered list, and filtered based on relevance and interests. More...
 
static void GetModeratedRooms (UObject *WorldContextObject, int PageIndex, int PageSize, FRoomGetModeratedRooms OnGetModeratedRoomsCallback)
 Gets the list of moderated rooms created for the application. The payload returned is roomarray. The room info contained in roomarray does not include userlist info. More...
 
static void InviteUser (UObject *WorldContextObject, const FString &RoomID, const FString &Token, FRoomInviteUser OnInviteUserCallback)
 Invites a user to the current room. More...
 
static void Join2 (UObject *WorldContextObject, const FString &RoomID, FPicoRoomOptions RoomOptions, FRoomJoin2 OnJoin2Callback)
 Joins the target room and meanwhile leaves the current room. More...
 
static void KickUser (UObject *WorldContextObject, const FString &RoomID, const FString &UserID, int32 KickDurationSeconds, FRoomKickUser OnKickUserCallback)
 Kicks a user out of a room. For use by homeowners only. More...
 
static void Leave (UObject *WorldContextObject, const FString &RoomID, FRoomLeave OnLeaveCallback)
 Leaves the current room. More...
 
static void SetDescription (UObject *WorldContextObject, const FString &RoomID, const FString &Description, FRoomSetDescription OnSetDescriptionCallback)
 Sets the description of a room. For use by homeowners only. More...
 
static void UpdateMembershipLockStatus (UObject *WorldContextObject, const FString &RoomID, ERoomMembershipLockStatus MembershipLockStatus, FRoomUpdateMembershipLockStatus OnUpdateMembershipLockStatusCallback)
 Locks/unlocks the membership of a room (the caller should be the room owner) to allow/disallow new members from being able to join the room. More...
 
static void UpdateOwner (UObject *WorldContextObject, const FString &RoomID, const FString &UserID, FRoomUpdateOwner OnUpdateOwnerCallback)
 Modifies the owner of the room, this person needs to be the person in this room. More...
 
static void UpdatePrivateRoomJoinPolicy (UObject *WorldContextObject, const FString &RoomID, ERoomJoinPolicy JoinPolicy, FRoomUpdatePrivateRoomJoinPolicy OnUpdatePrivateRoomJoinPolicyCallback)
 Sets the join policy for a specified private room. More...
 
static void GetNamedRooms (UObject *WorldContextObject, int PageIndex, int PageSize, FRoomGetNamedRooms OnGetNamedRoomsCallback)
 Fetches the list of named rooms created for the application. More...
 
static void JoinOrCreateNamedRoom (UObject *WorldContextObject, ERoomJoinPolicy JoinPolicy, bool CreateIfNotExist, int32 MaxUsers, FPicoRoomOptions Options, FRoomJoinOrCreateNamedRoom OnRoomJoinOrCreateNamedRoomCallback)
 Joins or creates a named room. More...
 
static FPicoRoomOptions GetCreatePrivateRoomOptions (const FString &DataStoreKey, const FString &DataStoreValue)
 Get the room options for creating a private room. You can use it when you call 'CreateAndJoinPrivate2'. More...
 
static FPicoRoomOptions GetJoinOrCreateNamedRoomOptions (const FString &DataStoreKey, const FString &DataStoreValue, const FString &Name, const FString &Password)
 Get the room options for create a named room. You can use it when you call 'JoinOrCreateNamedRoom'. More...
 

Detailed Description

OnlinePicoRoom Blueprint Function class.

Member Function Documentation

◆ CreateAndJoinPrivate2()

static void CreateAndJoinPrivate2 ( UObject *  WorldContextObject,
ERoomJoinPolicy  JoinPolicy,
int32  MaxUsers,
FPicoRoomOptions  RoomOptions,
FRoomCreateAndJoinPrivate2  OnCreateAndJoinPrivate2Callback 
)
static

Creates a new private room and joins it.

Note
This type of room can be obtained by querying the room where a friend is, so it is suitable for playing with friends.
Parameters
WorldContextObjectUsed to get the information about the current world.
JoinPolicySpecifies who can join the room:
  • 0: nobody
  • 1: everybody
  • 2: friends of members
  • 3: friends of the room owner
  • 4: invited users
  • 5: unknown
MaxUsersThe maximum number of members allowed in the room, including the room creator.
RoomOptionsRoom configuration for this request.
OnCreateAndJoinPrivate2CallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ Get()

static void Get ( UObject *  WorldContextObject,
const FString &  RoomID,
FRoomGet  OnGetCallback 
)
static

Gets the information about a specified room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room to get information for.
OnGetCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ GetCreatePrivateRoomOptions()

static FPicoRoomOptions GetCreatePrivateRoomOptions ( const FString &  DataStoreKey,
const FString &  DataStoreValue 
)
static

Get the room options for creating a private room. You can use it when you call 'CreateAndJoinPrivate2'.

Parameters
DataStoreKeyThe key to add.
DataStoreValueThe value to add.
Returns
The room options for creating a private room.


◆ GetCurrent()

static void GetCurrent ( UObject *  WorldContextObject,
FRoomGetCurrent  OnGetCurrentCallback 
)
static

Gets the data of the room you are currently in.

Parameters
WorldContextObjectUsed to get the information about the current world.
OnGetCurrentCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ GetCurrentForUser()

static void GetCurrentForUser ( UObject *  WorldContextObject,
const FString &  UserId,
FRoomGetCurrentForUser  OnGetCurrentForUserCallback 
)
static

Gets the current room of the specified user.

Note
The user's privacy settings may not allow you to access their room.
Parameters
WorldContextObjectUsed to get the information about the current world.
UserIdThe ID of the user.
OnGetCurrentForUserCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ GetInvitableUsers2()

static void GetInvitableUsers2 ( UObject *  WorldContextObject,
FPicoRoomOptions  RoomOptions,
FRoomGetInvitableUsers2  OnGetInvitableUsers2Callback 
)
static

Gets a list of members the user can invite to the room. These members are drawn from the user's friends list and recently encountered list, and filtered based on relevance and interests.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomOptionsAdditional configuration for this request. If you pass null, the response will return code 0.
OnGetInvitableUsers2CallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_UserArray *, UserArray).

◆ GetJoinOrCreateNamedRoomOptions()

static FPicoRoomOptions GetJoinOrCreateNamedRoomOptions ( const FString &  DataStoreKey,
const FString &  DataStoreValue,
const FString &  Name,
const FString &  Password 
)
static

Get the room options for create a named room. You can use it when you call 'JoinOrCreateNamedRoom'.

Parameters
DataStoreKeyThe key to add.
DataStoreValueThe value to add.
NameThe name of the named room.
PasswordThe password of the named room.
Returns
The room options for creating a named room.


◆ GetModeratedRooms()

static void GetModeratedRooms ( UObject *  WorldContextObject,
int  PageIndex,
int  PageSize,
FRoomGetModeratedRooms  OnGetModeratedRoomsCallback 
)
static

Gets the list of moderated rooms created for the application. The payload returned is roomarray. The room info contained in roomarray does not include userlist info.

Parameters
WorldContextObjectUsed to get the information about the current world.
PageIndexStart page index.
PageSizePage entry number in response (should range from 5 to 20).
OnGetModeratedRoomsCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_RoomArray *, RoomArray).

◆ GetNamedRooms()

static void GetNamedRooms ( UObject *  WorldContextObject,
int  PageIndex,
int  PageSize,
FRoomGetNamedRooms  OnGetNamedRoomsCallback 
)
static

Fetches the list of named rooms created for the application.

Parameters
WorldContextObjectUsed to get the information about the current world.
PageIndexStart page index.
PageSizepage entry number in response (should range in [5,20]).
OnGetNamedRoomsCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.

◆ InviteUser()

static void InviteUser ( UObject *  WorldContextObject,
const FString &  RoomID,
const FString &  Token,
FRoomInviteUser  OnInviteUserCallback 
)
static

Invites a user to the current room.

Note
The user invited will receive a notification of type MessageType.Notification_Room_InviteReceived.
Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room.
TokenThe user's invitation token, which is returned by RoomService.GetInvitableUsers2().
OnInviteUserCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ Join2()

static void Join2 ( UObject *  WorldContextObject,
const FString &  RoomID,
FPicoRoomOptions  RoomOptions,
FRoomJoin2  OnJoin2Callback 
)
static

Joins the target room and meanwhile leaves the current room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room to join.
RoomOptions(Optional) Additional room configuration for this request.
OnJoin2CallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ JoinOrCreateNamedRoom()

static void JoinOrCreateNamedRoom ( UObject *  WorldContextObject,
ERoomJoinPolicy  JoinPolicy,
bool  CreateIfNotExist,
int32  MaxUsers,
FPicoRoomOptions  Options,
FRoomJoinOrCreateNamedRoom  OnRoomJoinOrCreateNamedRoomCallback 
)
static

Joins or creates a named room.

Parameters
WorldContextObjectUsed to get the information about the current world.
JoinPolicySpecifies who can join the room. Currently only supports 'RoomJoinPolicy Everyone.'
CreateIfNotExistCreate a new room if the named room does not exist.
MaxUsersThe maximum number of users allowed in the room, including the creator.
OptionsAdditional room configuration for this request. Optional.
OnRoomJoinOrCreateNamedRoomCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.

◆ KickUser()

static void KickUser ( UObject *  WorldContextObject,
const FString &  RoomID,
const FString &  UserID,
int32  KickDurationSeconds,
FRoomKickUser  OnKickUserCallback 
)
static

Kicks a user out of a room. For use by homeowners only.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room.
UserIDThe ID of the user to be kicked (cannot be yourself).
KickDurationSecondsThe Length of the ban (in seconds).
OnKickUserCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ LaunchInvitableUserFlow()

static void LaunchInvitableUserFlow ( UObject *  WorldContextObject,
const FString &  RoomID,
FRoomLaunchInvitableUserFlow  OnLaunchInvitableUserFlowCallback 
)
static

Gets the friends of the logged-in user and the rooms the friends might be in. If a friend is not in any room, the 'room' field will be null.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room.
InGetLoggedInuserFriendsAndRoomsCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage).

◆ Leave()

static void Leave ( UObject *  WorldContextObject,
const FString &  RoomID,
FRoomLeave  OnLeaveCallback 
)
static

Leaves the current room.

Note
The room you are now in will be returned if the request succeeds.
Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room.
OnLeaveCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ SetDescription()

static void SetDescription ( UObject *  WorldContextObject,
const FString &  RoomID,
const FString &  Description,
FRoomSetDescription  OnSetDescriptionCallback 
)
static

Sets the description of a room. For use by homeowners only.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room to set description for.
DescriptionThe new description of the room.
OnSetDescriptionCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ UpdateDataStore()

static void UpdateDataStore ( UObject *  WorldContextObject,
const FString &  RoomID,
const TMap< FString, FString > &  Data,
FRoomUpdateDataStore  OnUpdateDataStoreCallback 
)
static

Updates the data store of the current room (the caller should be the room owner).

Note
Room data stores only allow string values. The maximum key length is 32 bytes and the maximum value length is 64 bytes. If you provide illegal values, this method will return an error.
Parameters
WorldContextObjectUsed to get the information about the current world.
roomIdThe ID of the room that you currently own (call Room.OwnerOptional to check).
dataThe key/value pairs to add or update. Null value will clear a given key.
OnUpdateDataStoreCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ UpdateMembershipLockStatus()

static void UpdateMembershipLockStatus ( UObject *  WorldContextObject,
const FString &  RoomID,
ERoomMembershipLockStatus  MembershipLockStatus,
FRoomUpdateMembershipLockStatus  OnUpdateMembershipLockStatusCallback 
)
static

Locks/unlocks the membership of a room (the caller should be the room owner) to allow/disallow new members from being able to join the room.

Note
Locking membership will prevent other users from joining the room through Join2(), invitations, etc. Users that are in the room at the time of lock will be able to rejoin.
Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room to lock/unlock membership for.
MembershipLockStatusThe new membership status to set for the room:
  • 0: Unknown
  • 1: lock
  • 2: unlock
OnUpdateMembershipLockStatusCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).

◆ UpdateOwner()

static void UpdateOwner ( UObject *  WorldContextObject,
const FString &  RoomID,
const FString &  UserID,
FRoomUpdateOwner  OnUpdateOwnerCallback 
)
static

Modifies the owner of the room, this person needs to be the person in this room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room to change ownership for.
UserIDThe ID of the new user to own the room. The new user must be in the same room.
OnUpdateOwnerCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage).

◆ UpdatePrivateRoomJoinPolicy()

static void UpdatePrivateRoomJoinPolicy ( UObject *  WorldContextObject,
const FString &  RoomID,
ERoomJoinPolicy  JoinPolicy,
FRoomUpdatePrivateRoomJoinPolicy  OnUpdatePrivateRoomJoinPolicyCallback 
)
static

Sets the join policy for a specified private room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIDThe ID of the room you want to set join policy for.
JoinPolicySpecifies who can join the room:
  • 0: nobody
  • 1: everybody
  • 2: friends of members
  • 3: friends of the room owner
  • 4: invited users
  • 5: unknown
OnUpdatePrivateRoomJoinPolicyCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_Room *, Room).