sbrcsr  3.2.0
ATOMAS sbrcsr
Response Message

A Response message contains one or more sbr_Sbdm objects. More...

Typedefs

typedef struct _sbr_Response sbr_Response
 The CSR response object for a given sbr_CsrRequest.
 

Functions

SBR_CSR_EXPORT int sbr_res_xml (ato_Ctx *ctx, sbr_Response *response, char **buffer)
 This is a convenience method to extract the entire response as an XML string. More...
 
SBR_CSR_EXPORT size_t sbr_res_sbdm_count (sbr_Response *response)
 Return the number of sbr_Sbdm objects in the response. More...
 
SBR_CSR_EXPORT void sbr_res_sbdm_iterator (sbr_Response *response, ato_Iterator **iter)
 Create an iterator for the collection of sbdms - caller must free. More...
 
SBR_CSR_EXPORT sbr_Sbdmsbr_res_sbdm_firstv (sbr_Response *response)
 Get the first sbdm of the collection. More...
 
SBR_CSR_EXPORT sbr_Sbdmsbr_res_sbdm_nextv (sbr_Response *response)
 Get the next sbdm of the collection. More...
 
SBR_CSR_EXPORT bool sbr_res_ismaxseveritycode (sbr_Response *response, const char *severitycode)
 Search the maxseveritycode for all sbdms for the given value (response only). More...
 

Detailed Description

A Response message contains one or more sbr_Sbdm objects.

Function Documentation

◆ sbr_res_xml()

SBR_CSR_EXPORT int sbr_res_xml ( ato_Ctx ctx,
sbr_Response response,
char **  buffer 
)

This is a convenience method to extract the entire response as an XML string.

Parameters
ctxthe current thread local Context.
responsethe CSR Response object.
bufferthe address of the string buffer to put the response into.
Returns
ATO_ERR_OK or an error code. Use ato_errdef_name() to get the code as a string.

◆ sbr_res_sbdm_count()

SBR_CSR_EXPORT size_t sbr_res_sbdm_count ( sbr_Response response)

Return the number of sbr_Sbdm objects in the response.

Parameters
responsethe response object.
Returns
number of Sbdm objects.

◆ sbr_res_sbdm_iterator()

SBR_CSR_EXPORT void sbr_res_sbdm_iterator ( sbr_Response response,
ato_Iterator **  iter 
)

Create an iterator for the collection of sbdms - caller must free.

This is useful if a collection is being shared between threads and each thread has its own iterator.

If this is not the case then the sbr_res_sbdm_firstv() and sbr_res_sbdm_nextv() methods are simpler and this method can be ignored.

Parameters
responsethe response object.
iterthe address of the iterator to create - *iter must be NULL. This will be NULL if there is no collection.

◆ sbr_res_sbdm_firstv()

SBR_CSR_EXPORT sbr_Sbdm* sbr_res_sbdm_firstv ( sbr_Response response)

Get the first sbdm of the collection.

This also initialises the iterator associated with the current sbdms.

Parameters
responsethe response object.
Returns
an sbdm or NULL if none.

◆ sbr_res_sbdm_nextv()

SBR_CSR_EXPORT sbr_Sbdm* sbr_res_sbdm_nextv ( sbr_Response response)

Get the next sbdm of the collection.

Parameters
responsethe response object.
Returns
an sbdm or NULL if none.

◆ sbr_res_ismaxseveritycode()

SBR_CSR_EXPORT bool sbr_res_ismaxseveritycode ( sbr_Response response,
const char *  severitycode 
)

Search the maxseveritycode for all sbdms for the given value (response only).

The search is case-insensitive. This will return FALSE if called on a request sbdm.

Parameters
responsethe response object.
severitycodethe severity string to search for e.g. "error".
Returns
TRUE if the supplied value is matched else FALSE.