Class EOS_SessionSearch
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.sessions.EOS_SessionSearch
- All Implemented Interfaces:
com.sun.jna.NativeMapped,AutoCloseable
Class responsible for the creation, setup, and execution of a search query.
Search parameters are defined, the query is executed and the search results are returned within this object
- Since:
- 9/5/2023
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()copySearchResultByIndex(EOS_SessionSearch_CopySearchResultByIndexOptions options, EOS_SessionDetails outSessionHandle) EOS_SessionSearch_CopySearchResultByIndex is used to immediately retrieve a handle to the session information from a given search result.voidfind(EOS_SessionSearch_FindOptions options, com.sun.jna.Pointer clientData, EOS_SessionSearch_OnFindCallback completionDelegate) Find sessions matching the search criteria setup via this session search handle.intGet the number of search results found by the search parameters in this searchvoidrelease()Release the memory associated with a session search.Remove a parameter from the array of search criteria.Set the maximum number of search results to return in the query, can't be more thanEOS_SessionSearch_SetMaxResultsOptions.EOS_SESSIONS_MAX_SEARCH_RESULTSAdd a parameter to an array of search criteria combined via an implicit AND operator.Set a session ID to find and will return at most one search result.Set a target user ID to find and will return at most one search result.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_SessionSearch
public EOS_SessionSearch(com.sun.jna.Pointer address) -
EOS_SessionSearch
public EOS_SessionSearch()
-
-
Method Details
-
setSessionId
Set a session ID to find and will return at most one search result. Setting TargetUserId or SearchParameters will result in EOS_SessionSearch_Find failing- Parameters:
options- A specific session ID for which to search- Returns:
EOS_EResult.EOS_Successif setting this session ID was successful
EOS_EResult.EOS_InvalidParametersif the session ID is invalid or null
EOS_EResult.EOS_IncompatibleVersionif the API version passed in is incorrect
-
setTargetUserId
Set a target user ID to find and will return at most one search result. Setting SessionId or SearchParameters will result in EOS_SessionSearch_Find failing
A search result will only be found if this user is in a public session- Parameters:
options- a specific target user ID to find- Returns:
EOS_EResult.EOS_Successif setting this target user ID was successful
EOS_EResult.EOS_InvalidParametersif the target user ID is invalid or null
EOS_EResult.EOS_IncompatibleVersionif the API version passed in is incorrect
-
setParameter
Add a parameter to an array of search criteria combined via an implicit AND operator. Setting SessionId or TargetUserId will result in EOS_SessionSearch_Find failing- Parameters:
options- a search parameter and its comparison op- Returns:
EOS_EResult.EOS_Successif setting this search parameter was successful
EOS_EResult.EOS_InvalidParametersif the search criteria is invalid or null
EOS_EResult.EOS_IncompatibleVersionif the API version passed in is incorrect- See Also:
-
removeParameter
Remove a parameter from the array of search criteria.- Parameters:
options- a search parameter key name to remove- Returns:
EOS_EResult.EOS_Successif removing this search parameter was successful
EOS_EResult.EOS_InvalidParametersif the search key is invalid or null
EOS_EResult.EOS_NotFoundif the parameter was not a part of the search criteria
EOS_EResult.EOS_IncompatibleVersionif the API version passed in is incorrect
-
setMaxResults
Set the maximum number of search results to return in the query, can't be more thanEOS_SessionSearch_SetMaxResultsOptions.EOS_SESSIONS_MAX_SEARCH_RESULTS- Parameters:
options- maximum number of search results to return in the query- Returns:
EOS_EResult.EOS_Successif setting the max results was successful
EOS_EResult.EOS_InvalidParametersif the number of results requested is invalid
EOS_EResult.EOS_IncompatibleVersionif the API version passed in is incorrect
-
find
public void find(EOS_SessionSearch_FindOptions options, com.sun.jna.Pointer clientData, EOS_SessionSearch_OnFindCallback completionDelegate) Find sessions matching the search criteria setup via this session search handle. When the operation completes, this handle will have the search results that can be parsed- Parameters:
options- Structure containing information about the search criteria to useclientData- Arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- A callback that is fired when the search operation completes, either successfully or in error
-
getSearchResultCount
Get the number of search results found by the search parameters in this search- Parameters:
options- Options associated with the search count- Returns:
- return the number of search results found by the query or 0 if search is not complete
-
copySearchResultByIndex
public EOS_EResult copySearchResultByIndex(EOS_SessionSearch_CopySearchResultByIndexOptions options, EOS_SessionDetails outSessionHandle) EOS_SessionSearch_CopySearchResultByIndex is used to immediately retrieve a handle to the session information from a given search result. If the call returns an EOS_Success result, the out parameter, OutSessionHandle, must be passed to EOS_SessionDetails_Release to release the memory associated with it.- Parameters:
options- Structure containing the input parametersoutSessionHandle- out parameter used to receive the session handle- Returns:
EOS_EResult.EOS_Successif the information is available and passed out in OutSessionHandle
EOS_EResult.EOS_InvalidParametersif you pass an invalid index or a null pointer for the out parameter
EOS_EResult.EOS_IncompatibleVersionif the API version passed in is incorrect- See Also:
-
release
public void release()Release the memory associated with a session search. This must be called on data retrieved from EOS_Sessions_CreateSessionSearch. -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-