// 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(ActiveSessionCopyInfoOptions options, out ActiveSessionInfo outActiveSessionInfo) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outActiveSessionInfoAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_ActiveSession_CopyInfo(InnerHandle, optionsAddress, ref outActiveSessionInfoAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet(outActiveSessionInfoAddress, out outActiveSessionInfo)) { 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(ActiveSessionGetRegisteredPlayerByIndexOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_ActiveSession_GetRegisteredPlayerByIndex(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); ProductUserId funcResultReturn; Helper.TryMarshalGet(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(ActiveSessionGetRegisteredPlayerCountOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_ActiveSession_GetRegisteredPlayerCount(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); 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); } } }