PICO Unreal Platform SDK
|
PicoRoomInterface class. More...
#include <Pico_Room.h>
Public Member Functions | |
bool | LaunchInvitableUserFlow (const FString &RoomID, FRoomLaunchInvitableUserFlow OnLaunchInvitableUserFlowCallback) |
Launches the invitation flow to let the current user invite friends to a specified room. This launches the system default invite UI where the user can select friends to invite and then send invitations to them. Therefore, this is a shortcut if you do not want to build the invite UI by yourself. More... | |
bool | UpdateDataStore (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... | |
bool | CreateAndJoinPrivate2 (ERoomJoinPolicy JoinPolicy, uint32 MaxUsers, FPicoRoomOptions RoomOptions, FRoomCreateAndJoinPrivate2 OnCreateAndJoinPrivate2Callback) |
Creates a new private room and joins it. More... | |
bool | Get (const FString &RoomID, FRoomGet OnGetCallback) |
Gets the information about a specified room. More... | |
bool | GetCurrent (FRoomGetCurrent OnGetCurrentCallback) |
Gets the data of the room you are currently in. More... | |
bool | GetCurrentForUser (const FString &UserId, FRoomGetCurrentForUser OnGetCurrentForUserCallback) |
Gets the current room of the specified user. More... | |
bool | GetInvitableUsers2 (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... | |
bool | GetModeratedRooms (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... | |
bool | InviteUser (const FString &RoomID, const FString &Token, FRoomInviteUser OnInviteUserCallback) |
Invites a user to the current room. More... | |
bool | Join2 (const FString &RoomID, FPicoRoomOptions options, FRoomJoin2 OnJoin2Callback) |
Joins the target room and meanwhile leaves the current room. More... | |
bool | KickUser (const FString &RoomID, const FString &UserID, int KickDurationSeconds, FRoomKickUser OnKickUserCallback) |
Kicks a user out of a room. For use by homeowners only. More... | |
bool | Leave (const FString &RoomID, FRoomLeave OnLeaveCallback) |
Leaves the current room. More... | |
bool | SetDescription (const FString &RoomID, const FString &Description, FRoomSetDescription OnSetDescriptionCallback) |
Sets the description of a room. For use by homeowners only. More... | |
bool | UpdateMembershipLockStatus (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... | |
bool | UpdateOwner (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... | |
bool | UpdatePrivateRoomJoinPolicy (const FString &RoomID, ERoomJoinPolicy JoinPolicy, FRoomUpdatePrivateRoomJoinPolicy OnUpdatePrivateRoomJoinPolicyCallback) |
Sets the join policy for a specified private room. More... | |
bool | GetNamedRooms (int PageIndex, int PageSize, FRoomGetNamedRooms OnGetNamedRoomsCallback) |
Fetches the list of named rooms created for the application. More... | |
bool | JoinOrCreateNamedRoom (ERoomJoinPolicy JoinPolicy, bool CreateIfNotExist, uint32 MaxUsers, FPicoRoomOptions Options, FRoomJoinOrCreateNamedRoom OnRoomJoinOrCreateNamedRoomCallback) |
Join(Create) a named room. More... | |
PicoRoomInterface class.
bool CreateAndJoinPrivate2 | ( | ERoomJoinPolicy | JoinPolicy, |
uint32 | MaxUsers, | ||
FPicoRoomOptions | RoomOptions, | ||
FRoomCreateAndJoinPrivate2 | OnCreateAndJoinPrivate2Callback | ||
) |
Creates a new private room and joins it.
JoinPolicy | Specifies who can join the room:
|
MaxUsers | The maximum number of members allowed in the room, including the room creator. |
RoomOptions | Room configuration for this request. |
OnCreateAndJoinPrivate2Callback | Will 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). |
true
: success false
: failure
bool Get | ( | const FString & | RoomID, |
FRoomGet | OnGetCallback | ||
) |
Gets the information about a specified room.
RoomID | The ID of the room to get information for. |
OnGetCallback | Will 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). |
true
: success false
: failure
bool GetCurrent | ( | FRoomGetCurrent | OnGetCurrentCallback | ) |
Gets the data of the room you are currently in.
OnGetCurrentCallback | Will 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). |
true
: success false
: failure
bool GetCurrentForUser | ( | const FString & | UserId, |
FRoomGetCurrentForUser | OnGetCurrentForUserCallback | ||
) |
Gets the current room of the specified user.
UserId | The ID of the user. |
OnGetCurrentForUserCallback | Will 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). |
true
: success false
: failure
bool GetInvitableUsers2 | ( | 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.
roomOptions | Additional configuration for this request. If you pass null , the response will return code 0 . |
OnGetInvitableUsers2Callback | Will 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). |
true
: success false
: failure
bool GetModeratedRooms | ( | 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.
index | Start page index. |
size | Page entry number in response (should range from 5 to 20 ). |
OnGetModeratedRoomsCallback | Will 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). |
true
: success false
: failure
bool GetNamedRooms | ( | int | PageIndex, |
int | PageSize, | ||
FRoomGetNamedRooms | OnGetNamedRoomsCallback | ||
) |
Fetches the list of named rooms created for the application.
PageIndex | Start page index. |
PageSize | page entry number in response (should range in [5,20]). |
OnGetNamedRoomsCallback | Will be executed when the request has been completed. Delegate will contain the requested object class. |
true
: success false
: failure
bool InviteUser | ( | const FString & | RoomID, |
const FString & | Token, | ||
FRoomInviteUser | OnInviteUserCallback | ||
) |
Invites a user to the current room.
MessageType.Notification_Room_InviteReceived
. roomId | The ID of the room. |
token | The user's invitation token, which is returned by RoomService.GetInvitableUsers2() . |
OnInviteUserCallback | Will 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). |
true
: success false
: failure
bool Join2 | ( | const FString & | RoomID, |
FPicoRoomOptions | options, | ||
FRoomJoin2 | OnJoin2Callback | ||
) |
Joins the target room and meanwhile leaves the current room.
RoomID | The ID of the room to join. |
options | (Optional) Additional room configuration for this request. |
OnJoin2Callback | Will 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). |
true
: success false
: failure
bool JoinOrCreateNamedRoom | ( | ERoomJoinPolicy | JoinPolicy, |
bool | CreateIfNotExist, | ||
uint32 | MaxUsers, | ||
FPicoRoomOptions | Options, | ||
FRoomJoinOrCreateNamedRoom | OnRoomJoinOrCreateNamedRoomCallback | ||
) |
Join(Create) a named room.
JoinPolicy | Specifies who can join the room. Currently only supports 'RoomJoinPolicy Everyone.' |
CreateIfNotExist | Create a new room if the named room does not exist. |
MaxUsers | The maximum number of users allowed in the room, including the creator. |
Options | Additional room configuration for this request. Optional. |
OnRoomJoinOrCreateNamedRoomCallback | Will be executed when the request has been completed. Delegate will contain the requested object class. |
true
: success false
: failure
bool KickUser | ( | const FString & | RoomID, |
const FString & | UserID, | ||
int | KickDurationSeconds, | ||
FRoomKickUser | OnKickUserCallback | ||
) |
Kicks a user out of a room. For use by homeowners only.
RoomID | The ID of the room. |
UserID | The ID of the user to be kicked (cannot be yourself). |
kickDuration | The Length of the ban (in seconds). |
OnKickUserCallback | Will 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). |
true
: success false
: failure
bool LaunchInvitableUserFlow | ( | const FString & | RoomID, |
FRoomLaunchInvitableUserFlow | OnLaunchInvitableUserFlowCallback | ||
) |
Launches the invitation flow to let the current user invite friends to a specified room. This launches the system default invite UI where the user can select friends to invite and then send invitations to them. Therefore, this is a shortcut if you do not want to build the invite UI by yourself.
RoomID | The ID of the room. |
OnLaunchInvitableUserFlowCallback | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage). |
true
: success false
: failure
bool Leave | ( | const FString & | RoomID, |
FRoomLeave | OnLeaveCallback | ||
) |
Leaves the current room.
RoomID | The ID of the room. |
OnLeaveCallback | Will 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). |
true
: success false
: failure
bool SetDescription | ( | const FString & | RoomID, |
const FString & | Description, | ||
FRoomSetDescription | OnSetDescriptionCallback | ||
) |
Sets the description of a room. For use by homeowners only.
RoomID | The ID of the room to set description for. |
Description | The new description of the room. |
OnSetDescriptionCallback | Will 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). |
true
: success false
: failure
bool UpdateDataStore | ( | 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).
roomId | The ID of the room that you currently own (call Room.OwnerOptional to check). |
data | The key/value pairs to add or update. Null value will clear a given key. |
OnUpdateDataStoreCallback | Will 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). |
true
: success false
: failure
bool UpdateMembershipLockStatus | ( | 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.
Join2()
, invitations, etc. Users that are in the room at the time of lock will be able to rejoin.RoomID | The ID of the room to lock/unlock membership for. |
MembershipLockStatus | The new membership status to set for the room:
|
OnUpdateMembershipLockStatusCallback | Will 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). |
true
: success false
: failure
bool UpdateOwner | ( | const FString & | RoomID, |
const FString & | UserID, | ||
FRoomUpdateOwner | OnUpdateOwnerCallback | ||
) |
Modifies the owner of the room, this person needs to be the person in this room.
RoomID | The ID of the room to change ownership for. |
UserID | The ID of the new user to own the room. The new user must be in the same room. |
OnUpdateOwnerCallback | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage). |
true
: success false
: failure
bool UpdatePrivateRoomJoinPolicy | ( | const FString & | RoomID, |
ERoomJoinPolicy | JoinPolicy, | ||
FRoomUpdatePrivateRoomJoinPolicy | OnUpdatePrivateRoomJoinPolicyCallback | ||
) |
Sets the join policy for a specified private room.
RoomID | The ID of the room you want to set join policy for. |
JoinPolicy | Specifies who can join the room:
|
OnUpdatePrivateRoomJoinPolicyCallback | Will 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). |
true
: success false
: failure