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 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 (see EOS_Platform_Create_Flag.EOS_PF_DISABLE_SOCIAL_OVERLAY).
      Parameters:
      options - structure containing the account for which to retrieve the friends list
      clientData - arbitrary data that is passed back to you in the CompletionDelegate
      completionDelegate - 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 to
      clientData - arbitrary data that is passed back to you in the CompletionDelegate
      completionDelegate - 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 account
      clientData - arbitrary data that is passed back to you in the CompletionDelegate
      completionDelegate - 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 account
      clientData - arbitrary data that is passed back to you in the CompletionDelegate
      completionDelegate - a callback that is fired when the async operation completes, either successfully or in error
    • getFriendsCount

      public int getFriendsCount(EOS_Friends_GetFriendsCountOptions options)
      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

      public EOS_EpicAccountId getFriendAtIndex(EOS_Friends_GetFriendAtIndexOptions options)
      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_Friends is returned for two users that have confirmed friendship
      EOS_EFriendsStatus.EOS_FS_InviteSent is returned when the local user has sent a friend invitation but the other user has not accepted or rejected it
      EOS_EFriendsStatus.EOS_FS_InviteReceived is returned when the other user has sent a friend invitation to the local user
      EOS_EFriendsStatus.EOS_FS_NotFriends is 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_NOTIFICATIONID otherwise
    • removeNotifyFriendsUpdate

      public void removeNotifyFriendsUpdate(EOS_NotificationId notificationId)
      Stop listening for friends changes on a previously bound handler.
      Parameters:
      notificationId - The previously bound notification ID.
    • getBlockedUsersCount

      public int getBlockedUsersCount(EOS_Friends_GetBlockedUsersCountOptions options)
      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

      public EOS_EpicAccountId getBlockedUserAtIndex(EOS_Friends_GetBlockedUserAtIndexOptions options)
      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

      public void removeNotifyBlockedUsersUpdate(EOS_NotificationId notificationId)
      Stop listening for blocklist changes on a previously bound handler.
      Parameters:
      notificationId - The previously bound notification ID.