// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.RTCAdmin { public sealed partial class RTCAdminInterface : Handle { public RTCAdminInterface() { } public RTCAdminInterface(System.IntPtr innerHandle) : base(innerHandle) { } /// /// The most recent version of the struct. /// public const int CopyusertokenbyindexApiLatest = 2; /// /// The most recent version of the struct. /// public const int CopyusertokenbyuseridApiLatest = 2; /// /// The most recent version of the API /// public const int KickApiLatest = 1; /// /// The most recent version of the API /// public const int QueryjoinroomtokenApiLatest = 2; /// /// The most recent version of the struct. /// public const int SetparticipanthardmuteApiLatest = 1; /// /// The most recent version of the struct. /// public const int UsertokenApiLatest = 1; /// /// Fetches a user token when called inside of the OnQueryJoinRoomTokenComplete callback. /// The order of the tokens doesn't necessarily match the order of the EOS_ProductUserId array specified in the EOS_RTCAdmin_QueryJoinRoomTokenOptions when /// initiating the query. /// /// /// Structure containing the index being accessed /// The user token for the given index, if it exists and is valid. Use when finished /// /// if the information is available and passed out in OutUserToken /// if you pass a null pointer for the out parameter /// if the user token is not found /// public Result CopyUserTokenByIndex(ref CopyUserTokenByIndexOptions options, out UserToken? outUserToken) { CopyUserTokenByIndexOptionsInternal optionsInternal = new CopyUserTokenByIndexOptionsInternal(); optionsInternal.Set(ref options); var outUserTokenAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_RTCAdmin_CopyUserTokenByIndex(InnerHandle, ref optionsInternal, ref outUserTokenAddress); Helper.Dispose(ref optionsInternal); Helper.Get(outUserTokenAddress, out outUserToken); if (outUserToken != null) { Bindings.EOS_RTCAdmin_UserToken_Release(outUserTokenAddress); } return funcResult; } /// /// Fetches a user token for a given user ID when called inside of the OnQueryJoinRoomTokenComplete callback. /// /// /// Structure containing the user ID being accessed /// The user token for the given user ID, if it exists and is valid. Use when finished /// /// if the information is available and passed out in OutUserToken /// if you pass a null pointer for the out parameter /// if the user token is not found /// public Result CopyUserTokenByUserId(ref CopyUserTokenByUserIdOptions options, out UserToken? outUserToken) { CopyUserTokenByUserIdOptionsInternal optionsInternal = new CopyUserTokenByUserIdOptionsInternal(); optionsInternal.Set(ref options); var outUserTokenAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_RTCAdmin_CopyUserTokenByUserId(InnerHandle, ref optionsInternal, ref outUserTokenAddress); Helper.Dispose(ref optionsInternal); Helper.Get(outUserTokenAddress, out outUserToken); if (outUserToken != null) { Bindings.EOS_RTCAdmin_UserToken_Release(outUserTokenAddress); } return funcResult; } /// /// Starts an asynchronous task that removes a participant from a room and revokes their token. /// /// structure containing the room and user to revoke the token from. /// arbitrary data that is passed back to you in the CompletionDelegate /// a callback that is fired when the async operation completes, either successfully or in error public void Kick(ref KickOptions options, object clientData, OnKickCompleteCallback completionDelegate) { KickOptionsInternal optionsInternal = new KickOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnKickCompleteCallbackInternal(OnKickCompleteCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_RTCAdmin_Kick(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// Query for a list of user tokens for joining a room. /// /// Each query generates a query id ( see ) which should be used /// to retrieve the tokens from inside the callback. /// /// Structure containing information about the application whose user tokens we're retrieving. /// Arbitrary data that is passed back to you in the CompletionDelegate /// This function is called when the query join room token operation completes. /// /// if the operation completes successfully /// if any of the options are incorrect /// public void QueryJoinRoomToken(ref QueryJoinRoomTokenOptions options, object clientData, OnQueryJoinRoomTokenCompleteCallback completionDelegate) { QueryJoinRoomTokenOptionsInternal optionsInternal = new QueryJoinRoomTokenOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryJoinRoomTokenCompleteCallbackInternal(OnQueryJoinRoomTokenCompleteCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_RTCAdmin_QueryJoinRoomToken(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// Starts an asynchronous task remotely mutes/unmutes a room participant. /// /// This remotely mutes the specified participant, so no audio is sent from that participant to any other participant in the room. /// /// structure containing the room and user to mute. /// arbitrary data that is passed back to you in the CompletionDelegate /// a callback that is fired when the async operation completes, either successfully or in error public void SetParticipantHardMute(ref SetParticipantHardMuteOptions options, object clientData, OnSetParticipantHardMuteCompleteCallback completionDelegate) { SetParticipantHardMuteOptionsInternal optionsInternal = new SetParticipantHardMuteOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnSetParticipantHardMuteCompleteCallbackInternal(OnSetParticipantHardMuteCompleteCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_RTCAdmin_SetParticipantHardMute(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } [MonoPInvokeCallback(typeof(OnKickCompleteCallbackInternal))] internal static void OnKickCompleteCallbackInternalImplementation(ref KickCompleteCallbackInfoInternal data) { OnKickCompleteCallback callback; KickCompleteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryJoinRoomTokenCompleteCallbackInternal))] internal static void OnQueryJoinRoomTokenCompleteCallbackInternalImplementation(ref QueryJoinRoomTokenCompleteCallbackInfoInternal data) { OnQueryJoinRoomTokenCompleteCallback callback; QueryJoinRoomTokenCompleteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } [MonoPInvokeCallback(typeof(OnSetParticipantHardMuteCompleteCallbackInternal))] internal static void OnSetParticipantHardMuteCompleteCallbackInternalImplementation(ref SetParticipantHardMuteCompleteCallbackInfoInternal data) { OnSetParticipantHardMuteCompleteCallback callback; SetParticipantHardMuteCompleteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } } }