4771a0cffb60f5b14f73e9cee256afe81b327e6e
[strongswan.git] / src / charon / config / backends / writeable_backend.h
1 /**
2 * @file writeable_backend.h
3 *
4 * @brief Interface of writeable_backend_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2007 Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 */
22
23 #ifndef WRITEABLE_BACKEND_H_
24 #define WRITEABLE_BACKEND_H_
25
26 typedef struct writeable_backend_t writeable_backend_t;
27
28 #include <library.h>
29 #include <config/backends/backend.h>
30
31 /**
32 * @brief A writeable backend extends the backend by modification functions.
33 *
34 * @b Constructors:
35 * - writeable_backend_create()
36 *
37 * @ingroup backends
38 */
39 struct writeable_backend_t {
40
41 /**
42 * Implements backend_t interface
43 */
44 backend_t backend;
45
46 /**
47 * @brief Add a peer_config to the backend.
48 *
49 * @param this calling object
50 * @param config peer_config to add to the backend
51 */
52 void (*add_cfg)(writeable_backend_t *this, peer_cfg_t *config);
53
54 /**
55 * @brief Create an iterator over all peer configs.
56 *
57 * @param this calling object
58 * @return iterator over peer configs
59 */
60 iterator_t* (*create_iterator)(writeable_backend_t *this);
61 };
62
63 #endif /* WRITEABLE_BACKEND_H_ */
64