Pico Unreal Platform SDK
FPicoPresenceInterface Class Reference

Pico Presence interface class. More...

#include <PicoPresenceInterface.h>

Public Member Functions

bool PresenceClear (const FOnPresenceClearComplete &Delegate=FOnPresenceClearComplete())
 Clears a user's presence data in the current app. More...
 
bool ReadInvitableUser (TArray< FString > SuggestedUserList, const FOnReadInvitableUserComplete &Delegate=FOnReadInvitableUserComplete())
 Reads a list of invitable users for a user. More...
 
bool GetInvitableFriendList (TArray< TSharedRef< FOnlinePicoFriend > > &OutFriends)
 Gets a list of invitable friends for a user. These friends are previously retrieved from the online service when PresenceGetDestinations is complete. More...
 
bool PresenceSet (const FString &ApiName, const FString &LobbySessionId, const FString &MatchSessionId, bool bIsJoinable, const FString &Extra, const FOnPresenceSetComplete &Delegate=FOnPresenceSetComplete())
 Sets presence data for a user in the current app. More...
 
bool PresenceSetDestination (const FString &ApiName, const FOnPresenceSetDestinationComplete &Delegate=FOnPresenceSetDestinationComplete())
 Replaces a user's current destination with the provided one. More...
 
bool PresenceSetSetIsJoinable (bool bIsJoinable, const FOnPresenceSetIsJoinableComplete &Delegate=FOnPresenceSetIsJoinableComplete())
 Sets whether a user is joinable. More...
 
bool PresenceSetLobbySession (const FString &LobbySession, const FOnPresenceSetLobbySessionComplete &Delegate=FOnPresenceSetLobbySessionComplete())
 Replaces a user's current lobby session ID with the provided one. More...
 
bool PresenceSetMatchSession (const FString &MatchSession, const FOnPresenceSetMatchSessionComplete &Delegate=FOnPresenceSetMatchSessionComplete())
 Replaces a user's current match session ID with the provided one. More...
 
bool PresenceSetExtra (const FString &Extra, const FOnPresenceSetPresenceExtraComplete &Delegate=FOnPresenceSetPresenceExtraComplete())
 Sets extra presence data for a user. More...
 
bool PresenceReadSendInvites (const FOnReadSentInvitesComplete &Delegate=FOnReadSentInvitesComplete())
 Reads a list of sent invitations. More...
 
bool PresenceSendInvites (TArray< FString > UserIdArray, const FOnSentInvitesComplete &Delegate=FOnSentInvitesComplete())
 Sends invitations to users. More...
 
bool GetSendInvitesList (TArray< FPicoApplicationInvite > &OutList)
 Gets a list of sent invitations when PresenceSendInvites or PresenceReadSendInvites is complete. More...
 
bool PresenceGetDestinations (const FOnGetDestinationsComplete &Delegate=FOnGetDestinationsComplete())
 Gets all the destinations that can be set for a user. More...
 
bool PresenceGetDestnationsList (TArray< FPicoDestination > &OutList)
 Gets a list of destinations when PresenceGetDestinations is complete. More...
 

Public Attributes

FJoinIntentReceived JoinIntentReceivedCallback
 Gets notified when the join intent has been received.
 
FLeaveIntentReceived LeaveIntentReceivedCallback
 Gets notified when the leave intent has been received.
 

Detailed Description

Pico Presence interface class.

Member Function Documentation

◆ GetInvitableFriendList()

bool GetInvitableFriendList ( TArray< TSharedRef< FOnlinePicoFriend > > &  OutFriends)

Gets a list of invitable friends for a user. These friends are previously retrieved from the online service when PresenceGetDestinations is complete.

Parameters
OutFriendsThe [out] array that receives the copied data.
Returns
Bool:
  • true: success
  • false: failure

◆ GetSendInvitesList()

bool GetSendInvitesList ( TArray< FPicoApplicationInvite > &  OutList)

Gets a list of sent invitations when PresenceSendInvites or PresenceReadSendInvites is complete.

Parameters
OutListThe [out] array that receives the copied data.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceClear()

bool PresenceClear ( const FOnPresenceClearComplete &  Delegate = FOnPresenceClearComplete())

Clears a user's presence data in the current app.

Parameters
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceGetDestinations()

