last patch removed, changed CURLOPT_FILE to CURLOPT_WRITEDATA
[strongswan.git] / src / charon / config / configuration.h
1 /**
2 * @file configuration.h
3 *
4 * @brief Interface configuration_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2006 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 CONFIGURATION_H_
24 #define CONFIGURATION_H_
25
26 typedef struct configuration_t configuration_t;
27
28 #include <library.h>
29
30 /**
31 * @brief The interface for various daemon related configs.
32 *
33 * @b Constructors:
34 * - configuration_create()
35 *
36 * @ingroup config
37 */
38 struct configuration_t {
39
40 /**
41 * @brief Returns the retransmit timeout.
42 *
43 * A return value of zero means the request should not be
44 * retransmitted again.
45 *
46 * @param this calling object
47 * @param retransmitted number of times a message was retransmitted so far
48 * @return time in milliseconds, when to do next retransmit
49 */
50 u_int32_t (*get_retransmit_timeout) (configuration_t *this,
51 u_int32_t retransmitted);
52
53 /**
54 * @brief Returns the timeout for an half open IKE_SA in ms.
55 *
56 * Half open means that the IKE_SA is still on a not established state
57 *
58 * @param this calling object
59 * @return timeout in milliseconds (ms)
60 */
61 u_int32_t (*get_half_open_ike_sa_timeout) (configuration_t *this);
62
63 /**
64 * @brief Returns the keepalive interval in ms.
65 *
66 * The keepalive interval defines the idle time after which a
67 * NAT keepalive packet should be sent.
68 *
69 * @param this calling object
70 * @return interval in seconds
71 */
72 u_int32_t (*get_keepalive_interval) (configuration_t *this);
73
74 /**
75 * @brief Destroys a configuration_t object.
76 *
77 * @param this calling object
78 */
79 void (*destroy) (configuration_t *this);
80 };
81
82 /**
83 * @brief Creates a configuration backend.
84 *
85 * @return static_configuration_t object
86 *
87 * @ingroup config
88 */
89 configuration_t *configuration_create(void);
90
91 #endif /*CONFIGURATION_H_*/