USocialToolkit

Represents the full suite of social functionality available to a given LocalPlayer

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Party

Header

/Engine/Plugins/Online/OnlineFramework/Source/Party/Public/SocialToolkit.h

Include

#include "SocialToolkit.h"

Syntax

UCLASS(Within=SocialManager)
class USocialToolkit :
    public UObject,
    public FExec

Remarks

Represents the full suite of social functionality available to a given LocalPlayer

Variables

Name Description

Protected variable

bool

 

bQueryBlockedPlayersOnStartup

Protected variable

bool

 

bQueryFriendsOnStartup

Something nicer is definitely possible and worth revisiting.

Protected variable

bool

 

bQueryRecentPlayersOnStartup

Protected variable

TSubclassOf< US...

 

ChatManagerClass

Class to use when creating the ChatManager

Protected variable

FString

 

FriendListToQuery

The name of the friends list to query

Protected variable

FString

 

RecentPlayerNamespaceToQuery

The name of the recent player namespace to query

Protected variable

TSubclassOf< US...

 

SocialUserClass

The type of SocialUser to create to represent known users

Constructors

Name Description

Public function

USocialToolkit()

Functions

Name Description

Protected function Const

bool

 

AcceptFriendInvite

(
    const USocialUser& SocialUser,
    ESocialSubsystem SubsystemType
)

Public function

void

 

AddLocalUserOnlineProperties

(
    FPresenceProperties OnlinePropertie...
)

Public function Const

TSharedRef< ...

 

CreateUserList

(
    const FSocialUserListConfig& ListC...
)

Public function Const

bool

 

Debug_IsRandomlyChangingPresence()

Public function Const

USocialUser ...

 

FindUser

(
    const FUniqueNetIdRepl& UserId
)

Finds a SocialUser given a unique net ID from any OSS

Public function Const

const TArray...

 

GetAllUsers()

Public function Const

bool

 

GetAuthAttribute

(
    ESocialSubsystem SubsystemType,
    const FString& AttributeKey,
    FString& OutValue
)

Public function Const

USocialChatM...

 

GetChatManager()

Protected function

TSubclassOf<...

 

GetChatManagerClass()

Public function Const

USocialUser ...

 

GetLocalUser()

Public function Const

FUniqueNetId...

 

GetLocalUserNetId

(
    ESocialSubsystem SubsystemType
)

Public function Const

int32

 

GetLocalUserNum()

Public function Const

ULocalPlayer...

 

GetOwningLocalPlayer()

Public function Const

const FOnlin...

 

GetPresenceInfo

(
    ESocialSubsystem SubsystemType
)

Public function Const

const FStrin...

 

GetRecentPlayerNamespaceToQuery()

Public function Const

USocialManag...

 

GetSocialManager()

Public function Const

IOnlineSubsy...

 

GetSocialOss

(
    ESocialSubsystem SubsystemType
)

Public function Static

ToolkitT ...

 

GetToolkitForPlayer

(
    const ULocalPlayer* LocalPlaye...
)

Protected function

void

 

HandleUserInvalidated

(
    USocialUser& InvalidUser
)

Public function Virtual

void

 

InitializeToolkit

(
    ULocalPlayer& InOwningLocalPlayer
)

Public function Virtual Const

bool

 

IsFriendshipRestricted

(
    const USocialUser& SocialUser,
    ESocialSubsystem SubsystemType
)

Public function Virtual Const

bool

 

IsOwnerLoggedIn()

Public function Virtual

void

 

NotifyPartyInviteReceived

(
    USocialUser& SocialUser,
    const IOnlinePartyJoinInfo& Invite
)

Public function Virtual

void

 

NotifyPartyInviteRemoved

(
    USocialUser& SocialUser,
    const IOnlinePartyJoinInfo& Invite
)

Protected function

void

 

NotifySubsystemIdEstablished

(
    USocialUser& SocialUser,
    ESocialSubsystem SubsystemType,
    const FUniqueNetIdRepl& SubsystemI...
)

Protected function Virtual

void

 

OnAcceptFriendInviteComplete

(
    const FUniqueNetId& InviterUserId,
    bool bInviteSucceeded,
    const FString& InviteError
)

Protected function Virtual

void

 

OnBlockPlayerComplete

(
    int32 LocalUserNum,
    bool bWasSuccessful,
    const FUniqueNetId& BlockedPlayerI...,
    const FString& ListName,
    const FString& ErrorStr,
    ESocialSubsystem SubsystemType
)

Protected function Virtual

void

 

OnDeleteFriendComplete

(
    int32 LocalPlayer,
    bool bWasSuccessful,
    const FUniqueNetId& FormerFriendId,
    const FString& ListName,
    const FString& ErrorStr,
    ESocialSubsystem SubsystemType
)

Public function Const

FFriendInvit...

 

