// 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 /// must call EOS_KWS_RemoveNotifyPermissionsUpdateReceived 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(ref AddNotifyPermissionsUpdateReceivedOptions options, object clientData, OnPermissionsUpdateReceivedCallback notificationFn) { AddNotifyPermissionsUpdateReceivedOptionsInternal optionsInternal = new AddNotifyPermissionsUpdateReceivedOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnPermissionsUpdateReceivedCallbackInternal(OnPermissionsUpdateReceivedCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_KWS_AddNotifyPermissionsUpdateReceived(InnerHandle, ref optionsInternal, clientDataAddress, notificationFnInternal); Helper.Dispose(ref optionsInternal); Helper.AssignNotificationIdToCallback(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(ref CopyPermissionByIndexOptions options, out PermissionStatus? outPermission) { CopyPermissionByIndexOptionsInternal optionsInternal = new CopyPermissionByIndexOptionsInternal(); optionsInternal.Set(ref options); var outPermissionAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_KWS_CopyPermissionByIndex(InnerHandle, ref optionsInternal, ref outPermissionAddress); Helper.Dispose(ref optionsInternal); Helper.Get(outPermissionAddress, out outPermission); if (outPermission != null) { 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(ref CreateUserOptions options, object clientData, OnCreateUserCallback completionDelegate) { CreateUserOptionsInternal optionsInternal = new CreateUserOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnCreateUserCallbackInternal(OnCreateUserCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_CreateUser(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// 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(ref GetPermissionByKeyOptions options, out KWSPermissionStatus outPermission) { GetPermissionByKeyOptionsInternal optionsInternal = new GetPermissionByKeyOptionsInternal(); optionsInternal.Set(ref options); outPermission = Helper.GetDefault(); var funcResult = Bindings.EOS_KWS_GetPermissionByKey(InnerHandle, ref optionsInternal, ref outPermission); Helper.Dispose(ref optionsInternal); 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(ref GetPermissionsCountOptions options) { GetPermissionsCountOptionsInternal optionsInternal = new GetPermissionsCountOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_KWS_GetPermissionsCount(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); 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(ref QueryAgeGateOptions options, object clientData, OnQueryAgeGateCallback completionDelegate) { QueryAgeGateOptionsInternal optionsInternal = new QueryAgeGateOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryAgeGateCallbackInternal(OnQueryAgeGateCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_QueryAgeGate(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// 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(ref QueryPermissionsOptions options, object clientData, OnQueryPermissionsCallback completionDelegate) { QueryPermissionsOptionsInternal optionsInternal = new QueryPermissionsOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryPermissionsCallbackInternal(OnQueryPermissionsCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_QueryPermissions(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// 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) { Bindings.EOS_KWS_RemoveNotifyPermissionsUpdateReceived(InnerHandle, inId); Helper.RemoveCallbackByNotificationId(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(ref RequestPermissionsOptions options, object clientData, OnRequestPermissionsCallback completionDelegate) { RequestPermissionsOptionsInternal optionsInternal = new RequestPermissionsOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnRequestPermissionsCallbackInternal(OnRequestPermissionsCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_RequestPermissions(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// 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(ref UpdateParentEmailOptions options, object clientData, OnUpdateParentEmailCallback completionDelegate) { UpdateParentEmailOptionsInternal optionsInternal = new UpdateParentEmailOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnUpdateParentEmailCallbackInternal(OnUpdateParentEmailCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_KWS_UpdateParentEmail(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } [MonoPInvokeCallback(typeof(OnCreateUserCallbackInternal))] internal static void OnCreateUserCallbackInternalImplementation(ref CreateUserCallbackInfoInternal data) { OnCreateUserCallback callback; CreateUserCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnPermissionsUpdateReceivedCallbackInternal))] internal static void OnPermissionsUpdateReceivedCallbackInternalImplementation(ref PermissionsUpdateReceivedCallbackInfoInternal data) { OnPermissionsUpdateReceivedCallback callback; PermissionsUpdateReceivedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryAgeGateCallbackInternal))] internal static void OnQueryAgeGateCallbackInternalImplementation(ref QueryAgeGateCallbackInfoInternal data) { OnQueryAgeGateCallback callback; QueryAgeGateCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryPermissionsCallbackInternal))] internal static void OnQueryPermissionsCallbackInternalImplementation(ref QueryPermissionsCallbackInfoInternal data) { OnQueryPermissionsCallback callback; QueryPermissionsCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnRequestPermissionsCallbackInternal))] internal static void OnRequestPermissionsCallbackInternalImplementation(ref RequestPermissionsCallbackInfoInternal data) { OnRequestPermissionsCallback callback; RequestPermissionsCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnUpdateParentEmailCallbackInternal))] internal static void OnUpdateParentEmailCallbackInternalImplementation(ref UpdateParentEmailCallbackInfoInternal data) { OnUpdateParentEmailCallback callback; UpdateParentEmailCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } } }