// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Lobby { public sealed partial class LobbySearch : Handle { public LobbySearch() { } public LobbySearch(System.IntPtr innerHandle) : base(innerHandle) { } /// /// The most recent version of the API. /// public const int LobbysearchCopysearchresultbyindexApiLatest = 1; /// /// The most recent version of the API. /// public const int LobbysearchFindApiLatest = 1; /// /// The most recent version of the API. /// public const int LobbysearchGetsearchresultcountApiLatest = 1; /// /// The most recent version of the API. /// public const int LobbysearchRemoveparameterApiLatest = 1; /// /// The most recent version of the API. /// public const int LobbysearchSetlobbyidApiLatest = 1; /// /// The most recent version of the API. /// public const int LobbysearchSetmaxresultsApiLatest = 1; /// /// The most recent version of the API. /// public const int LobbysearchSetparameterApiLatest = 1; /// /// The most recent version of the API. /// public const int LobbysearchSettargetuseridApiLatest = 1; /// /// is used to immediately retrieve a handle to the lobby information from a given search result. /// If the call returns an result, the out parameter, OutLobbyDetailsHandle, must be passed to to release the memory associated with it. /// /// /// /// Structure containing the input parameters /// out parameter used to receive the lobby details handle /// /// if the information is available and passed out in OutLobbyDetailsHandle /// if you pass an invalid index or a null pointer for the out parameter /// if the API version passed in is incorrect /// public Result CopySearchResultByIndex(ref LobbySearchCopySearchResultByIndexOptions options, out LobbyDetails outLobbyDetailsHandle) { LobbySearchCopySearchResultByIndexOptionsInternal optionsInternal = new LobbySearchCopySearchResultByIndexOptionsInternal(); optionsInternal.Set(ref options); var outLobbyDetailsHandleAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_LobbySearch_CopySearchResultByIndex(InnerHandle, ref optionsInternal, ref outLobbyDetailsHandleAddress); Helper.Dispose(ref optionsInternal); Helper.Get(outLobbyDetailsHandleAddress, out outLobbyDetailsHandle); return funcResult; } /// /// Find lobbies matching the search criteria setup via this lobby search handle. /// When the operation completes, this handle will have the search results that can be parsed /// /// Structure containing information about the search criteria to use /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the search operation completes, either successfully or in error /// /// if the find operation completes successfully /// if searching for an individual lobby by lobby ID or target user ID returns no results /// if any of the options are incorrect /// public void Find(ref LobbySearchFindOptions options, object clientData, LobbySearchOnFindCallback completionDelegate) { LobbySearchFindOptionsInternal optionsInternal = new LobbySearchFindOptionsInternal(); optionsInternal.Set(ref options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new LobbySearchOnFindCallbackInternal(OnFindCallbackInternalImplementation); Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_LobbySearch_Find(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.Dispose(ref optionsInternal); } /// /// Get the number of search results found by the search parameters in this search /// /// Options associated with the search count /// /// return the number of search results found by the query or 0 if search is not complete /// public uint GetSearchResultCount(ref LobbySearchGetSearchResultCountOptions options) { LobbySearchGetSearchResultCountOptionsInternal optionsInternal = new LobbySearchGetSearchResultCountOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_LobbySearch_GetSearchResultCount(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Release the memory associated with a lobby search. This must be called on data retrieved from . /// /// /// - The lobby search handle to release public void Release() { Bindings.EOS_LobbySearch_Release(InnerHandle); } /// /// Remove a parameter from the array of search criteria. /// /// a search parameter key name to remove /// /// if removing this search parameter was successful /// if the search key is invalid or null /// if the parameter was not a part of the search criteria /// if the API version passed in is incorrect /// public Result RemoveParameter(ref LobbySearchRemoveParameterOptions options) { LobbySearchRemoveParameterOptionsInternal optionsInternal = new LobbySearchRemoveParameterOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_LobbySearch_RemoveParameter(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Set a lobby ID to find and will return at most one search result. Setting TargetUserId or SearchParameters will result in failing /// /// A specific lobby ID for which to search /// /// if setting this lobby ID was successful /// if the lobby ID is invalid or null /// if the API version passed in is incorrect /// public Result SetLobbyId(ref LobbySearchSetLobbyIdOptions options) { LobbySearchSetLobbyIdOptionsInternal optionsInternal = new LobbySearchSetLobbyIdOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_LobbySearch_SetLobbyId(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Set the maximum number of search results to return in the query, can't be more than /// /// maximum number of search results to return in the query /// /// if setting the max results was successful /// if the number of results requested is invalid /// if the API version passed in is incorrect /// public Result SetMaxResults(ref LobbySearchSetMaxResultsOptions options) { LobbySearchSetMaxResultsOptionsInternal optionsInternal = new LobbySearchSetMaxResultsOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_LobbySearch_SetMaxResults(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Add a parameter to an array of search criteria combined via an implicit AND operator. Setting LobbyId or TargetUserId will result in failing /// /// /// /// a search parameter and its comparison op /// /// if setting this search parameter was successful /// if the search criteria is invalid or null /// if the API version passed in is incorrect /// public Result SetParameter(ref LobbySearchSetParameterOptions options) { LobbySearchSetParameterOptionsInternal optionsInternal = new LobbySearchSetParameterOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_LobbySearch_SetParameter(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// Set a target user ID to find. Setting LobbyId or SearchParameters will result in failing /// a search result will only be found if this user is in a public lobby /// /// a specific target user ID to find /// /// if setting this target user ID was successful /// if the target user ID is invalid or null /// if the API version passed in is incorrect /// public Result SetTargetUserId(ref LobbySearchSetTargetUserIdOptions options) { LobbySearchSetTargetUserIdOptionsInternal optionsInternal = new LobbySearchSetTargetUserIdOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_LobbySearch_SetTargetUserId(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } [MonoPInvokeCallback(typeof(LobbySearchOnFindCallbackInternal))] internal static void OnFindCallbackInternalImplementation(ref LobbySearchFindCallbackInfoInternal data) { LobbySearchOnFindCallback callback; LobbySearchFindCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo)) { callback(ref callbackInfo); } } } }