// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.KWS { public sealed partial class KWSInterface : Handle { public KWSInterface() { } public KWSInterface(System.IntPtr innerHandle) : base(innerHandle) { } /// /// The most recent version of the API. /// public const int AddnotifypermissionsupdatereceivedApiLatest = 1; /// /// The most recent version of the API. /// public const int CopypermissionbyindexApiLatest = 1; /// /// The most recent version of the API. /// public const int CreateuserApiLatest = 1; /// /// The most recent version of the API. /// public const int GetpermissionbykeyApiLatest = 1; public const int GetpermissionscountApiLatest = 1; /// /// Maximum size of the name for the permission /// public const int MaxPermissionLength = 32; /// /// Maximum number of permissions that may be requested /// public const int MaxPermissions = 16; /// /// The most recent version of the API. /// public const int PermissionstatusApiLatest = 1; /// /// The most recent version of the API. /// public const int QueryagegateApiLatest = 1; /// /// The most recent version of the API. /// public const int QuerypermissionsApiLatest = 1; /// /// The most recent version of the API. /// public const int RequestpermissionsApiLatest = 1; /// /// The most recent version of the API. /// public const int UpdateparentemailApiLatest = 1; /// /// This interface is not available for general access at this time. /// /// Register to receive notifications about KWS permissions changes for any logged in local users /// @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 notification is received. /// /// handle representing the registered callback /// public ulong AddNotifyPermissionsUpdateReceived(AddNotifyPermissionsUpdateReceivedOptions options, object clientData, OnPermissionsUpdateReceivedCallback notificationFn) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnPermissionsUpdateReceivedCallbackInternal(OnPermissionsUpdateReceivedCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_KWS_AddNotifyPermissionsUpdateReceived(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult); return funcResult; } /// /// This interface is not available for general access at this time. /// /// Fetch a permission for a given by index for a given local user /// /// /// /// /// /// Structure containing the input parameters /// the permission for the given index, if it exists and is valid, use when finished /// /// if the permission state is known for the given user and index /// if the user is not found or the index is invalid /// public Result CopyPermissionByIndex(CopyPermissionByIndexOptions options, out PermissionStatus outPermission) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outPermissionAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_KWS_CopyPermissionByIndex(InnerHandle, optionsAddress, ref outPermissionAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet(outPermissionAddress, out outPermission)) { Bindings.EOS_KWS_PermissionStatus_Release(outPermissionAddress); } return funcResult; } /// /// This interface is not available for general access at this time. /// /// Create an account with Kids Web Services and associate it with the local Product User ID /// /// options required for creating an account such as the local users Product User ID, their data of birth, and parental contact information /// 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 account creation completes successfully /// if any of the options are incorrect /// if the number of allowed requests is exceeded /// public void CreateUser(CreateUserOptions options, object clientData, OnCreateUserCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnCreateUserCallbackInternal(OnCreateUserCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_CreateUser(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// This interface is not available for general access at this time. /// /// Fetch the state of a given permission that are cached for a given local user. /// /// /// /// /// Structure containing the input parameters /// the permission for the given key, if it exists and is valid /// /// if the permission state is known for the given user and key /// if the user or the permission is not found /// public Result GetPermissionByKey(GetPermissionByKeyOptions options, out KWSPermissionStatus outPermission) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); outPermission = Helper.GetDefault(); var funcResult = Bindings.EOS_KWS_GetPermissionByKey(InnerHandle, optionsAddress, ref outPermission); Helper.TryMarshalDispose(ref optionsAddress); return funcResult; } /// /// This interface is not available for general access at this time. /// /// Fetch the number of permissions found for a given local user /// /// Structure containing the input parameters /// /// the number of permissions associated with the given user /// public int GetPermissionsCount(GetPermissionsCountOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_KWS_GetPermissionsCount(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); return funcResult; } /// /// This interface is not available for general access at this time. /// /// Query the client's country and age permissions for client side reasoning about the possible need enforce age based restrictions /// /// options required for interacting with the age gate system /// 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 are incorrect /// if the number of allowed queries is exceeded /// public void QueryAgeGate(QueryAgeGateOptions options, object clientData, OnQueryAgeGateCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryAgeGateCallbackInternal(OnQueryAgeGateCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_QueryAgeGate(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// This interface is not available for general access at this time. /// /// Query the current state of permissions for a given local Product User ID /// /// options required for querying permissions such as the local users Product User ID /// 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 account query completes successfully /// if any of the options are incorrect /// if the number of allowed requests is exceeded /// public void QueryPermissions(QueryPermissionsOptions options, object clientData, OnQueryPermissionsCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryPermissionsCallbackInternal(OnQueryPermissionsCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_QueryPermissions(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// This interface is not available for general access at this time. /// /// Unregister from receiving notifications about KWS permissions related to logged in users /// /// Handle representing the registered callback public void RemoveNotifyPermissionsUpdateReceived(ulong inId) { Helper.TryRemoveCallbackByNotificationId(inId); Bindings.EOS_KWS_RemoveNotifyPermissionsUpdateReceived(InnerHandle, inId); } /// /// This interface is not available for general access at this time. /// /// Request new permissions for a given local Product User ID /// /// options required for updating permissions such as the new list of permissions /// 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 contact information update completes successfully /// if any of the options are incorrect /// if the number of allowed requests is exceeded /// if the account requesting permissions has no parent email associated with it /// if the number of permissions exceeds , or if any permission name exceeds /// public void RequestPermissions(RequestPermissionsOptions options, object clientData, OnRequestPermissionsCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnRequestPermissionsCallbackInternal(OnRequestPermissionsCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_RequestPermissions(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// This interface is not available for general access at this time. /// /// Update the parent contact information for a given local Product User ID /// /// options required for updating the contact information such as the new email address /// 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 contact information update completes successfully /// if any of the options are incorrect /// if the number of allowed requests is exceeded /// public void UpdateParentEmail(UpdateParentEmailOptions options, object clientData, OnUpdateParentEmailCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnUpdateParentEmailCallbackInternal(OnUpdateParentEmailCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_UpdateParentEmail(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } [MonoPInvokeCallback(typeof(OnCreateUserCallbackInternal))] internal static void OnCreateUserCallbackInternalImplementation(System.IntPtr data) { OnCreateUserCallback callback; CreateUserCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnPermissionsUpdateReceivedCallbackInternal))] internal static void OnPermissionsUpdateReceivedCallbackInternalImplementation(System.IntPtr data) { OnPermissionsUpdateReceivedCallback callback; PermissionsUpdateReceivedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryAgeGateCallbackInternal))] internal static void OnQueryAgeGateCallbackInternalImplementation(System.IntPtr data) { OnQueryAgeGateCallback callback; QueryAgeGateCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryPermissionsCallbackInternal))] internal static void OnQueryPermissionsCallbackInternalImplementation(System.IntPtr data) { OnQueryPermissionsCallback callback; QueryPermissionsCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnRequestPermissionsCallbackInternal))] internal static void OnRequestPermissionsCallbackInternalImplementation(System.IntPtr data) { OnRequestPermissionsCallback callback; RequestPermissionsCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnUpdateParentEmailCallbackInternal))] internal static void OnUpdateParentEmailCallbackInternalImplementation(System.IntPtr data) { OnUpdateParentEmailCallback callback; UpdateParentEmailCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } } }