// 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 AddnotifycustominviterejectedApiLatest = 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 user is accepted via the Social Overlay /// Invites accepted in this way still need to have FinalizeInvite called on them after you have finished processing the invite accept (e.g. after joining the game) /// must call EOS_CustomInvites_RemoveNotifyCustomInviteAccepted 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(ref AddNotifyCustomInviteAcceptedOptions options, object clientData, OnCustomInviteAcceptedCallback notificationFn) { AddNotifyCustomInviteAcceptedOptionsInternal optionsInternal = new AddNotifyCustomInviteAcceptedOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnCustomInviteAcceptedCallbackInternal(OnCustomInviteAcceptedCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_CustomInvites_AddNotifyCustomInviteAccepted(InnerHandle, ref optionsInternal, clientDataAddress, notificationFnInternal); Helper.Dispose(ref optionsInternal); Helper.AssignNotificationIdToCallback(clientDataAddress, funcResult); return funcResult; } /// /// Register to receive notifications when a Custom Invite for any logged in local user is received /// must call EOS_CustomInvites_RemoveNotifyCustomInviteReceived 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(ref AddNotifyCustomInviteReceivedOptions options, object clientData, OnCustomInviteReceivedCallback notificationFn) { AddNotifyCustomInviteReceivedOptionsInternal optionsInternal = new AddNotifyCustomInviteReceivedOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnCustomInviteReceivedCallbackInternal(OnCustomInviteReceivedCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_CustomInvites_AddNotifyCustomInviteReceived(InnerHandle, ref optionsInternal, clientDataAddress, notificationFnInternal); Helper.Dispose(ref optionsInternal); Helper.AssignNotificationIdToCallback(clientDataAddress, funcResult); return funcResult; } /// /// Register to receive notifications when a Custom Invite for any logged in local user is rejected via the Social Overlay /// Invites rejected in this way do not need to have FinalizeInvite called on them, it is called automatically internally by the SDK. /// must call EOS_CustomInvites_RemoveNotifyCustomInviteRejected 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 rejected via the Social Overlay. /// /// handle representing the registered callback /// public ulong AddNotifyCustomInviteRejected(ref AddNotifyCustomInviteRejectedOptions options, object clientData, OnCustomInviteRejectedCallback notificationFn) { AddNotifyCustomInviteRejectedOptionsInternal optionsInternal = new AddNotifyCustomInviteRejectedOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnCustomInviteRejectedCallbackInternal(OnCustomInviteRejectedCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_CustomInvites_AddNotifyCustomInviteRejected(InnerHandle, ref optionsInternal, clientDataAddress, notificationFnInternal); Helper.Dispose(ref optionsInternal); Helper.AssignNotificationIdToCallback(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(ref FinalizeInviteOptions options) { FinalizeInviteOptionsInternal optionsInternal = new FinalizeInviteOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_CustomInvites_FinalizeInvite(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Unregister from receiving notifications when a Custom Invite for any logged in local user is accepted via the Social Overlay /// /// Handle representing the registered callback public void RemoveNotifyCustomInviteAccepted(ulong inId) { Bindings.EOS_CustomInvites_RemoveNotifyCustomInviteAccepted(InnerHandle, inId); Helper.RemoveCallbackByNotificationId(inId); } /// /// Unregister from receiving notifications when a Custom Invite for any logged in local user is received /// /// Handle representing the registered callback public void RemoveNotifyCustomInviteReceived(ulong inId) { Bindings.EOS_CustomInvites_RemoveNotifyCustomInviteReceived(InnerHandle, inId); Helper.RemoveCallbackByNotificationId(inId); } /// /// Unregister from receiving notifications when a Custom Invite for any logged in local user is rejected via the Social Overlay /// /// Handle representing the registered callback public void RemoveNotifyCustomInviteRejected(ulong inId) { Bindings.EOS_CustomInvites_RemoveNotifyCustomInviteRejected(InnerHandle, inId); Helper.RemoveCallbackByNotificationId(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(ref SendCustomInviteOptions options, object clientData, OnSendCustomInviteCallback completionDelegate) { SendCustomInviteOptionsInternal optionsInternal = new SendCustomInviteOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnSendCustomInviteCallbackInternal(OnSendCustomInviteCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_CustomInvites_SendCustomInvite(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// 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(ref SetCustomInviteOptions options) { SetCustomInviteOptionsInternal optionsInternal = new SetCustomInviteOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_CustomInvites_SetCustomInvite(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } [MonoPInvokeCallback(typeof(OnCustomInviteAcceptedCallbackInternal))] internal static void OnCustomInviteAcceptedCallbackInternalImplementation(ref OnCustomInviteAcceptedCallbackInfoInternal data) { OnCustomInviteAcceptedCallback callback; OnCustomInviteAcceptedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnCustomInviteReceivedCallbackInternal))] internal static void OnCustomInviteReceivedCallbackInternalImplementation(ref OnCustomInviteReceivedCallbackInfoInternal data) { OnCustomInviteReceivedCallback callback; OnCustomInviteReceivedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnCustomInviteRejectedCallbackInternal))] internal static void OnCustomInviteRejectedCallbackInternalImplementation(ref CustomInviteRejectedCallbackInfoInternal data) { OnCustomInviteRejectedCallback callback; CustomInviteRejectedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnSendCustomInviteCallbackInternal))] internal static void OnSendCustomInviteCallbackInternalImplementation(ref SendCustomInviteCallbackInfoInternal data) { OnSendCustomInviteCallback callback; SendCustomInviteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } } }