#include <OnlineFriendsInterfaceAccelByte.h>
Public Member Functions | |
| DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM (MAX_LOCAL_PLAYERS, OnSyncThirdPartyPlatformFriendsComplete, const FOnlineError &) | |
| DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnSyncThirdPartyPlatformFriendsV2Complete, const FOnlineError &, const TArray< FAccelByteModelsSyncThirdPartyFriendsResponse > &) | |
| DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnSyncThirdPartyBlockListComplete, const FOnlineError &, const TArray< FAccelByteModelsSyncThirdPartyBlockListResponse > &) | |
| DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnQueryRecentTeamPlayersComplete, const FString &, bool, const FString &) | |
| virtual bool | ReadFriendsList (int32 LocalUserNum, const FString &ListName, const FOnReadFriendsListComplete &Delegate=FOnReadFriendsListComplete()) override |
| virtual bool | DeleteFriendsList (int32 LocalUserNum, const FString &ListName, const FOnDeleteFriendsListComplete &Delegate=FOnDeleteFriendsListComplete()) override |
| virtual bool | SendInvite (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName, const FOnSendInviteComplete &Delegate=FOnSendInviteComplete()) override |
| virtual bool | AcceptInvite (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName, const FOnAcceptInviteComplete &Delegate=FOnAcceptInviteComplete()) override |
| virtual bool | RejectInvite (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName) override |
| virtual bool | DeleteFriend (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName) override |
| virtual void | SetFriendAlias (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName, const FString &Alias, const FOnSetFriendAliasComplete &Delegate=FOnSetFriendAliasComplete()) override |
| virtual void | DeleteFriendAlias (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName, const FOnDeleteFriendAliasComplete &Delegate=FOnDeleteFriendAliasComplete()) override |
| virtual void | AddRecentPlayers (const FUniqueNetId &UserId, const TArray< FReportPlayedWithUser > &InRecentPlayers, const FString &ListName, const FOnAddRecentPlayersComplete &InCompletionDelegate) override |
| virtual bool | QueryRecentPlayers (const FUniqueNetId &UserId, const FString &Namespace) override |
| bool | QueryRecentTeamPlayers (int32 LocalUserNum, const FUniqueNetId &UserId, const FString &Namespace) |
| virtual bool | BlockPlayer (int32 LocalUserNum, const FUniqueNetId &PlayerId) override |
| virtual bool | UnblockPlayer (int32 LocalUserNum, const FUniqueNetId &PlayerId) override |
| virtual bool | QueryBlockedPlayers (const FUniqueNetId &UserId) override |
| virtual bool | GetFriendsList (int32 LocalUserNum, const FString &ListName, TArray< TSharedRef< FOnlineFriend > > &OutFriends) override |
| virtual TSharedPtr< FOnlineFriend > | GetFriend (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName) override |
| virtual bool | IsFriend (int32 LocalUserNum, const FUniqueNetId &FriendId, const FString &ListName) override |
| virtual bool | GetRecentPlayers (const FUniqueNetId &UserId, const FString &Namespace, TArray< TSharedRef< FOnlineRecentPlayer > > &OutRecentPlayers) override |
| bool | GetRecentTeamPlayers (const FUniqueNetId &UserId, const FString &Namespace, TArray< TSharedRef< FOnlineRecentPlayer > > &OutRecentPlayers) const |
| virtual bool | GetBlockedPlayers (const FUniqueNetId &UserId, TArray< TSharedRef< FOnlineBlockedPlayer > > &OutBlockedPlayers) override |
| virtual void | DumpRecentPlayers () const override |
| virtual void | DumpBlockedPlayers () const override |
| virtual bool | SendInvite (int32 LocalUserNum, const FString &InFriendCode, const FString &ListName=TEXT(""), const FOnSendInviteComplete &Delegate=FOnSendInviteComplete()) |
| virtual bool | IsPlayerBlocked (const FUniqueNetId &UserId, const FUniqueNetId &BlockedId) |
| virtual bool | SyncThirdPartyPlatformFriend (int32 LocalUserNum, const FString &NativeFriendListName, const FString &AccelByteFriendListName=TEXT("")) |
| virtual bool | SyncPlatformFriends (int32 LocalUserNum, const EAccelBytePlatformType NativePlatform) |
| virtual bool | SyncThirdPartyPlatformFriendV2 (int32 LocalUserNum, const FAccelByteModelsSyncThirdPartyFriendsRequest &Request) |
| virtual bool | SyncThirdPartyPlatformBlockList (int32 LocalUserNum, const FAccelByteModelsSyncThirdPartyBlockListRequest &Request) |
| virtual bool | ReadFriendsList (int32 LocalUserNum, const EInviteStatus::Type &InviteStatus=EInviteStatus::Unknown, int32 Offset=0, int32 Limit=20, const FOnReadFriendsListComplete &Delegate=FOnReadFriendsListComplete()) |
Static Public Member Functions | |
| static bool | GetFromSubsystem (const IOnlineSubsystem *Subsystem, TSharedPtr< FOnlineFriendsAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance) |
| static bool | GetFromWorld (const UWorld *World, TSharedPtr< FOnlineFriendsAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance) |
Protected Member Functions | |
| FOnlineFriendsAccelByte () | |
| void | OnFriendRequestAcceptedNotificationReceived (const FAccelByteModelsAcceptFriendsNotif &Notification, int32 LocalUserNum) |
| void | OnFriendRequestReceivedNotificationReceived (const FAccelByteModelsRequestFriendsNotif &Notification, int32 LocalUserNum) |
| void | OnUnfriendNotificationReceived (const FAccelByteModelsUnfriendNotif &Notification, int32 LocalUserNum) |
| void | OnRejectFriendRequestNotificationReceived (const FAccelByteModelsRejectFriendsNotif &Notification, int32 LocalUserNum) |
| void | OnCancelFriendRequestNotificationReceived (const FAccelByteModelsCancelFriendsNotif &Notification, int32 LocalUserNum) |
| void | OnPresenceReceived (const FUniqueNetId &UserId, const TSharedRef< FOnlineUserPresence > &Presence, int32 LocalUserNum) |
Protected Attributes | |
| FOnlineSubsystemAccelByteWPtr | AccelByteSubsystem = nullptr |
| TMap< int32, TArray< TSharedPtr< FOnlineFriend > > > | LocalUserNumToFriendsMap |
| FUserIdToBlockedPlayersMap | UserIdToBlockedPlayersMap |
| FCriticalSection | UserIdToBlockedPlayersMapLock |
Implementation of the IOnlineFriends interface using AccelByte services.
|
inlineprotected |
Hidden default constructor, the constructor that takes in a subsystem instance should be used instead.
|
static |
Convenience method to get an instance of this interface from the subsystem passed in.
| Subsystem | Subsystem instance that we wish to get this interface from |
| OutInterfaceInstance | Instance of the interface that we got from the subsystem, or nullptr if not found |
|
static |
Convenience method to get an instance of this interface from the subsystem associated with the world passed in.
| World | World instance that we wish to get the interface from |
| OutInterfaceInstance | Instance of the interface that we got from the subsystem, or nullptr if not found |
|
virtual |
Check on the cached list whether player is blocked
| UserId | Id of user that made the request |
| BlockedId | Id of user to check |
|
protected |
Delegate handler for when another user cancels their friend request to us
|
protected |
Delegate handler for when another user accepts our friend request
|
protected |
Delegate handler for when we receive a friend request from another user
|
protected |
Delegate handler for when another user rejects our friend request
|
protected |
Delegate handler for when another user removes us as a friend
|
virtual |
Partially read friends list.
| LocalUserNum | the user that sending read friends list request |
| InviteStatus | the status of friends to request. For now only support Accepted, PendingInbound, and PendingOutbound. Unknown will query all of them. Default is Unknown. |
| Offset | offset to start the query. Default is 0. |
| Limit | limit of the query. Use -1 to query all data. Default is 20. |
|
virtual |
Starts an async task that sends an invite to another player.
| LocalUserNum | the user that is sending the invite |
| InFriendCode | Friend's PublicCode |
| ListName | name of the friends list to invite to. Not yet implemented on AccelByte you can leave it blank |
| Delegate | fired when the request is complete |
|
virtual |
Sync third party platform block list to AccelByte's block list. Makes a S2S request to the platform given to sync block list.
| LocalUserNum | the user that sending block list sync request |
| Request | request parameters for block list sync |
|
virtual |
Sync third party platform friend to AccelByte service, this will automatically add the third party friends to AccelByte service if they already linked their account to AccelByte service. The native friend list is retrieved using native OSS.
| LocalUserNum | the user that sending friend sync request |
| NativeFriendListName | friend list name in native platform |
| AccelByteFriendListName | friend list name in AccelByte service (optional) |
|
virtual |
Sync third party platform friend to AccelByte service, this will make an S2S call to platform of choice to sync friends.
| LocalUserNum | the user that sending friend sync request |
| Request | request parameters for friend sync |
|
protected |
Instance of the subsystem that created this interface
|
protected |
Map of user IDs representing local users to an array of FOnlineFriend instances
|
protected |
Map of user IDs representing local users to an array of FOnlineBlockedPlayer instances