bool PresenceGetDestinations ( const FOnGetDestinationsComplete &  Delegate = FOnGetDestinationsComplete())

Gets all the destinations that can be set for a user.

Note
Call PresenceGetDescriptionList after the Delegate has been executed.
Parameters
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceGetDestnationsList()

bool PresenceGetDestnationsList ( TArray< FPicoDestination > &  OutList)

Gets a list of destinations when PresenceGetDestinations is complete.

Parameters
OutListThe [out] array that receives the copied data.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceReadSendInvites()

bool PresenceReadSendInvites ( const FOnReadSentInvitesComplete &  Delegate = FOnReadSentInvitesComplete())

Reads a list of sent invitations.

Note
Call GetSendInvitesList after the Delegate has been executed.
Parameters
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceSendInvites()

bool PresenceSendInvites ( TArray< FString >  UserIdArray,
const FOnSentInvitesComplete &  Delegate = FOnSentInvitesComplete() 
)

Sends invitations to users.

Note
Call GetSendInvitesList after the Delegate has been executed.
Parameters
UserIdArrayThe ID array of the users to invite.
DelegateWill be executed when the request has been complete.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceSet()

bool PresenceSet ( const FString &  ApiName,
const FString &  LobbySessionId,
const FString &  MatchSessionId,
bool  bIsJoinable,
const FString &  Extra,
const FOnPresenceSetComplete &  Delegate = FOnPresenceSetComplete() 
)

Sets presence data for a user in the current app.

Parameters
ApiNameThe API name of the destination.
LobbySessionIdThe lobby session ID of the presence, which identifies a user group or team. Users with the same lobby session ID can play together or form a team in a game.
MatchSessionIdThe match session ID of the presence, which identifies all users within the same destination, such as maps and levels. Users with different lobby session IDs will have the same match session ID when playing the same match.
bIsJoinableDefines whether the presence is joinable:
  • true: joinable
  • false: not joinable
ExtraExtra presence data defined by the developer.
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceSetDestination()

bool PresenceSetDestination ( const FString &  ApiName,
const FOnPresenceSetDestinationComplete &  Delegate = FOnPresenceSetDestinationComplete() 
)

Replaces a user's current destination with the provided one.

Note
Other presence-related parameters will remain the same.
Parameters
ApiNameThe API name of the new destination.
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceSetExtra()

bool PresenceSetExtra ( const FString &  Extra,
const FOnPresenceSetPresenceExtraComplete &  Delegate = FOnPresenceSetPresenceExtraComplete() 
)

Sets extra presence data for a user.

Parameters
ExtraExtra presence data defined by the developer.
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceSetLobbySession()

bool PresenceSetLobbySession ( const FString &  LobbySession,
const FOnPresenceSetLobbySessionComplete &  Delegate = FOnPresenceSetLobbySessionComplete() 
)

Replaces a user's current lobby session ID with the provided one.

Note
Other presence parameter settings will remain the same.
Parameters
LobbySessionThe new lobby session ID.
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceSetMatchSession()

bool PresenceSetMatchSession ( const FString &  MatchSession,
const FOnPresenceSetMatchSessionComplete &  Delegate = FOnPresenceSetMatchSessionComplete() 
)

Replaces a user's current match session ID with the provided one.

Note
Other presence parameter settings will remain the same.
Parameters
MatchSessionThe new match session ID.
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ PresenceSetSetIsJoinable()

bool PresenceSetSetIsJoinable ( bool  bIsJoinable,
const FOnPresenceSetIsJoinableComplete &  Delegate = FOnPresenceSetIsJoinableComplete() 
)

Sets whether a user is joinable.

Note
Other presence-related parameters will remain the same. If the destination or session ID has not been set up for the user, the user cannot be set as "joinable".
Parameters
bIsJoinableDefines whether the user is joinable:
  • true: joinable
  • false: not joinable
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure

◆ ReadInvitableUser()

bool ReadInvitableUser ( TArray< FString >  SuggestedUserList,
const FOnReadInvitableUserComplete &  Delegate = FOnReadInvitableUserComplete() 
)

Reads a list of invitable users for a user.

Note
Call GetInvitableFriendList after the Delegate has been executed.
Parameters
SuggestedUserListThe ID list of users suggested being invited.
DelegateWill be executed when the request has been completed.
Returns
Bool:
  • true: success
  • false: failure