// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Friends { public sealed partial class FriendsInterface : Handle { public FriendsInterface() { } public FriendsInterface(System.IntPtr innerHandle) : base(innerHandle) { } /// /// The most recent version of the API. /// public const int AcceptinviteApiLatest = 1; /// /// The most recent version of the API. /// public const int AddnotifyfriendsupdateApiLatest = 1; /// /// The most recent version of the API. /// public const int GetfriendatindexApiLatest = 1; /// /// The most recent version of the API. /// public const int GetfriendscountApiLatest = 1; /// /// The most recent version of the API. /// public const int GetstatusApiLatest = 1; /// /// The most recent version of the API. /// public const int QueryfriendsApiLatest = 1; /// /// The most recent version of the API. /// public const int RejectinviteApiLatest = 1; /// /// The most recent version of the API. /// public const int SendinviteApiLatest = 1; /// /// Starts an asynchronous task that accepts a friend invitation from another user. The completion delegate is executed after the backend response has been received. /// /// structure containing the logged in account and the inviting account /// arbitrary data that is passed back to you in the CompletionDelegate /// a callback that is fired when the async operation completes, either successfully or in error public void AcceptInvite(ref AcceptInviteOptions options, object clientData, OnAcceptInviteCallback completionDelegate) { AcceptInviteOptionsInternal optionsInternal = new AcceptInviteOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnAcceptInviteCallbackInternal(OnAcceptInviteCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Friends_AcceptInvite(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// Listen for changes to friends for a particular account. /// /// Information about who would like notifications. /// This value is returned to the caller when FriendsUpdateHandler is invoked. /// The callback to be invoked when a change to any friend status changes. /// /// A valid notification ID if successfully bound, or otherwise /// public ulong AddNotifyFriendsUpdate(ref AddNotifyFriendsUpdateOptions options, object clientData, OnFriendsUpdateCallback friendsUpdateHandler) { AddNotifyFriendsUpdateOptionsInternal optionsInternal = new AddNotifyFriendsUpdateOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var friendsUpdateHandlerInternal = new OnFriendsUpdateCallbackInternal(OnFriendsUpdateCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, friendsUpdateHandler, friendsUpdateHandlerInternal); var funcResult = Bindings.EOS_Friends_AddNotifyFriendsUpdate(InnerHandle, ref optionsInternal, clientDataAddress, friendsUpdateHandlerInternal); Helper.Dispose(ref optionsInternal); Helper.AssignNotificationIdToCallback(clientDataAddress, funcResult); return funcResult; } /// /// Retrieves the Epic Account ID of an entry from the friends list that has already been retrieved by the 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 function. /// /// /// /// structure containing the Epic Account ID of the owner of the friends list and the index into the list /// /// 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. /// public EpicAccountId GetFriendAtIndex(ref GetFriendAtIndexOptions options) { GetFriendAtIndexOptionsInternal optionsInternal = new GetFriendAtIndexOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_Friends_GetFriendAtIndex(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); EpicAccountId funcResultReturn; Helper.Get(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Retrieves the number of friends on the friends list that has already been retrieved by the API. /// /// /// structure containing the Epic Account ID of user who owns the friends list /// /// the number of friends on the list /// public int GetFriendsCount(ref GetFriendsCountOptions options) { GetFriendsCountOptionsInternal optionsInternal = new GetFriendsCountOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_Friends_GetFriendsCount(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Retrieve the friendship status between the local user and another user. /// /// /// structure containing the Epic Account ID of the friend list to check and the account of the user to test friendship status /// /// A value indicating whether the two accounts have a friendship, pending invites in either direction, or no relationship /// is returned for two users that have confirmed friendship /// is returned when the local user has sent a friend invitation but the other user has not accepted or rejected it /// is returned when the other user has sent a friend invitation to the local user /// is returned when there is no known relationship /// public FriendsStatus GetStatus(ref GetStatusOptions options) { GetStatusOptionsInternal optionsInternal = new GetStatusOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_Friends_GetStatus(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Starts an asynchronous task that reads the user's friends list 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_PF_DISABLE_SOCIAL_OVERLAY). /// /// structure containing the account for which to retrieve the friends list /// arbitrary data that is passed back to you in the CompletionDelegate /// a callback that is fired when the async operation completes, either successfully or in error public void QueryFriends(ref QueryFriendsOptions options, object clientData, OnQueryFriendsCallback completionDelegate) { QueryFriendsOptionsInternal optionsInternal = new QueryFriendsOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryFriendsCallbackInternal(OnQueryFriendsCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Friends_QueryFriends(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// Starts an asynchronous task that rejects a friend invitation from another user. The completion delegate is executed after the backend response has been received. /// /// structure containing the logged in account and the inviting account /// arbitrary data that is passed back to you in the CompletionDelegate /// a callback that is fired when the async operation completes, either successfully or in error public void RejectInvite(ref RejectInviteOptions options, object clientData, OnRejectInviteCallback completionDelegate) { RejectInviteOptionsInternal optionsInternal = new RejectInviteOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnRejectInviteCallbackInternal(OnRejectInviteCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Friends_RejectInvite(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// Stop listening for friends changes on a previously bound handler. /// /// The previously bound notification ID. public void RemoveNotifyFriendsUpdate(ulong notificationId) { Bindings.EOS_Friends_RemoveNotifyFriendsUpdate(InnerHandle, notificationId); Helper.RemoveCallbackByNotificationId(notificationId); } /// /// 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. /// /// structure containing the account to send the invite from and the account to send the invite to /// arbitrary data that is passed back to you in the CompletionDelegate /// a callback that is fired when the async operation completes, either successfully or in error public void SendInvite(ref SendInviteOptions options, object clientData, OnSendInviteCallback completionDelegate) { SendInviteOptionsInternal optionsInternal = new SendInviteOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnSendInviteCallbackInternal(OnSendInviteCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Friends_SendInvite(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } [MonoPInvokeCallback(typeof(OnAcceptInviteCallbackInternal))] internal static void OnAcceptInviteCallbackInternalImplementation(ref AcceptInviteCallbackInfoInternal data) { OnAcceptInviteCallback callback; AcceptInviteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnFriendsUpdateCallbackInternal))] internal static void OnFriendsUpdateCallbackInternalImplementation(ref OnFriendsUpdateInfoInternal data) { OnFriendsUpdateCallback callback; OnFriendsUpdateInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryFriendsCallbackInternal))] internal static void OnQueryFriendsCallbackInternalImplementation(ref QueryFriendsCallbackInfoInternal data) { OnQueryFriendsCallback callback; QueryFriendsCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnRejectInviteCallbackInternal))] internal static void OnRejectInviteCallbackInternalImplementation(ref RejectInviteCallbackInfoInternal data) { OnRejectInviteCallback callback; RejectInviteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnSendInviteCallbackInternal))] internal static void OnSendInviteCallbackInternalImplementation(ref SendInviteCallbackInfoInternal data) { OnSendInviteCallback callback; SendInviteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } } }