]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libcharon / plugins / tnc_ifmap / tnc_ifmap_soap_msg.h
1 /*
2 * Copyright (C) 2013 Andreas Steffen
3 *
4 * Copyright (C) secunet Security Networks AG
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 /**
18 * @defgroup tnc_ifmap_soap_msg tnc_ifmap_soap_msg
19 * @{ @ingroup tnc_ifmap
20 */
21
22 #ifndef TNC_IFMAP_SOAP_MSG_H_
23 #define TNC_IFMAP_SOAP_MSG_H_
24
25 #include <library.h>
26 #include <tls_socket.h>
27
28 #include <libxml/parser.h>
29
30 typedef struct tnc_ifmap_soap_msg_t tnc_ifmap_soap_msg_t;
31
32 /**
33 * Interface for sending and receiving SOAP-XML messages
34 */
35 struct tnc_ifmap_soap_msg_t {
36
37 /**
38 * Post an IF-MAP request in a SOAP-XML message and return a result
39 *
40 * @param request XML-encoded IF-MAP request
41 * @param result_name name of the IF-MAP result
42 * @param result XML-encoded IF-MAP result
43 */
44 bool (*post)(tnc_ifmap_soap_msg_t *this, xmlNodePtr request,
45 char *result_name, xmlNodePtr* result);
46
47 /**
48 * Destroy a tnc_ifmap_soap_msg_t object.
49 */
50 void (*destroy)(tnc_ifmap_soap_msg_t *this);
51 };
52
53 /**
54 * Create a tnc_ifmap_soap_msg instance.
55 *
56 * @param uri HTTPS URI with https:// prefix removed
57 * @param user_pass Optional username:password for HTTP Basic Authentication
58 * @param tls TLS socket protecting the SOAP message
59 */
60 tnc_ifmap_soap_msg_t *tnc_ifmap_soap_msg_create(char *uri, chunk_t user_pass,
61 tls_socket_t *tls);
62
63 #endif /** TNC_IFMAP_SOAP_MSG_H_ @}*/