// 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 SessionsInterface : Handle { public SessionsInterface() { } public SessionsInterface(System.IntPtr innerHandle) : base(innerHandle) { } /// /// The most recent version of the API. /// public const int AddnotifyjoinsessionacceptedApiLatest = 1; /// /// The most recent version of the API. /// public const int AddnotifysessioninviteacceptedApiLatest = 1; /// /// The most recent version of the API. /// public const int AddnotifysessioninvitereceivedApiLatest = 1; /// /// The most recent version of the struct. /// public const int AttributedataApiLatest = 1; /// /// The most recent version of the API. /// public const int CopyactivesessionhandleApiLatest = 1; /// /// The most recent version of the API. /// public const int CopysessionhandlebyinviteidApiLatest = 1; /// /// The most recent version of the API. /// public const int CopysessionhandlebyuieventidApiLatest = 1; /// /// The most recent version of the API. /// public const int CopysessionhandleforpresenceApiLatest = 1; /// /// The most recent version of the API. /// public const int CreatesessionmodificationApiLatest = 3; /// /// The most recent version of the API. /// public const int CreatesessionsearchApiLatest = 1; /// /// The most recent version of the API. /// public const int DestroysessionApiLatest = 1; /// /// The most recent version of the API. /// public const int DumpsessionstateApiLatest = 1; /// /// The most recent version of the API. /// public const int EndsessionApiLatest = 1; /// /// The most recent version of the API. /// public const int GetinvitecountApiLatest = 1; /// /// The most recent version of the API. /// public const int GetinviteidbyindexApiLatest = 1; /// /// Max length of an invite ID /// public const int InviteidMaxLength = 64; /// /// The most recent version of the API. /// public const int IsuserinsessionApiLatest = 1; /// /// The most recent version of the API. /// public const int JoinsessionApiLatest = 2; /// /// Maximum number of search results allowed with a given query /// public const int MaxSearchResults = 200; /// /// Maximum number of players allowed in a single session /// public const int Maxregisteredplayers = 1000; /// /// The most recent version of the API. /// public const int QueryinvitesApiLatest = 1; /// /// The most recent version of the API. /// public const int RegisterplayersApiLatest = 1; /// /// The most recent version of the API. /// public const int RejectinviteApiLatest = 1; /// /// Search for a matching bucket ID (value is string) /// public const string SearchBucketId = "bucket"; /// /// Search for empty servers only (value is true/false) /// public const string SearchEmptyServersOnly = "emptyonly"; /// /// Search for a match with min free space (value is int) /// public const string SearchMinslotsavailable = "minslotsavailable"; /// /// Search for non empty servers only (value is true/false) /// public const string SearchNonemptyServersOnly = "nonemptyonly"; /// /// The most recent version of the API. /// public const int SendinviteApiLatest = 1; /// /// DEPRECATED! Use instead. /// public const int SessionattributeApiLatest = SessionDetails.SessiondetailsAttributeApiLatest; /// /// DEPRECATED! Use instead. /// public const int SessionattributedataApiLatest = AttributedataApiLatest; /// /// The most recent version of the API. /// public const int StartsessionApiLatest = 1; /// /// The most recent version of the API. /// public const int UnregisterplayersApiLatest = 1; /// /// The most recent version of the API. /// public const int UpdatesessionApiLatest = 1; /// /// The most recent version of the API. /// public const int UpdatesessionmodificationApiLatest = 1; /// /// Register to receive notifications when a user accepts a session join game via the social overlay. /// @note must call RemoveNotifyJoinSessionAccepted 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 a notification is received. /// /// handle representing the registered callback /// public ulong AddNotifyJoinSessionAccepted(AddNotifyJoinSessionAcceptedOptions options, object clientData, OnJoinSessionAcceptedCallback notificationFn) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnJoinSessionAcceptedCallbackInternal(OnJoinSessionAcceptedCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_Sessions_AddNotifyJoinSessionAccepted(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult); return funcResult; } /// /// Register to receive notifications when a user accepts a session invite via the social overlay. /// @note must call RemoveNotifySessionInviteAccepted 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 a notification is received. /// /// handle representing the registered callback /// public ulong AddNotifySessionInviteAccepted(AddNotifySessionInviteAcceptedOptions options, object clientData, OnSessionInviteAcceptedCallback notificationFn) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnSessionInviteAcceptedCallbackInternal(OnSessionInviteAcceptedCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_Sessions_AddNotifySessionInviteAccepted(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult); return funcResult; } /// /// Register to receive session invites. /// @note must call RemoveNotifySessionInviteReceived to remove the notification /// /// Structure containing information about the session invite notification /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when a session invite for a user has been received /// /// handle representing the registered callback /// public ulong AddNotifySessionInviteReceived(AddNotifySessionInviteReceivedOptions options, object clientData, OnSessionInviteReceivedCallback notificationFn) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var notificationFnInternal = new OnSessionInviteReceivedCallbackInternal(OnSessionInviteReceivedCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal); var funcResult = Bindings.EOS_Sessions_AddNotifySessionInviteReceived(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult); return funcResult; } /// /// Create a handle to an existing active session. /// /// Structure containing information about the active session to retrieve /// The new active session handle or null if there was an error /// /// if the session handle was created successfully /// if any of the options are incorrect /// if the API version passed in is incorrect /// if the active session doesn't exist /// public Result CopyActiveSessionHandle(CopyActiveSessionHandleOptions options, out ActiveSession outSessionHandle) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSessionHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sessions_CopyActiveSessionHandle(InnerHandle, optionsAddress, ref outSessionHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outSessionHandleAddress, out outSessionHandle); return funcResult; } /// /// is used to immediately retrieve a handle to the session information from after notification of an invite /// If the call returns an result, the out parameter, OutSessionHandle, must be passed to to release the memory associated with it. /// /// /// /// Structure containing the input parameters /// out parameter used to receive the session handle /// /// if the information is available and passed out in OutSessionHandle /// if you pass an invalid invite ID or a null pointer for the out parameter /// if the API version passed in is incorrect /// if the invite ID cannot be found /// public Result CopySessionHandleByInviteId(CopySessionHandleByInviteIdOptions options, out SessionDetails outSessionHandle) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSessionHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sessions_CopySessionHandleByInviteId(InnerHandle, optionsAddress, ref outSessionHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outSessionHandleAddress, out outSessionHandle); return funcResult; } /// /// is used to immediately retrieve a handle to the session information from after notification of a join game event. /// If the call returns an result, the out parameter, OutSessionHandle, must be passed to to release the memory associated with it. /// /// /// /// Structure containing the input parameters /// out parameter used to receive the session handle /// /// if the information is available and passed out in OutSessionHandle /// if you pass an invalid invite ID or a null pointer for the out parameter /// if the API version passed in is incorrect /// if the invite ID cannot be found /// public Result CopySessionHandleByUiEventId(CopySessionHandleByUiEventIdOptions options, out SessionDetails outSessionHandle) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSessionHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sessions_CopySessionHandleByUiEventId(InnerHandle, optionsAddress, ref outSessionHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outSessionHandleAddress, out outSessionHandle); return funcResult; } /// /// is used to immediately retrieve a handle to the session information which was marked with bPresenceEnabled on create or join. /// If the call returns an result, the out parameter, OutSessionHandle, must be passed to to release the memory associated with it. /// /// /// /// Structure containing the input parameters /// out parameter used to receive the session handle /// /// if the information is available and passed out in OutSessionHandle /// if you pass an invalid invite ID or a null pointer for the out parameter /// if the API version passed in is incorrect /// if there is no session with bPresenceEnabled /// public Result CopySessionHandleForPresence(CopySessionHandleForPresenceOptions options, out SessionDetails outSessionHandle) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSessionHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sessions_CopySessionHandleForPresence(InnerHandle, optionsAddress, ref outSessionHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outSessionHandleAddress, out outSessionHandle); return funcResult; } /// /// Creates a session modification handle (). The session modification handle is used to build a new session and can be applied with /// The must be released by calling once it no longer needed. /// /// /// /// /// Required fields for the creation of a session such as a name, bucketid, and max players /// Pointer to a Session Modification Handle only set if successful /// /// if we successfully created the Session Modification Handle pointed at in OutSessionModificationHandle, or an error result if the input data was invalid /// public Result CreateSessionModification(CreateSessionModificationOptions options, out SessionModification outSessionModificationHandle) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSessionModificationHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sessions_CreateSessionModification(InnerHandle, optionsAddress, ref outSessionModificationHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outSessionModificationHandleAddress, out outSessionModificationHandle); return funcResult; } /// /// Create a session search handle. This handle may be modified to include various search parameters. /// Searching is possible in three methods, all mutually exclusive /// - set the session ID to find a specific session /// - set the target user ID to find a specific user /// - set session parameters to find an array of sessions that match the search criteria /// /// Structure containing required parameters such as the maximum number of search results /// The new search handle or null if there was an error creating the search handle /// /// if the search creation completes successfully /// if any of the options are incorrect /// public Result CreateSessionSearch(CreateSessionSearchOptions options, out SessionSearch outSessionSearchHandle) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSessionSearchHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sessions_CreateSessionSearch(InnerHandle, optionsAddress, ref outSessionSearchHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outSessionSearchHandleAddress, out outSessionSearchHandle); return funcResult; } /// /// Destroy a session given a session name /// /// Structure containing information about the session to be destroyed /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the destroy operation completes, either successfully or in error /// /// if the destroy completes successfully /// if any of the options are incorrect /// if the session is already marked for destroy /// if a session to be destroyed does not exist /// public void DestroySession(DestroySessionOptions options, object clientData, OnDestroySessionCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnDestroySessionCallbackInternal(OnDestroySessionCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_DestroySession(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Dump the contents of active sessions that exist locally to the log output, purely for debug purposes /// /// Options related to dumping session state such as the session name /// /// if the output operation completes successfully /// if the session specified does not exist /// if any of the options are incorrect /// public Result DumpSessionState(DumpSessionStateOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_Sessions_DumpSessionState(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); return funcResult; } /// /// Mark a session as ended, making it available to find if "join in progress" was disabled. The session may be started again if desired /// /// Structure containing information about the session to be ended /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the end operation completes, either successfully or in error /// /// if the end completes successfully /// if any of the options are incorrect /// if the session is out of sync and will be updated on the next connection with the backend /// if a session to be ended does not exist /// public void EndSession(EndSessionOptions options, object clientData, OnEndSessionCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnEndSessionCallbackInternal(OnEndSessionCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_EndSession(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Get the number of known invites for a given user /// /// the Options associated with retrieving the current invite count /// /// number of known invites for a given user or 0 if there is an error /// public uint GetInviteCount(GetInviteCountOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_Sessions_GetInviteCount(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); return funcResult; } /// /// Retrieve an invite ID from a list of active invites for a given user /// /// /// /// Structure containing the input parameters /// /// if the input is valid and an invite ID was returned /// if any of the options are incorrect /// if the invite doesn't exist /// public Result GetInviteIdByIndex(GetInviteIdByIndexOptions options, out string outBuffer) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); System.IntPtr outBufferAddress = System.IntPtr.Zero; int inOutBufferLength = InviteidMaxLength + 1; Helper.TryMarshalAllocate(ref outBufferAddress, inOutBufferLength); var funcResult = Bindings.EOS_Sessions_GetInviteIdByIndex(InnerHandle, optionsAddress, outBufferAddress, ref inOutBufferLength); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outBufferAddress, out outBuffer); Helper.TryMarshalDispose(ref outBufferAddress); return funcResult; } /// /// returns whether or not a given user can be found in a specified session /// /// Structure containing the input parameters /// /// if the user is found in the specified session /// if the user is not found in the specified session /// if you pass an invalid invite ID or a null pointer for the out parameter /// if the API version passed in is incorrect /// if an invalid target user is specified /// if the session specified is invalid /// public Result IsUserInSession(IsUserInSessionOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_Sessions_IsUserInSession(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); return funcResult; } /// /// Join a session, creating a local session under a given session name. Backend will validate various conditions to make sure it is possible to join the session. /// /// Structure containing information about the session to be joined /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the join operation completes, either successfully or in error /// /// if the join completes successfully /// if any of the options are incorrect /// if the session is already exists or is in the process of being joined /// public void JoinSession(JoinSessionOptions options, object clientData, OnJoinSessionCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnJoinSessionCallbackInternal(OnJoinSessionCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_JoinSession(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Retrieve all existing invites for a single user /// /// Structure containing information about the invites to query /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the query invites operation completes, either successfully or in error public void QueryInvites(QueryInvitesOptions options, object clientData, OnQueryInvitesCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryInvitesCallbackInternal(OnQueryInvitesCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_QueryInvites(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Register a group of players with the session, allowing them to invite others or otherwise indicate they are part of the session for determining a full session /// /// Structure containing information about the session and players to be registered /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the registration operation completes, either successfully or in error /// /// if the register completes successfully /// if the players to register registered previously /// if any of the options are incorrect /// if the session is out of sync and will be updated on the next connection with the backend /// if a session to register players does not exist /// public void RegisterPlayers(RegisterPlayersOptions options, object clientData, OnRegisterPlayersCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnRegisterPlayersCallbackInternal(OnRegisterPlayersCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_RegisterPlayers(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Reject an invite from another player. /// /// Structure containing information about the invite to reject /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the reject invite operation completes, either successfully or in error /// /// if the invite rejection completes successfully /// if any of the options are incorrect /// if the invite does not exist /// public void RejectInvite(RejectInviteOptions options, object clientData, OnRejectInviteCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnRejectInviteCallbackInternal(OnRejectInviteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_RejectInvite(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Unregister from receiving notifications when a user accepts a session join game via the social overlay. /// /// Handle representing the registered callback public void RemoveNotifyJoinSessionAccepted(ulong inId) { Helper.TryRemoveCallbackByNotificationId(inId); Bindings.EOS_Sessions_RemoveNotifyJoinSessionAccepted(InnerHandle, inId); } /// /// Unregister from receiving notifications when a user accepts a session invite via the social overlay. /// /// Handle representing the registered callback public void RemoveNotifySessionInviteAccepted(ulong inId) { Helper.TryRemoveCallbackByNotificationId(inId); Bindings.EOS_Sessions_RemoveNotifySessionInviteAccepted(InnerHandle, inId); } /// /// Unregister from receiving session invites. /// /// Handle representing the registered callback public void RemoveNotifySessionInviteReceived(ulong inId) { Helper.TryRemoveCallbackByNotificationId(inId); Bindings.EOS_Sessions_RemoveNotifySessionInviteReceived(InnerHandle, inId); } /// /// Send an invite to another player. User must have created the session or be registered in the session or else the call will fail /// /// Structure containing information about the session and player to invite /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the send invite operation completes, either successfully or in error /// /// if the send invite completes successfully /// if any of the options are incorrect /// if the session to send the invite from does not exist /// public void SendInvite(SendInviteOptions options, object clientData, OnSendInviteCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnSendInviteCallbackInternal(OnSendInviteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_SendInvite(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Mark a session as started, making it unable to find if session properties indicate "join in progress" is not available /// /// Structure containing information about the session to be started /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the start operation completes, either successfully or in error /// /// if the start completes successfully /// if any of the options are incorrect /// if the session is out of sync and will be updated on the next connection with the backend /// if a session to be started does not exist /// public void StartSession(StartSessionOptions options, object clientData, OnStartSessionCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnStartSessionCallbackInternal(OnStartSessionCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_StartSession(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Unregister a group of players with the session, freeing up space for others to join /// /// Structure containing information about the session and players to be unregistered /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the unregistration operation completes, either successfully or in error /// /// if the unregister completes successfully /// if the players to unregister were not found /// if any of the options are incorrect /// if the session is out of sync and will be updated on the next connection with the backend /// if a session to be unregister players does not exist /// public void UnregisterPlayers(UnregisterPlayersOptions options, object clientData, OnUnregisterPlayersCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnUnregisterPlayersCallbackInternal(OnUnregisterPlayersCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_UnregisterPlayers(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Update a session given a session modification handle created by or /// /// Structure containing information about the session to be updated /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the update operation completes, either successfully or in error /// /// if the update completes successfully /// if any of the options are incorrect /// if the session is out of sync and will be updated on the next connection with the backend /// if a session to be updated does not exist /// public void UpdateSession(UpdateSessionOptions options, object clientData, OnUpdateSessionCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnUpdateSessionCallbackInternal(OnUpdateSessionCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sessions_UpdateSession(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } /// /// Creates a session modification handle (). The session modification handle is used to modify an existing session and can be applied with . /// The must be released by calling once it is no longer needed. /// /// /// /// /// Required fields such as session name /// Pointer to a Session Modification Handle only set if successful /// /// if we successfully created the Session Modification Handle pointed at in OutSessionModificationHandle, or an error result if the input data was invalid /// public Result UpdateSessionModification(UpdateSessionModificationOptions options, out SessionModification outSessionModificationHandle) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSessionModificationHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sessions_UpdateSessionModification(InnerHandle, optionsAddress, ref outSessionModificationHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outSessionModificationHandleAddress, out outSessionModificationHandle); return funcResult; } [MonoPInvokeCallback(typeof(OnDestroySessionCallbackInternal))] internal static void OnDestroySessionCallbackInternalImplementation(System.IntPtr data) { OnDestroySessionCallback callback; DestroySessionCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnEndSessionCallbackInternal))] internal static void OnEndSessionCallbackInternalImplementation(System.IntPtr data) { OnEndSessionCallback callback; EndSessionCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnJoinSessionAcceptedCallbackInternal))] internal static void OnJoinSessionAcceptedCallbackInternalImplementation(System.IntPtr data) { OnJoinSessionAcceptedCallback callback; JoinSessionAcceptedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnJoinSessionCallbackInternal))] internal static void OnJoinSessionCallbackInternalImplementation(System.IntPtr data) { OnJoinSessionCallback callback; JoinSessionCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnQueryInvitesCallbackInternal))] internal static void OnQueryInvitesCallbackInternalImplementation(System.IntPtr data) { OnQueryInvitesCallback callback; QueryInvitesCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnRegisterPlayersCallbackInternal))] internal static void OnRegisterPlayersCallbackInternalImplementation(System.IntPtr data) { OnRegisterPlayersCallback callback; RegisterPlayersCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnRejectInviteCallbackInternal))] internal static void OnRejectInviteCallbackInternalImplementation(System.IntPtr data) { OnRejectInviteCallback callback; RejectInviteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnSendInviteCallbackInternal))] internal static void OnSendInviteCallbackInternalImplementation(System.IntPtr data) { OnSendInviteCallback callback; SendInviteCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnSessionInviteAcceptedCallbackInternal))] internal static void OnSessionInviteAcceptedCallbackInternalImplementation(System.IntPtr data) { OnSessionInviteAcceptedCallback callback; SessionInviteAcceptedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnSessionInviteReceivedCallbackInternal))] internal static void OnSessionInviteReceivedCallbackInternalImplementation(System.IntPtr data) { OnSessionInviteReceivedCallback callback; SessionInviteReceivedCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnStartSessionCallbackInternal))] internal static void OnStartSessionCallbackInternalImplementation(System.IntPtr data) { OnStartSessionCallback callback; StartSessionCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnUnregisterPlayersCallbackInternal))] internal static void OnUnregisterPlayersCallbackInternalImplementation(System.IntPtr data) { OnUnregisterPlayersCallback callback; UnregisterPlayersCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } [MonoPInvokeCallback(typeof(OnUpdateSessionCallbackInternal))] internal static void OnUpdateSessionCallbackInternalImplementation(System.IntPtr data) { OnUpdateSessionCallback callback; UpdateSessionCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } } }