Added add_segment() method to TCG/SEG attributes
[strongswan.git] / src / libimcv / ita / ita_attr_get_settings.h
1 /*
2 * Copyright (C) 2012-2014 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 ita_attr_get_settings ita_attr_get_settings
18 * @{ @ingroup ita_attr
19 */
20
21 #ifndef ITA_ATTR_GET_SETTINGS_H_
22 #define ITA_ATTR_GET_SETTINGS_H_
23
24 typedef struct ita_attr_get_settings_t ita_attr_get_settings_t;
25
26 #include "pa_tnc/pa_tnc_attr.h"
27
28 /**
29 * Class implementing the ITA Get Settings PA-TNC attribute.
30 *
31 */
32 struct ita_attr_get_settings_t {
33
34 /**
35 * Public PA-TNC attribute interface
36 */
37 pa_tnc_attr_t pa_tnc_attribute;
38
39 /**
40 * Add a setting request to the list
41 *
42 * @param name name of the requested setting
43 */
44 void (*add)(ita_attr_get_settings_t *this, char *name);
45
46 /**
47 * Return an enumerator over all requested settings
48 *
49 * @return enumerator returns char *name
50 */
51 enumerator_t* (*create_enumerator)(ita_attr_get_settings_t *this);
52 };
53
54 /**
55 * Creates an ita_attr_get_settings_t object with an optional first entry
56 *
57 * @param name name of the requested setting or NULL
58 */
59 pa_tnc_attr_t* ita_attr_get_settings_create(char *name);
60
61 /**
62 * Creates an ita_attr_get_settings_t object from received data
63 *
64 * @param length Total length of attribute value
65 * @param value Unparsed attribute value (might be a segment)
66 */
67 pa_tnc_attr_t* ita_attr_get_settings_create_from_data(size_t length,
68 chunk_t value);
69
70 #endif /** ITA_ATTR_GET_SETTINGS_H_ @}*/