Annotation of embedaddon/strongswan/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2013 Andreas Steffen
3: * HSR Hochschule fuer Technik Rapperswil
4: *
5: * This program is free software; you can redistribute it and/or modify it
6: * under the terms of the GNU General Public License as published by the
7: * Free Software Foundation; either version 2 of the License, or (at your
8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * for more details.
14: */
15:
16: /**
17: * @defgroup tnc_ifmap_http tnc_ifmap_http
18: * @{ @ingroup tnc_ifmap
19: */
20:
21: #ifndef TNC_IFMAP_HTTP_H_
22: #define TNC_IFMAP_HTTP_H_
23:
24: #include <library.h>
25: #include <tls_socket.h>
26:
27: #include <libxml/parser.h>
28:
29: typedef struct tnc_ifmap_http_t tnc_ifmap_http_t;
30:
31: /**
32: * Interface for building and processing HTTP messages
33: */
34: struct tnc_ifmap_http_t {
35:
36: /**
37: * Build a HTTP POST message
38: *
39: * @param in input data
40: * @param out HTTP POST request
41: * @result status return code
42: */
43: status_t (*build)(tnc_ifmap_http_t *this, chunk_t *in, chunk_t *out);
44:
45: /**
46: * Receive a HTTP [chunked] response
47: *
48: * @param in [chunked] HTTP response
49: * @param out output data
50: * @result status return code
51: */
52: status_t (*process)(tnc_ifmap_http_t *this, chunk_t *in, chunk_t *out);
53:
54: /**
55: * Destroy a tnc_ifmap_http_t object.
56: */
57: void (*destroy)(tnc_ifmap_http_t *this);
58: };
59:
60: /**
61: * Create a tnc_ifmap_http instance.
62: *
63: * @param uri HTTPS URI with https:// prefix removed
64: * @param user_pass Optional username:password for HTTP Basic Authentication
65: */
66: tnc_ifmap_http_t *tnc_ifmap_http_create(char *uri, chunk_t user_pass);
67:
68: #endif /** TNC_IFMAP_HTTP_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>