

In addition, any changes made to the list of blocked users will result in notification through an FOnBlockListChange delegate. This function is asynchronous, and will call a delegate of type FOnQueryBlockedPlayersComplete when it completes. To retrieve the list of blocked users, call the QueryBlockedPlayers function. The Friends Interface can retrieve and cache a list of blocked users, as well as utilize the online service's block and unblock features. Many online services provide the ability for a user to prevent specific other users from contacting or playing with them through the service. The individual elements of the array contain the user's data as well as a function to tell when the player was last seen online. Once a successful call to QueryRecentPlayers has retrieved the list of recently-met players, the GetRecentPlayers function will return the cached array. If successful, the Friends Interface will cache the list locally. The QueryRecentPlayers makes an asynchronous call to the online service, calling a delegate of type FOnQueryRecentPlayersComplete upon completion.

Like friends lists, the list of recently-met players is handled by querying the online service and then caching the list. Online services often keep a separate list of players that a user has encountered recently, such as in a public gaming session, but has not added to the friends list or blocked. It may be possible for a friend to exist in multiple lists on some online services if this is the case, this function will only remove the friend from the specified list. When the operation is complete, a delegate of type FOnDeleteFriendComplete will be called. To remove a friend from a list belonging to a local user, call the DeleteFriend function. When complete, a delegate of type FOnDeleteFriendsListComplete will be called. The online service can be instructed to delete a friends list through the asynchronous DeleteFriendsList function. The invited user can then call AcceptInvite or RejectInvite to respond, specifying the name of the list where the new friend should appear.ĪcceptInvite uses a delegate of type FOnAcceptInviteComplete to communicate the results of the operation, while RejectInvite uses an FOnRejectInviteComplete delegate. When an invitation from another user has arrived, a delegate of type FOnInviteReceivedDelegate will be called, containing the FUniqueNetId of the sender and the recipient. This includes cases where an external UI is opened and the user cancels it.

Valid list names can be found in the EFriendsList enumerated type, and can be converted into strings by the provided ToString`function.īecause it queries a remote machine, the ReadFriendsList is asynchronous and will call a delegate of type FOnReadFriendsListComplete` when complete.Īll SendInvite calls will eventually trigger the FOnSendInviteComplete delegate. The first step in dealing with a user's friends lists is generally to call ReadFriendsList, which retrieves the most up-to-date version of a named friends list belonging to a specified local user. The Friends Interface contains features to manage a user's list of social contacts, including adding, removing, and blocking other users.įriends lists are stored on the online service's servers, and can change during a session as friends are added or removed, join and leave games and sessions, or log in and out of the service.Īs a result, managing these lists involves querying the server for the latest information, then caching that information and using it in your game.

Playing games with your friends and meeting new players online is an important part of many online services. Retrieving the List of Recently-Met Players
