A Request message contains one or more sbr_Sbdm objects, as well as a Response (after a submit).
More...
|
#define | SBR_MTOM_THRESHOLD_DEFAULT 2000 |
| Default threshold to use for MTOM processing - see sbr_req_mtom_setsize().
|
|
|
typedef struct _sbr_Request | sbr_Request |
| The CSR request object used to submit a business report.
|
|
|
SBR_CSR_EXPORT int | sbr_req_create (ato_Ctx *ctx, sbr_Request **request, sbr_Csr *csr) |
| Create a CSR request object based on the service type and template information of the CSR object. More...
|
|
SBR_CSR_EXPORT void | sbr_req_free (sbr_Request *request) |
| Free the CSR request object if not NULL. More...
|
|
SBR_CSR_EXPORT int | sbr_req_xml (ato_Ctx *ctx, sbr_Request *request, char **buffer) |
| This is a convenience method to extract the entire request as an XML string. More...
|
|
SBR_CSR_EXPORT int | sbr_req_submit (ato_Ctx *ctx, sbr_Request *request, sbr_Response **response, ato_String *certificate, ato_String *privatekey, ato_String *prooftoken, ato_String *assertion) |
| Use a CSR request object to submit to the CSR service and return a CSR response. More...
|
|
SBR_CSR_EXPORT void | sbr_req_mtom_setsize (sbr_Request *request, size_t threshold) |
| Set whether or not to process the request through the MTOM filter. More...
|
|
SBR_CSR_EXPORT size_t | sbr_req_mtom_size (sbr_Request *request) |
| Return the current threshold size for processing content through MTOM. More...
|
|
SBR_CSR_EXPORT void | sbr_req_ssid_set (sbr_Request *request, const char *ssid) |
| Set the current softwareSubscriptionId value (copy taken), which may be NULL. More...
|
|
SBR_CSR_EXPORT const char * | sbr_req_ssid (sbr_Request *request) |
| Return the current softwareSubscriptionId value, which may be NULL. More...
|
|
SBR_CSR_EXPORT size_t | sbr_req_sbdm_count (sbr_Request *request) |
| Return the number of sbr_Sbdm objects in the request. More...
|
|
SBR_CSR_EXPORT void | sbr_req_sbdm_iterator (sbr_Request *request, ato_Iterator **iter) |
| Create an iterator for the collection of sbdms to use - caller must free. More...
|
|
SBR_CSR_EXPORT sbr_Sbdm * | sbr_req_sbdm_firstv (sbr_Request *request) |
| Get the first sbdm of the collection. More...
|
|
SBR_CSR_EXPORT sbr_Sbdm * | sbr_req_sbdm_nextv (sbr_Request *request) |
| Get the next sbdm of the collection. More...
|
|
SBR_CSR_EXPORT int | sbr_req_sbdm_add (ato_Ctx *ctx, sbr_Request *request, sbr_Sbdm **sbdm) |
| Create and add a new sbr_Sbdm object - not currently implemented. More...
|
|
SBR_CSR_EXPORT int | sbr_req_sbdm_remove (ato_Ctx *ctx, sbr_Request *request, sbr_Sbdm *sbdm) |
| Remove an existing sbr_Sbdm object - not currently implemented. More...
|
|
A Request message contains one or more sbr_Sbdm objects, as well as a Response (after a submit).
After sbr_req_submit() is called, assuming no errors, a Response object is created and returned to the caller. The Request object retains a handle to the Response object and will free it when freed itself or when the Request is resubmitted. The caller should never free the Response object. Only the last Response object is retained for each Request object.
◆ sbr_req_create()
Create a CSR request object based on the service type and template information of the CSR object.
Use sbr_req_free() to free.
- Parameters
-
ctx | the current thread local Context. |
request | the CSR request object. |
csr | the CSR service object used to construct the request. |
- Returns
- ATO_ERR_OK
◆ sbr_req_free()
SBR_CSR_EXPORT void sbr_req_free |
( |
sbr_Request * |
request | ) |
|
Free the CSR request object if not NULL.
- Parameters
-
request | the request object. If NULL do nothing. |
◆ sbr_req_xml()
This is a convenience method to extract the entire request as an XML string.
- Parameters
-
ctx | the current thread local Context. |
request | the request object. |
buffer | the address of the buffer to allocate - must be freed by the caller. |
- Returns
- ATO_ERR_OK or an error code.
◆ sbr_req_submit()
Use a CSR request object to submit to the CSR service and return a CSR response.
The set methods will assert if called AFTER a submit. To change values, create a new request.
- Parameters
-
ctx | the current thread local Context. |
request | the request object. |
response | the response object address (do not free) or NULL if none or an error occurred. |
certificate | X509 certificate |
privatekey | P8 private key |
prooftoken | prooftoken from an STS response |
assertion | encrypted assertion from an STS response |
- Returns
- ATO_ERR_OK or an error code.
◆ sbr_req_mtom_setsize()
SBR_CSR_EXPORT void sbr_req_mtom_setsize |
( |
sbr_Request * |
request, |
|
|
size_t |
threshold |
|
) |
| |
Set whether or not to process the request through the MTOM filter.
This will convert all (Base64) element values over the given threshold size to binary before sending to the CSR URL service endpoint. This typically applies to attachments.
- Parameters
-
request | the request object. |
threshold | the size, in bytes, of the value to apply the MTOM process to. If 0, turn off MTOM processing. For the default use the "#define" SBR_MTOM_THRESHOLD_DEFAULT. |
◆ sbr_req_mtom_size()
SBR_CSR_EXPORT size_t sbr_req_mtom_size |
( |
sbr_Request * |
request | ) |
|
Return the current threshold size for processing content through MTOM.
- Parameters
-
request | the request object. |
- Returns
- the current MTOM size. If 0 MTOM processing is disabled.
◆ sbr_req_ssid_set()
SBR_CSR_EXPORT void sbr_req_ssid_set |
( |
sbr_Request * |
request, |
|
|
const char * |
ssid |
|
) |
| |
Set the current softwareSubscriptionId value (copy taken), which may be NULL.
Clear existing value if any.
This element will be only included in the request if the value is not NULL.
- Parameters
-
request | the request object. |
ssid | softwareSubscriptionId value. |
◆ sbr_req_ssid()
SBR_CSR_EXPORT const char * sbr_req_ssid |
( |
sbr_Request * |
request | ) |
|
Return the current softwareSubscriptionId value, which may be NULL.
- Parameters
-
request | the request object. |
- Returns
- the current softwareSubscriptionId value.
◆ sbr_req_sbdm_count()
SBR_CSR_EXPORT size_t sbr_req_sbdm_count |
( |
sbr_Request * |
request | ) |
|
Return the number of sbr_Sbdm objects in the request.
- Parameters
-
request | the request object. |
- Returns
- number of Sbdm objects.
◆ sbr_req_sbdm_iterator()
Create an iterator for the collection of sbdms to use - 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_req_sbdm_firstv() and sbr_req_sbdm_nextv() methods are simpler and this method can be ignored.
- Parameters
-
request | the request object. |
iter | the address of the iterator to create - *iter must be NULL. This will be NULL if there is no collection. |
◆ sbr_req_sbdm_firstv()
Get the first sbdm of the collection.
This also initialises the iterator associated with the current sbdms.
- Parameters
-
request | the request object. |
- Returns
- an sbdm or NULL if none.
◆ sbr_req_sbdm_nextv()
Get the next sbdm of the collection.
- Parameters
-
request | the request object. |
- Returns
- an sbdm or NULL if none.
◆ sbr_req_sbdm_add()
Create and add a new sbr_Sbdm object - not currently implemented.
- Parameters
-
ctx | the current thread local Context. |
request | the request object. |
sbdm | the address of the Sbdm object to allocate - DO NOT free. The object will be freed when the request is freed or sbr_req_sbdm_remove() is used. |
- Returns
- ATO_ERR_OK or an error code.
◆ sbr_req_sbdm_remove()
Remove an existing sbr_Sbdm object - not currently implemented.
- Parameters
-
ctx | the current thread local Context. |
request | the request object. |
sbdm | the Sbdm object - DO NOT reference after this call. The object will be freed. |
- Returns
- ATO_ERR_OK or an error code.