// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.CustomInvites
{
public sealed partial class CustomInvitesInterface : Handle
{
public CustomInvitesInterface()
{
}
public CustomInvitesInterface(System.IntPtr innerHandle) : base(innerHandle)
{
}
///
/// The most recent version of the API.
///
public const int AddnotifycustominviteacceptedApiLatest = 1;
///
/// The most recent version of the API.
///
public const int AddnotifycustominvitereceivedApiLatest = 1;
///
/// The most recent version of the API.
///
public const int FinalizeinviteApiLatest = 1;
///
/// Maximum size of the custom invite payload string
///
public const int MaxPayloadLength = 500;
///
/// The most recent version of the API.
///
public const int SendcustominviteApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SetcustominviteApiLatest = 1;
///
/// Register to receive notifications when a Custom Invite for any logged in local users is accepted via the Social Overlay
/// @note must call to remove the notification
///
/// Structure containing information about the request.
/// Arbitrary data that is passed back to you in the CompletionDelegate.
/// A callback that is fired when a Custom Invite is accepted via the Social Overlay.
///
/// handle representing the registered callback
///
public ulong AddNotifyCustomInviteAccepted(AddNotifyCustomInviteAcceptedOptions options, object clientData, OnCustomInviteAcceptedCallback notificationFn)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var notificationFnInternal = new OnCustomInviteAcceptedCallbackInternal(OnCustomInviteAcceptedCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal);
var funcResult = Bindings.EOS_CustomInvites_AddNotifyCustomInviteAccepted(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal);
Helper.TryMarshalDispose(ref optionsAddress);
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
return funcResult;
}
///
/// Register to receive notifications when a Custom Invite for any logged in local users is received
/// @note must call to remove the notification
///
/// Structure containing information about the request.
/// Arbitrary data that is passed back to you in the CompletionDelegate.
/// A callback that is fired when a Custom Invite is received.
///
/// handle representing the registered callback
///
public ulong AddNotifyCustomInviteReceived(AddNotifyCustomInviteReceivedOptions options, object clientData, OnCustomInviteReceivedCallback notificationFn)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var notificationFnInternal = new OnCustomInviteReceivedCallbackInternal(OnCustomInviteReceivedCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal);
var funcResult = Bindings.EOS_CustomInvites_AddNotifyCustomInviteReceived(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal);
Helper.TryMarshalDispose(ref optionsAddress);
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
return funcResult;
}
///
/// Signal that the title has completed processing a received Custom Invite, and that it should be cleaned up internally and in the Overlay
///
/// Structure containing information about the request.
///
/// if the operation completes successfully
/// if any of the option values are incorrect
///
public Result FinalizeInvite(FinalizeInviteOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_CustomInvites_FinalizeInvite(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Unregister from receiving notifications when a Custom Invite for any logged in local users is accepted via the Social Overlay
///
/// Handle representing the registered callback
public void RemoveNotifyCustomInviteAccepted(ulong inId)
{
Helper.TryRemoveCallbackByNotificationId(inId);
Bindings.EOS_CustomInvites_RemoveNotifyCustomInviteAccepted(InnerHandle, inId);
}
///
/// Unregister from receiving notifications when a Custom Invite for any logged in local users is received
///
/// Handle representing the registered callback
public void RemoveNotifyCustomInviteReceived(ulong inId)
{
Helper.TryRemoveCallbackByNotificationId(inId);
Bindings.EOS_CustomInvites_RemoveNotifyCustomInviteReceived(InnerHandle, inId);
}
///
/// Sends a Custom Invite that has previously been initialized via SetCustomInvite to a group of users.
///
/// Structure containing information about the request.
/// Arbitrary data that is passed back to you in the CompletionDelegate
/// A callback that is fired when the operation completes, either successfully or in error
///
/// if the query completes successfully
/// if any of the options values are incorrect
/// if the number of allowed queries is exceeded
/// if SetCustomInvite has not been previously successfully called for this user
///
public void SendCustomInvite(SendCustomInviteOptions options, object clientData, OnSendCustomInviteCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnSendCustomInviteCallbackInternal(OnSendCustomInviteCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_CustomInvites_SendCustomInvite(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
///
/// Initializes a Custom Invite with a specified payload in preparation for it to be sent to another user or users.
///
/// Structure containing information about the request.
/// Arbitrary data that is passed back to you in the CompletionDelegate
/// A callback that is fired when the operation completes, either successfully or in error
///
/// if the operation completes successfully
/// if any of the options values are incorrect
///
public Result SetCustomInvite(SetCustomInviteOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_CustomInvites_SetCustomInvite(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
[MonoPInvokeCallback(typeof(OnCustomInviteAcceptedCallbackInternal))]
internal static void OnCustomInviteAcceptedCallbackInternalImplementation(System.IntPtr data)
{
OnCustomInviteAcceptedCallback callback;
OnCustomInviteAcceptedCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnCustomInviteReceivedCallbackInternal))]
internal static void OnCustomInviteReceivedCallbackInternalImplementation(System.IntPtr data)
{
OnCustomInviteReceivedCallback callback;
OnCustomInviteReceivedCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnSendCustomInviteCallbackInternal))]
internal static void OnSendCustomInviteCallbackInternalImplementation(System.IntPtr data)
{
OnSendCustomInviteCallback callback;
SendCustomInviteCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
}
}