Package host.anzo.eossdk.eos.sdk
Class EOS_Friends_Interface
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_Friends_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
public class EOS_Friends_Interface
extends com.sun.jna.PointerType
The Friends Interface is used to manage a user's friends list, by interacting with the backend services, and to retrieve the cached list of friends, blocked users and pending invitations.
All Friends Interface calls take a handle of type EOS_HFriends as the first parameter.
This handle can be retrieved from a EOS_HPlatform handle by using the EOS_Platform_GetFriendsInterface function.
- Since:
- 8/20/2023
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptInvite(EOS_Friends_AcceptInviteOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnAcceptInviteCallback completionDelegate) Starts an asynchronous task that accepts a friend invitation from another user.addNotifyBlockedUsersUpdate(EOS_Friends_AddNotifyBlockedUsersUpdateOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnBlockedUsersUpdateCallback blockedUsersUpdateHandler) Listen for changes to blocklist for a particular account.addNotifyFriendsUpdate(EOS_Friends_AddNotifyFriendsUpdateOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnFriendsUpdateCallback friendsUpdateHandler) Listen for changes to friends for a particular account.Retrieves the Epic Account ID of an entry from the blocklist that has already been retrieved by the EOS_Friends_QueryFriends API.intRetrieves the number of blocked users on the blocklist that has already been retrieved by the EOS_Friends_QueryFriends API.Retrieves the Epic Account ID of an entry from the friends list that has already been retrieved by the EOS_Friends_QueryFriends API.intRetrieves the number of friends on the friends list that has already been retrieved by the EOS_Friends_QueryFriends API.getStatus(EOS_Friends_GetStatusOptions options) Retrieve the friendship status between the local user and another user.voidqueryFriends(EOS_Friends_QueryFriendsOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnQueryFriendsCallback completionDelegate) Starts an asynchronous task that reads the user's friends list and blocklist from the backend service, caching it for future use.
When the Social Overlay is enabled then this will be called automatically.voidrejectInvite(EOS_Friends_RejectInviteOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnRejectInviteCallback completionDelegate) Starts an asynchronous task that rejects a friend invitation from another user.voidremoveNotifyBlockedUsersUpdate(EOS_NotificationId notificationId) Stop listening for blocklist changes on a previously bound handler.voidremoveNotifyFriendsUpdate(EOS_NotificationId notificationId) Stop listening for friends changes on a previously bound handler.voidsendInvite(EOS_Friends_SendInviteOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnSendInviteCallback completionDelegate) Starts an asynchronous task that sends a friend invitation to another user.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_Friends_Interface
public EOS_Friends_Interface(com.sun.jna.Pointer address) -
EOS_Friends_Interface
public EOS_Friends_Interface()
-
-
Method Details
-
queryFriends
public void queryFriends(EOS_Friends_QueryFriendsOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnQueryFriendsCallback completionDelegate) Starts an asynchronous task that reads the user's friends list and blocklist from the backend service, caching it for future use.
When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (seeEOS_Platform_Create_Flag.EOS_PF_DISABLE_SOCIAL_OVERLAY).- Parameters:
options- structure containing the account for which to retrieve the friends listclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
sendInvite
public void sendInvite(EOS_Friends_SendInviteOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnSendInviteCallback completionDelegate) Starts an asynchronous task that sends a friend invitation to another user. The completion delegate is executed after the backend response has been received. It does not indicate that the target user has responded to the friend invitation.- Parameters:
options- structure containing the account to send the invite from and the account to send the invite toclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
acceptInvite
public void acceptInvite(EOS_Friends_AcceptInviteOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnAcceptInviteCallback completionDelegate) Starts an asynchronous task that accepts a friend invitation from another user. The completion delegate is executed after the backend response has been received.- Parameters:
options- structure containing the logged in account and the inviting accountclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
rejectInvite
public void rejectInvite(EOS_Friends_RejectInviteOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnRejectInviteCallback completionDelegate) Starts an asynchronous task that rejects a friend invitation from another user. The completion delegate is executed after the backend response has been received.- Parameters:
options- structure containing the logged in account and the inviting accountclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
getFriendsCount
Retrieves the number of friends on the friends list that has already been retrieved by the EOS_Friends_QueryFriends API.- Parameters:
options- structure containing the Epic Account ID of user who owns the friends list- Returns:
- the number of friends on the list
- See Also:
-
getFriendAtIndex
Retrieves the Epic Account ID of an entry from the friends list that has already been retrieved by the EOS_Friends_QueryFriends API. The Epic Account ID returned by this function may belong to an account that has been invited to be a friend or that has invited the local user to be a friend. To determine if the Epic Account ID returned by this function is a friend or a pending friend invitation, use the EOS_Friends_GetStatus function.- Parameters:
options- structure containing the Epic Account ID of the owner of the friends list and the index into the list- Returns:
- the Epic Account ID of the friend. Note that if the index provided is out of bounds, the returned Epic Account ID will be a "null" account ID.
- See Also:
-
getStatus
Retrieve the friendship status between the local user and another user.- Parameters:
options- structure containing the Epic Account ID of the friend list to check and the account of the user to test friendship status- Returns:
- A value indicating whether the two accounts have a friendship, pending invites in either direction, or no relationship
EOS_EFriendsStatus.EOS_FS_Friendsis returned for two users that have confirmed friendship
EOS_EFriendsStatus.EOS_FS_InviteSentis returned when the local user has sent a friend invitation but the other user has not accepted or rejected it
EOS_EFriendsStatus.EOS_FS_InviteReceivedis returned when the other user has sent a friend invitation to the local user
EOS_EFriendsStatus.EOS_FS_NotFriendsis returned when there is no known relationship - See Also:
-
addNotifyFriendsUpdate
public EOS_NotificationId addNotifyFriendsUpdate(EOS_Friends_AddNotifyFriendsUpdateOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnFriendsUpdateCallback friendsUpdateHandler) Listen for changes to friends for a particular account.- Parameters:
options- Information about who would like notifications.clientData- This value is returned to the caller when FriendsUpdateHandler is invoked.friendsUpdateHandler- The callback to be invoked when a change to any friend status changes.- Returns:
- A valid notification ID if successfully bound, or
EOS_NotificationId.EOS_INVALID_NOTIFICATIONIDotherwise
-
removeNotifyFriendsUpdate
Stop listening for friends changes on a previously bound handler.- Parameters:
notificationId- The previously bound notification ID.
-
getBlockedUsersCount
Retrieves the number of blocked users on the blocklist that has already been retrieved by the EOS_Friends_QueryFriends API.- Parameters:
options- structure containing the Epic Account ID of user who owns the blocklist.- Returns:
- the number of users on the blocklist.
- See Also:
-
getBlockedUserAtIndex
Retrieves the Epic Account ID of an entry from the blocklist that has already been retrieved by the EOS_Friends_QueryFriends API.- Parameters:
options- structure containing the Epic Account ID of the owner of the blocklist and the index into the list.- Returns:
- the Epic Account ID of the blocked user. Note that if the index provided is out of bounds, the returned Epic Account ID will be a "null" account ID.
- See Also:
-
addNotifyBlockedUsersUpdate
public EOS_NotificationId addNotifyBlockedUsersUpdate(EOS_Friends_AddNotifyBlockedUsersUpdateOptions options, com.sun.jna.Pointer clientData, EOS_Friends_OnBlockedUsersUpdateCallback blockedUsersUpdateHandler) Listen for changes to blocklist for a particular account.- Parameters:
options- Information about the API version which is being used.clientData- This value is returned to the caller when BlockedUsersUpdateHandler is invoked.blockedUsersUpdateHandler- The callback to be invoked when a blocklist changes.- Returns:
- A valid notification ID if successfully bound, or EOS_INVALID_NOTIFICATIONID otherwise.
-
removeNotifyBlockedUsersUpdate
Stop listening for blocklist changes on a previously bound handler.- Parameters:
notificationId- The previously bound notification ID.
-