splitted stroke plugin to several files:
[strongswan.git] / src / charon / plugins / stroke / stroke_config.h
1 /*
2 * Copyright (C) 2008 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 * $Id$
16 */
17
18 /**
19 * @defgroup stroke_config stroke_config
20 * @{ @ingroup stroke
21 */
22
23 #ifndef STROKE_CONFIG_H_
24 #define STROKE_CONFIG_H_
25
26 #include <config/backend.h>
27 #include <stroke_msg.h>
28 #include "stroke_cred.h"
29
30 typedef struct stroke_config_t stroke_config_t;
31
32 /**
33 * Stroke in-memory configuration backend
34 */
35 struct stroke_config_t {
36
37 /**
38 * Implements the backend_t interface
39 */
40 backend_t backend;
41
42 /**
43 * Add a configuration to the backend.
44 *
45 * @param msg received stroke message containing config
46 */
47 void (*add)(stroke_config_t *this, stroke_msg_t *msg);
48
49 /**
50 * Remove a configuration from the backend.
51 *
52 * @param msg received stroke message containing config name
53 */
54 void (*del)(stroke_config_t *this, stroke_msg_t *msg);
55
56 /**
57 * Destroy a stroke_config instance.
58 */
59 void (*destroy)(stroke_config_t *this);
60 };
61
62 /**
63 * Create a stroke_config instance.
64 */
65 stroke_config_t *stroke_config_create(stroke_cred_t *cred);
66
67 #endif /* STROKE_CONFIG_H_ @}*/