Silent a signed-comparison warning when comparing against nodeNr
[libisds.git] / src / soap.h
blob2ce12a7ef0edb6a019ccbedfa08be121c4b46360
1 #ifndef __ISDS_SOAP_H__
2 #define __ISDS_SOAP_H__
4 #include "isds.h"
6 /* Close connection to server and destroy CURL handle associated
7 * with @context */
8 isds_error _isds_close_connection(struct isds_ctx *context);
10 /* Do SOAP request.
11 * @context holds the base URL,
12 * @file is a (CGI) file of SOAP URL,
13 * @request is XML node set with SOAP request body.
14 * @file must be NULL, @request should be NULL rather than empty, if they should
15 * not be signaled in the SOAP request.
16 * @response_document is an automatically allocated XML document whose subtree
17 * identified by @response_node_list holds the SOAP response body content. You
18 * must xmlFreeDoc() it. If you don't care pass NULL and also
19 * NULL @response_node_list.
20 * @response_node_list is a pointer to node set with SOAP response body
21 * content. The returned pointer points into @response_document to the first
22 * child of SOAP Body element. Pass NULL and NULL @response_document, if you
23 * don't care.
24 * @raw_response is automatically allocated bit stream with response body. Use
25 * NULL if you don't care
26 * @raw_response_length is size of @raw_response in bytes
27 * In case of error the response will be deallocated automatically.
28 * Side effect: message buffer */
29 isds_error _isds_soap(struct isds_ctx *context, const char *file,
30 const xmlNodePtr request,
31 xmlDocPtr *response_document, xmlNodePtr *response_node_list,
32 void **raw_response, size_t *raw_response_length);
34 /* Build new URL from current @context and template.
35 * @context is context carrying an URL
36 * @template is printf(3) format string. First argument is string of base URL
37 * found in @context, second argument is length of the base URL.
38 * @new_url is newly allocated URL built from @template. Caller must free it.
39 * Return IE_SUCCESS, or corresponding error code and @new_url will not be
40 * allocated.
41 * */
42 isds_error _isds_build_url_from_context(struct isds_ctx *context,
43 const char *template, char **new_url);
45 /* Invalidate session cookie for otp authenticated @context */
46 isds_error _isds_invalidate_otp_cookie(struct isds_ctx *context);
48 #endif