// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Sessions { public sealed partial class ActiveSession : Handle { public ActiveSession() { } public ActiveSession(System.IntPtr innerHandle) : base(innerHandle) { } /// /// The most recent version of the function. /// public const int ActivesessionCopyinfoApiLatest = 1; /// /// The most recent version of the function. /// public const int ActivesessionGetregisteredplayerbyindexApiLatest = 1; /// /// The most recent version of the function. /// public const int ActivesessionGetregisteredplayercountApiLatest = 1; /// /// The most recent version of the struct. /// public const int ActivesessionInfoApiLatest = 1; /// /// is used to immediately retrieve a copy of active session information /// If the call returns an result, the out parameter, OutActiveSessionInfo, must be passed to to release the memory associated with it. /// /// /// /// /// Structure containing the input parameters /// Out parameter used to receive the structure. /// /// if the information is available and passed out in OutActiveSessionInfo /// if you pass a null pointer for the out parameter /// if the API version passed in is incorrect /// public Result CopyInfo(ref ActiveSessionCopyInfoOptions options, out ActiveSessionInfo? outActiveSessionInfo) { ActiveSessionCopyInfoOptionsInternal optionsInternal = new ActiveSessionCopyInfoOptionsInternal(); optionsInternal.Set(ref options); var outActiveSessionInfoAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_ActiveSession_CopyInfo(InnerHandle, ref optionsInternal, ref outActiveSessionInfoAddress); Helper.Dispose(ref optionsInternal); Helper.Get(outActiveSessionInfoAddress, out outActiveSessionInfo); if (outActiveSessionInfo != null) { Bindings.EOS_ActiveSession_Info_Release(outActiveSessionInfoAddress); } return funcResult; } /// /// is used to immediately retrieve individual players registered with the active session. /// /// /// /// Structure containing the input parameters /// /// the product user ID for the registered player at a given index or null if that index is invalid /// public ProductUserId GetRegisteredPlayerByIndex(ref ActiveSessionGetRegisteredPlayerByIndexOptions options) { ActiveSessionGetRegisteredPlayerByIndexOptionsInternal optionsInternal = new ActiveSessionGetRegisteredPlayerByIndexOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_ActiveSession_GetRegisteredPlayerByIndex(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); ProductUserId funcResultReturn; Helper.Get(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get the number of registered players associated with this active session /// /// the Options associated with retrieving the registered player count /// /// number of registered players in the active session or 0 if there is an error /// public uint GetRegisteredPlayerCount(ref ActiveSessionGetRegisteredPlayerCountOptions options) { ActiveSessionGetRegisteredPlayerCountOptionsInternal optionsInternal = new ActiveSessionGetRegisteredPlayerCountOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_ActiveSession_GetRegisteredPlayerCount(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Release the memory associated with an active session. /// This must be called on data retrieved from /// /// /// - The active session handle to release public void Release() { Bindings.EOS_ActiveSession_Release(InnerHandle); } } }