Increase version to 0.10.3
[libisds.git] / src / soap.h
blob37aff4b98b3461f9e4ff135ab9ccb7083f1ed408
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 length of the base
37 * URL found in @context, second argument is the base URL, third argument is
38 * again the base URL.
39 * XXX: We cannot use "$" formatting character because it's not in the ISO C99.
40 * @new_url is newly allocated URL built from @template. Caller must free it.
41 * Return IE_SUCCESS, or corresponding error code and @new_url will not be
42 * allocated.
43 * */
44 isds_error _isds_build_url_from_context(struct isds_ctx *context,
45 const char *template, char **new_url);
47 /* Invalidate session cookie for otp authenticated @context */
48 isds_error _isds_invalidate_otp_cookie(struct isds_ctx *context);
50 #endif