7#include "CoreMinimal.h"
8#include "OnlineSubsystemPico.h"
9#include "OnlineSubsystemPicoPackage.h"
10#include "OnlineSubsystemPicoNames.h"
11#include "OnlineFriendsInterfacePico.h"
25DECLARE_LOG_CATEGORY_EXTERN(PresenceInterface, Log, All);
28DECLARE_DELEGATE_TwoParams(FOnPresenceClearComplete,
bool ,
const FString& );
29DECLARE_DELEGATE_TwoParams(FOnReadInvitableUserComplete,
bool ,
const FString& );
30DECLARE_DELEGATE_TwoParams(FOnPresenceSetComplete,
bool ,
const FString& );
31DECLARE_DELEGATE_TwoParams(FOnPresenceSetDestinationComplete,
bool ,
const FString& );
32DECLARE_DELEGATE_TwoParams(FOnPresenceSetIsJoinableComplete,
bool ,
const FString& );
33DECLARE_DELEGATE_TwoParams(FOnPresenceSetLobbySessionComplete,
bool ,
const FString& );
34DECLARE_DELEGATE_TwoParams(FOnPresenceSetMatchSessionComplete,
bool ,
const FString& );
35DECLARE_DELEGATE_TwoParams(FOnPresenceSetPresenceExtraComplete,
bool ,
const FString& );
36DECLARE_DELEGATE_TwoParams(FOnReadSentInvitesComplete,
bool ,
const FString& );
37DECLARE_DELEGATE_TwoParams(FOnSentInvitesComplete,
bool ,
const FString& );
38DECLARE_DELEGATE_TwoParams(FOnGetDestinationsComplete,
bool ,
const FString& );
40DECLARE_MULTICAST_DELEGATE_FourParams(FJoinIntentReceived,
const FString& ,
const FString& ,
const FString&,
const FString& );
41DECLARE_MULTICAST_DELEGATE_ThreeParams(FLeaveIntentReceived,
const FString& ,
const FString&,
const FString& );
49 FOnlineSubsystemPico& PicoSubsystem;
51 TMap<FString, TSharedRef<FOnlinePicoFriend>> InvitableUsers;
53 TArray<FPicoApplicationInvite> InvitesArray;
55 TArray<FPicoDestination> DestinationArray;
69 bool PresenceClear(
const FOnPresenceClearComplete& Delegate = FOnPresenceClearComplete());
70 void OnQueryPresenceClearComplete(ppfMessageHandle Message,
bool bIsError,
const FOnPresenceClearComplete& Delegate);
83 bool ReadInvitableUser(TArray<FString> SuggestedUserList,
const FOnReadInvitableUserComplete& Delegate = FOnReadInvitableUserComplete());
84 void OnQueryReadInvitableUserComplete(ppfMessageHandle Message,
bool bIsError, TMap<FString, TSharedRef<FOnlinePicoFriend>>& OutList,
bool bAppendToExistingMap,
const FOnReadInvitableUserComplete& Delegate);
114 bool PresenceSet(
const FString& ApiName,
const FString& LobbySessionId,
const FString& MatchSessionId,
bool bIsJoinable,
const FString& Extra,
const FOnPresenceSetComplete& Delegate = FOnPresenceSetComplete());
115 void OnQueryPresenceSetComplete(ppfMessageHandle Message,
bool bIsError,
const FOnPresenceSetComplete& Delegate);
128 bool PresenceSetDestination(
const FString& ApiName,
const FOnPresenceSetDestinationComplete& Delegate = FOnPresenceSetDestinationComplete());
129 void OnQueryPresenceSetDestinationComplete(ppfMessageHandle Message,
bool bIsError,
const FOnPresenceSetDestinationComplete& Delegate);
146 bool PresenceSetSetIsJoinable(
bool bIsJoinable,
const FOnPresenceSetIsJoinableComplete& Delegate = FOnPresenceSetIsJoinableComplete());
147 void OnQueryPresenceSetSetIsJoinableComplete(ppfMessageHandle Message,
bool bIsError,
const FOnPresenceSetIsJoinableComplete& Delegate);
160 bool PresenceSetLobbySession(
const FString& LobbySession,
const FOnPresenceSetLobbySessionComplete& Delegate = FOnPresenceSetLobbySessionComplete());
161 void OnQueryPresenceSetLobbySessionComplete(ppfMessageHandle Message,
bool bIsError,
const FOnPresenceSetLobbySessionComplete& Delegate);
174 bool PresenceSetMatchSession(
const FString& MatchSession,
const FOnPresenceSetMatchSessionComplete& Delegate = FOnPresenceSetMatchSessionComplete());
175 void OnQueryPresenceSetMatchSessionComplete(ppfMessageHandle Message,
bool bIsError,
const FOnPresenceSetMatchSessionComplete& Delegate);
188 bool PresenceSetExtra(
const FString& Extra,
const FOnPresenceSetPresenceExtraComplete& Delegate = FOnPresenceSetPresenceExtraComplete());
189 void OnQueryPresenceSetExtraComplete(ppfMessageHandle Message,
bool bIsError,
const FOnPresenceSetPresenceExtraComplete& Delegate);
202 void OnQueryPresenceReadSendInvitesComplete(ppfMessageHandle Message,
bool bIsError, TArray<FPicoApplicationInvite>& OutList,
bool bAppendToExistingArray,
const FOnReadSentInvitesComplete& Delegate);
215 bool PresenceSendInvites(TArray<FString> UserIdArray,
const FOnSentInvitesComplete& Delegate = FOnSentInvitesComplete());
216 void OnQuerySendInvitesComplete(ppfMessageHandle Message,
bool bIsError, TArray<FPicoApplicationInvite>& OutList,
bool bAppendToExistingArray,
const FOnSentInvitesComplete& Delegate);
239 void OnQueryGetDestinationsComplete(ppfMessageHandle Message,
bool bIsError, TArray<FPicoDestination>& OutList,
bool bAppendToExistingArray,
const FOnGetDestinationsComplete& Delegate);
253 FDelegateHandle OnJoinIntentReceivedHandle;
254 void OnJoinIntentReceiveResult(ppfMessageHandle Message,
bool bIsError);
256 FDelegateHandle OnLeaveIntentReceivedHandle;
257 void OnLeaveIntentReceiveResult(ppfMessageHandle Message,
bool bIsError);
Pico Presence interface class.
Definition: PicoPresenceInterface.h:45
bool PresenceReadSendInvites(const FOnReadSentInvitesComplete &Delegate=FOnReadSentInvitesComplete())
Reads a list of sent invitations.
bool GetInvitableFriendList(TArray< TSharedRef< FOnlinePicoFriend > > &OutFriends)
Gets a list of invitable friends for a user. These friends are previously retrieved from the online s...
FJoinIntentReceived JoinIntentReceivedCallback
Gets notified when the join intent has been received.
Definition: PicoPresenceInterface.h:261
bool PresenceGetDestnationsList(TArray< FPicoDestination > &OutList)
Gets a list of destinations when PresenceGetDestinations is complete.
bool PresenceClear(const FOnPresenceClearComplete &Delegate=FOnPresenceClearComplete())
Clears a user's presence data in the current app.
bool ReadInvitableUser(TArray< FString > SuggestedUserList, const FOnReadInvitableUserComplete &Delegate=FOnReadInvitableUserComplete())
Reads a list of invitable users for a user.
bool PresenceSetSetIsJoinable(bool bIsJoinable, const FOnPresenceSetIsJoinableComplete &Delegate=FOnPresenceSetIsJoinableComplete())
Sets whether a user is joinable.
bool GetSendInvitesList(TArray< FPicoApplicationInvite > &OutList)
Gets a list of sent invitations when PresenceSendInvites or PresenceReadSendInvites is complete.
bool PresenceSetDestination(const FString &ApiName, const FOnPresenceSetDestinationComplete &Delegate=FOnPresenceSetDestinationComplete())
Replaces a user's current destination with the provided one.
bool PresenceSetExtra(const FString &Extra, const FOnPresenceSetPresenceExtraComplete &Delegate=FOnPresenceSetPresenceExtraComplete())
Sets extra presence data for a user.
bool PresenceSetLobbySession(const FString &LobbySession, const FOnPresenceSetLobbySessionComplete &Delegate=FOnPresenceSetLobbySessionComplete())
Replaces a user's current lobby session ID with the provided one.
bool PresenceSetMatchSession(const FString &MatchSession, const FOnPresenceSetMatchSessionComplete &Delegate=FOnPresenceSetMatchSessionComplete())
Replaces a user's current match session ID with the provided one.
bool PresenceSendInvites(TArray< FString > UserIdArray, const FOnSentInvitesComplete &Delegate=FOnSentInvitesComplete())
Sends invitations to users.
bool PresenceGetDestinations(const FOnGetDestinationsComplete &Delegate=FOnGetDestinationsComplete())
Gets all the destinations that can be set for a user.
FLeaveIntentReceived LeaveIntentReceivedCallback
Gets notified when the leave intent has been received.
Definition: PicoPresenceInterface.h:264
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.