Removed strayed code fragment
[strongswan.git] / src / charon / plugins / nm / nm_handler.h
1 /*
2 * Copyright (C) 2009 Martin Willi
3 * 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 nm_handler nm_handler
18 * @{ @ingroup nm
19 */
20
21 #ifndef NM_HANDLER_H_
22 #define NM_HANDLER_H_
23
24 #include <attributes/attribute_handler.h>
25
26 typedef struct nm_handler_t nm_handler_t;
27
28 /**
29 * Handles DNS/NBNS attributes to pass to NM.
30 */
31 struct nm_handler_t {
32
33 /**
34 * Implements attribute handler interface
35 */
36 attribute_handler_t handler;
37
38 /**
39 * Create an enumerator over received attributes of a given kind.
40 *
41 * @param type type of attributes to enumerate
42 * @return enumerator over attribute data (chunk_t)
43 */
44 enumerator_t* (*create_enumerator)(nm_handler_t *this,
45 configuration_attribute_type_t type);
46 /**
47 * Reset state, flush all received attributes.
48 */
49 void (*reset)(nm_handler_t *this);
50
51 /**
52 * Destroy a nm_handler_t.
53 */
54 void (*destroy)(nm_handler_t *this);
55 };
56
57 /**
58 * Create a nm_handler instance.
59 */
60 nm_handler_t *nm_handler_create();
61
62 #endif /** NM_HANDLER_H_ @}*/