// 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. /// /// /// Structure containing the index being accessed /// /// The user token for the given index, if it exists and is valid. Use when finished /// @note The order of the tokens doesn't necessarily match the order of the array specified in the when /// initiating the query. /// /// /// 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(CopyUserTokenByIndexOptions options, out UserToken outUserToken) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outUserTokenAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_RTCAdmin_CopyUserTokenByIndex(InnerHandle, optionsAddress, ref outUserTokenAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet(outUserTokenAddress, out outUserToken)) { 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(CopyUserTokenByUserIdOptions options, out UserToken outUserToken) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outUserTokenAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_RTCAdmin_CopyUserTokenByUserId(InnerHandle, optionsAddress, ref outUserTokenAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet(outUserTokenAddress, out outUserToken)) { 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(KickOptions options, object clientData, OnKickCompleteCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnKickCompleteCallbackInternal(OnKickCompleteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_RTCAdmin_Kick(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// 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(QueryJoinRoomTokenOptions options, object clientData, OnQueryJoinRoomTokenCompleteCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryJoinRoomTokenCompleteCallbackInternal(OnQueryJoinRoomTokenCompleteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_RTCAdmin_QueryJoinRoomToken(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// 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(SetParticipantHardMuteOptions options, object clientData, OnSetParticipantHardMuteCompleteCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnSetParticipantHardMuteCompleteCallbackInternal(OnSetParticipantHardMuteCompleteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_RTCAdmin_SetParticipantHardMute(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } [MonoPInvokeCallback(typeof(OnKickCompleteCallbackInternal))] internal static void OnKickCompleteCallbackInternalImplementation(System.IntPtr data) { OnKickCompleteCallback callback; KickCompleteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryJoinRoomTokenCompleteCallbackInternal))] internal static void OnQueryJoinRoomTokenCompleteCallbackInternalImplementation(System.IntPtr data) { OnQueryJoinRoomTokenCompleteCallback callback; QueryJoinRoomTokenCompleteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnSetParticipantHardMuteCompleteCallbackInternal))] internal static void OnSetParticipantHardMuteCompleteCallbackInternalImplementation(System.IntPtr data) { OnSetParticipantHardMuteCompleteCallback callback; SetParticipantHardMuteCompleteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } } }