2 * Copyright (C) 2013 Andreas Steffen
4 * Copyright (C) secunet Security Networks AG
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>.
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
18 * @defgroup tnc_ifmap_soap_msg tnc_ifmap_soap_msg
19 * @{ @ingroup tnc_ifmap
22 #ifndef TNC_IFMAP_SOAP_MSG_H_
23 #define TNC_IFMAP_SOAP_MSG_H_
26 #include <tls_socket.h>
28 #include <libxml/parser.h>
30 typedef struct tnc_ifmap_soap_msg_t tnc_ifmap_soap_msg_t
;
33 * Interface for sending and receiving SOAP-XML messages
35 struct tnc_ifmap_soap_msg_t
{
38 * Post an IF-MAP request in a SOAP-XML message and return a result
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
44 bool (*post
)(tnc_ifmap_soap_msg_t
*this, xmlNodePtr request
,
45 char *result_name
, xmlNodePtr
* result
);
48 * Destroy a tnc_ifmap_soap_msg_t object.
50 void (*destroy
)(tnc_ifmap_soap_msg_t
*this);
54 * Create a tnc_ifmap_soap_msg instance.
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
60 tnc_ifmap_soap_msg_t
*tnc_ifmap_soap_msg_create(char *uri
, chunk_t user_pass
,
63 #endif /** TNC_IFMAP_SOAP_MSG_H_ @}*/