You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
306 lines
14 KiB
306 lines
14 KiB
// 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)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AcceptInvite" /> API.
|
|
/// </summary>
|
|
public const int AcceptinviteApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyFriendsUpdate" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyfriendsupdateApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetFriendAtIndex" /> API.
|
|
/// </summary>
|
|
public const int GetfriendatindexApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetFriendsCount" /> API.
|
|
/// </summary>
|
|
public const int GetfriendscountApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetStatus" /> API.
|
|
/// </summary>
|
|
public const int GetstatusApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="QueryFriends" /> API.
|
|
/// </summary>
|
|
public const int QueryfriendsApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="RejectInvite" /> API.
|
|
/// </summary>
|
|
public const int RejectinviteApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="SendInvite" /> API.
|
|
/// </summary>
|
|
public const int SendinviteApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// Starts an asynchronous task that accepts a friend invitation from another user. The completion delegate is executed after the backend response has been received.
|
|
/// </summary>
|
|
/// <param name="options">structure containing the logged in account and the inviting account</param>
|
|
/// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
|
|
public void AcceptInvite(AcceptInviteOptions options, object clientData, OnAcceptInviteCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AcceptInviteOptionsInternal, AcceptInviteOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnAcceptInviteCallbackInternal(OnAcceptInviteCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Friends_AcceptInvite(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Listen for changes to friends for a particular account.
|
|
/// </summary>
|
|
/// <param name="options">Information about who would like notifications.</param>
|
|
/// <param name="clientData">This value is returned to the caller when FriendsUpdateHandler is invoked.</param>
|
|
/// <param name="friendsUpdateHandler">The callback to be invoked when a change to any friend status changes.</param>
|
|
/// <returns>
|
|
/// A valid notification ID if successfully bound, or <see cref="Common.InvalidNotificationid" /> otherwise
|
|
/// </returns>
|
|
public ulong AddNotifyFriendsUpdate(AddNotifyFriendsUpdateOptions options, object clientData, OnFriendsUpdateCallback friendsUpdateHandler)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyFriendsUpdateOptionsInternal, AddNotifyFriendsUpdateOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var friendsUpdateHandlerInternal = new OnFriendsUpdateCallbackInternal(OnFriendsUpdateCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, friendsUpdateHandler, friendsUpdateHandlerInternal);
|
|
|
|
var funcResult = Bindings.EOS_Friends_AddNotifyFriendsUpdate(InnerHandle, optionsAddress, clientDataAddress, friendsUpdateHandlerInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Retrieves the Epic Online Services Account ID of an entry from the friends list that has already been retrieved by the <see cref="QueryFriends" /> API.
|
|
/// The Epic Online Services 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 Online Services Account ID returned by this function is a friend or a pending friend invitation, use the <see cref="GetStatus" /> function.
|
|
/// <seealso cref="GetFriendsCount" />
|
|
/// <seealso cref="GetStatus" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the Epic Online Services Account ID of the owner of the friends list and the index into the list</param>
|
|
/// <returns>
|
|
/// the Epic Online Services Account ID of the friend. Note that if the index provided is out of bounds, the returned Epic Online Services Account ID will be a "null" account ID.
|
|
/// </returns>
|
|
public EpicAccountId GetFriendAtIndex(GetFriendAtIndexOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetFriendAtIndexOptionsInternal, GetFriendAtIndexOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_Friends_GetFriendAtIndex(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
EpicAccountId funcResultReturn;
|
|
Helper.TryMarshalGet(funcResult, out funcResultReturn);
|
|
return funcResultReturn;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Retrieves the number of friends on the friends list that has already been retrieved by the <see cref="QueryFriends" /> API.
|
|
/// <seealso cref="GetFriendAtIndex" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the Epic Online Services Account ID of user who owns the friends list</param>
|
|
/// <returns>
|
|
/// the number of friends on the list
|
|
/// </returns>
|
|
public int GetFriendsCount(GetFriendsCountOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetFriendsCountOptionsInternal, GetFriendsCountOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_Friends_GetFriendsCount(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Retrieve the friendship status between the local user and another user.
|
|
/// <seealso cref="FriendsStatus" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the Epic Online Services Account ID of the friend list to check and the account of the user to test friendship status</param>
|
|
/// <returns>
|
|
/// A value indicating whether the two accounts have a friendship, pending invites in either direction, or no relationship
|
|
/// <see cref="FriendsStatus.Friends" /> is returned for two users that have confirmed friendship
|
|
/// <see cref="FriendsStatus.InviteSent" /> is returned when the local user has sent a friend invitation but the other user has not accepted or rejected it
|
|
/// <see cref="FriendsStatus.InviteReceived" /> is returned when the other user has sent a friend invitation to the local user
|
|
/// <see cref="FriendsStatus.NotFriends" /> is returned when there is no known relationship
|
|
/// </returns>
|
|
public FriendsStatus GetStatus(GetStatusOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetStatusOptionsInternal, GetStatusOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_Friends_GetStatus(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Starts an asynchronous task that reads the user's friends list from the backend service, caching it for future use.
|
|
///
|
|
/// @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see <see cref="Platform.PlatformFlags.DisableSocialOverlay" />).
|
|
/// </summary>
|
|
/// <param name="options">structure containing the account for which to retrieve the friends list</param>
|
|
/// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
|
|
public void QueryFriends(QueryFriendsOptions options, object clientData, OnQueryFriendsCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<QueryFriendsOptionsInternal, QueryFriendsOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryFriendsCallbackInternal(OnQueryFriendsCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Friends_QueryFriends(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Starts an asynchronous task that rejects a friend invitation from another user. The completion delegate is executed after the backend response has been received.
|
|
/// </summary>
|
|
/// <param name="options">structure containing the logged in account and the inviting account</param>
|
|
/// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
|
|
public void RejectInvite(RejectInviteOptions options, object clientData, OnRejectInviteCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<RejectInviteOptionsInternal, RejectInviteOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnRejectInviteCallbackInternal(OnRejectInviteCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Friends_RejectInvite(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Stop listening for friends changes on a previously bound handler.
|
|
/// </summary>
|
|
/// <param name="notificationId">The previously bound notification ID.</param>
|
|
public void RemoveNotifyFriendsUpdate(ulong notificationId)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(notificationId);
|
|
|
|
Bindings.EOS_Friends_RemoveNotifyFriendsUpdate(InnerHandle, notificationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 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.
|
|
/// </summary>
|
|
/// <param name="options">structure containing the account to send the invite from and the account to send the invite to</param>
|
|
/// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
|
|
public void SendInvite(SendInviteOptions options, object clientData, OnSendInviteCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<SendInviteOptionsInternal, SendInviteOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnSendInviteCallbackInternal(OnSendInviteCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Friends_SendInvite(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAcceptInviteCallbackInternal))]
|
|
internal static void OnAcceptInviteCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnAcceptInviteCallback callback;
|
|
AcceptInviteCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnAcceptInviteCallback, AcceptInviteCallbackInfoInternal, AcceptInviteCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnFriendsUpdateCallbackInternal))]
|
|
internal static void OnFriendsUpdateCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnFriendsUpdateCallback callback;
|
|
OnFriendsUpdateInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnFriendsUpdateCallback, OnFriendsUpdateInfoInternal, OnFriendsUpdateInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryFriendsCallbackInternal))]
|
|
internal static void OnQueryFriendsCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnQueryFriendsCallback callback;
|
|
QueryFriendsCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnQueryFriendsCallback, QueryFriendsCallbackInfoInternal, QueryFriendsCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnRejectInviteCallbackInternal))]
|
|
internal static void OnRejectInviteCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnRejectInviteCallback callback;
|
|
RejectInviteCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnRejectInviteCallback, RejectInviteCallbackInfoInternal, RejectInviteCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnSendInviteCallbackInternal))]
|
|
internal static void OnSendInviteCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnSendInviteCallback callback;
|
|
SendInviteCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnSendInviteCallback, SendInviteCallbackInfoInternal, SendInviteCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|