b532275c33a508bed585b8a1304563b8244286b3
[strongswan.git] / src / libcharon / tnc / imv / imv_manager.h
1 /*
2 * Copyright (C) 2010 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 imv_manager imv_manager
18 * @{ @ingroup imv
19 */
20
21 #ifndef IMV_MANAGER_H_
22 #define IMV_MANAGER_H_
23
24 #include "imv.h"
25
26 #include <library.h>
27
28 typedef struct imv_manager_t imv_manager_t;
29
30 /**
31 * The IMV manager controls all IMV instances.
32 */
33 struct imv_manager_t {
34
35 /**
36 * Add an IMV instance
37 *
38 * @param imv IMV instance
39 * @return TRUE if initialization successful
40 */
41 bool (*add)(imv_manager_t *this, imv_t *imv);
42
43 /**
44 * Notify all IMV instances
45 *
46 * @param state communicate the state a connection has reached
47 */
48 void (*notify_connection_change)(imv_manager_t *this,
49 TNC_ConnectionID id,
50 TNC_ConnectionState state);
51 /**
52 * Destroy an IMV manager and all its controlled instances.
53 */
54 void (*destroy)(imv_manager_t *this);
55 };
56
57 #endif /** IMV_MANAGER_H_ @}*/