Main Page | Modules | Class List | File List | Class Members | File Members

Results fetching
[Ladder Query Service]

Get the entries requested when a request completed successfully. More...

Functions

GSbool LadderQuery_GetResultSearchCount (GSuint uiRequestID, GSuint &uiCount)
 Get the request search count.

GSbool LadderQuery_GetResultEntryCount (GSuint uiRequestID, GSuint &uiCount)
 Get the request entry count.

GSbool LadderQuery_GetResultFieldCaption (GSuint uiRequestID, const GSchar *pszField, GSchar *pszCaption)
 Get the pretty name of a field.

GSbool LadderQuery_StartResultEntryEnumeration (GSuint uiRequestID, GSuint uiStartEntry=0)
 Start the entry enumeration.

GSbool LadderQuery_NextResultEntry (GSuint uiRequestID)
 Move the results set pointer to the next entry (iteration).

GSbool LadderQuery_GetCurrentEntryField (GSuint uiRequestID, const GSchar *pszField, GSint &iValue)
 Get the current numeric field value.

GSbool LadderQuery_GetCurrentEntryFieldAsString (GSuint uiRequestID, const GSchar *pszField, GSchar *pszValue)
 Get the current field value in a string format.

GSvoid LadderQuery_ReleaseResult (GSuint uiRequestID)
 Release the results set from memory.


Detailed Description

These functions are used to fetch results from a request that came back to the client library.

Function Documentation

GSbool LadderQuery_GetCurrentEntryField GSuint  uiRequestID,
const GSchar *  pszField,
GSint &  iValue
 

Description:
This function is used to get the numeric field value currently pointed by the results set pointer. It is used in conjonction with LadderQuery_NextResultEntry() to iterate through the list of entries in the results set and get their values. NOTE: If the entry is a character string, this function will return GS_FALSE.
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.
pszField Pointer to a character string representing the field name.
iValue [OUT] The numeric field value retrieved.

GSbool LadderQuery_GetCurrentEntryFieldAsString GSuint  uiRequestID,
const GSchar *  pszField,
GSchar *  pszValue
 

Description:
This function is used to get the field value currently pointed by the results set pointer in a string format. It is used in conjonction with LadderQuery_NextResultEntry() to iterate through the list of entries in the results set and get their values.
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.
pszField Pointer to a character string representing the field name.
pszValue [OUT] Pointer to a character string representing the field value.

GSbool LadderQuery_GetResultEntryCount GSuint  uiRequestID,
GSuint &  uiCount
 

Description:
This function will return the number of entries that were returned as part of the results set.
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.
uiCount [OUT] The number of entries in the results set.

GSbool LadderQuery_GetResultFieldCaption GSuint  uiRequestID,
const GSchar *  pszField,
GSchar *  pszCaption
 

Description:
This function will get the name of a field like it should be displayed in the game (pretty name). Example: Field name "TIME" = Field caption "Total time played"
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.
pszField Pointer to a character string representing the field name to identify.
pszCaption [OUT] Pointer to a character string that will represent the field caption on success.

GSbool LadderQuery_GetResultSearchCount GSuint  uiRequestID,
GSuint &  uiCount
 

Description:
This function will return the number of valid entries that were found on server for the request that was sent. This number may differ from the number of entries returned in the results set. See LadderQuery_GetResultEntryCount().
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.
uiCount [OUT] The number of entries matching the request specifications.

GSbool LadderQuery_NextResultEntry GSuint  uiRequestID  ) 
 

Description:
This function will move the results set pointer to the next entry in the list of entries received. It is used in conjonction with LadderQuery_GetCurrentEntryField() and LadderQuery_GetCurrentEntryFieldAsString() to iterate through the list of entries in the results set and get their values.
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.

GSvoid LadderQuery_ReleaseResult GSuint  uiRequestID  ) 
 

Description:
This function is used to release the results received from the server after no more operations on the results set need to be done. Each successfull request triggers a memory allocation for the results, these results need to be flushed when they are not used anymore.
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.

GSbool LadderQuery_StartResultEntryEnumeration GSuint  uiRequestID,
GSuint  uiStartEntry = 0
 

Description:
This function will initialise the enumeration of entries received in the results set. This call is important and must be done before any call to LadderQuery_NextResultEntry() , LadderQuery_GetCurrentEntryField() , and LadderQuery_GetCurrentEntryFieldAsString() . NOTE: Since you can call this function multiple times without modifying the results set, you can use this function to get the results in the order you want by modifying the uiStartEntry parameter.
Returns:
Status of the function call
Return values:
GS_TRUE Success
GS_FALSE Failure
Parameters:
uiRequestID The request identifier supplied in the callback.
uiStartEntry The index of the entry where the enumeration will start.


Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team