OnFriendInviteReceived()

Public function Const

FFriendInvit...

 

OnFriendInviteSent()

Protected function Virtual

void

 

OnFriendPresenceDidChange

(
    const USocialUser& FriendSocialUse...,
    const TSharedRef< FOnlineUserPresen...,
    ESocialSubsystem SubsystemType
)

Called when a Friend's presence did change

Public function Const

FOnRelations...

 

OnFriendshipEstablished()

Public function

FOnKnownUser...

 

OnKnownUserInitialized()

Protected function Virtual

void

 

OnOwnerLoggedIn()

Protected function Virtual

void

 

OnOwnerLoggedOut()

Public function Const

FPartyInvite...

 

OnPartyInviteReceived()

Public function Const

FPartyInvite...

 

OnPartyInviteRemoved()

Public function Const

FOnPartyRequ...

 

OnPartyRequestToJoinReceived()

Public function Const

FOnPartyRequ...

 

OnPartyRequestToJoinRemoved()

Public function Const

FOnPartyRequ...

 

OnPartyRequestToJoinSent()

Protected function Virtual

void

 

OnQueryBlockedPlayersComplete

(
    const FUniqueNetId& UserId,
    bool bWasSuccessful,
    const FString& ErrorStr,
    ESocialSubsystem SubsystemType
)

Protected function Virtual

void

 

OnQueryBlockedPlayersSuccess

(
    ESocialSubsystem SubsystemType,
    const TArray< TSharedRef< FOnlineBl...
)

Protected function Virtual

void

 

OnQueryFriendsListSuccess

(
    ESocialSubsystem SubsystemType,
    const TArray< TSharedRef< FOnlineFr...
)

Protected function Virtual

void

 

OnQueryRecentPlayersComplete

(
    const FUniqueNetId& UserId,
    const FString& Namespace,
    bool bWasSuccessful,
    const FString& ErrorStr,
    ESocialSubsystem SubsystemType
)

Protected function Virtual

void

 

OnQueryRecentPlayersSuccess

(
    ESocialSubsystem SubsystemType,
    const TArray< TSharedRef< FOnlineRe...
)

Protected function Virtual

void

 

OnReadFriendsListComplete

(
    int32 LocalUserNum,
    bool bWasSuccessful,
    const FString& ListName,
    const FString& ErrorStr,
    ESocialSubsystem SubsystemType
)

Public function Const

FOnRelations...

 

OnRecentPlayerAdded()

Protected function Virtual

void

 

OnRequestToJoinPartyComplete

(
    const FUniqueNetId& PartyLeaderId,
    ERequestToJoinPartyCompletionResult...
)

Protected function Virtual

void

 

OnSendFriendInviteComplete

(
    const FUniqueNetId& InvitedUserId,
    const FString& InviteeName,
    bool bInviteSuceeded,
    const FString& InviteError
)

Public function

FOnSocialUse...

 

OnSocialUserInvalidated()

Public function Const

FBasicToolki...

 

OnToolkitReset()

Protected function Virtual

void

 

OnUnblockPlayerComplete

(
    int32 LocalUserNum,
    bool bWasSuccessful,
    const FUniqueNetId& UnblockedPlaye...,
    const FString& ListName,
    const FString& ErrorStr,
    ESocialSubsystem SubsystemType
)

Public function Const

FOnRelations...

 

OnUserBlocked()

Protected function

void

 

QueryBlockedPlayers()

Protected function

void

 

QueryFriendsLists()

Protected function

void

 

QueryRecentPlayers()

Public function

void

 

QueueUserDependentAction

(
    const FUniqueNetIdRepl& SubsystemI...,
    FUserDependentAction UserActionDele...
)

Queues an action to be executed when a USocialUser corresponding to the given UniqueId has been established.

Public function

void

 

QueueUserDependentAction

(
    const FUniqueNetIdRepl& UserId,
    TFunction< void&)>&& ...,
    bool bExecutePostInit
)

Queues an action to be executed when a USocialUser corresponding to the given UniqueId has been established.

Protected function

void

 

RequestToJoinParty

(
    USocialUser& SocialUser
)

Public function

void

 

SetLocalUserOnlineState

(
    EOnlinePresenceState::Type OnlineSt...
)

Public function Const

void

 

TrySendFriendInvite

(
    const FString& DisplayNameOrEmail
)

Attempts to send a friend invite to another user based on display name or email.

Protected function Const

bool

 

TrySendFriendInvite

(
    USocialUser& SocialUser,
    ESocialSubsystem SubsystemType
)

Overridden from FExec

Name Description

Public function Virtual

bool

 

Exec

(
    UWorld* InWorld,
    const TCHAR* Cmd,
    FOutputDevice& Out
)

FExec.

Classes

Constants

Name

Description

AllToolkitsByOwningPlayer