Moved scheduler_t to libhydra.
[strongswan.git] / src / libhydra / hydra.h
1 /*
2 * Copyright (C) 2010 Tobias Brunner
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 libhydra libhydra
18 *
19 * @defgroup attributes attributes
20 * @ingroup libhydra
21 *
22 * @defgroup hplugins plugins
23 * @ingroup libhydra
24 *
25 * @defgroup hprocessing processing
26 * @ingroup libhydra
27 *
28 * @defgroup hjobs jobs
29 * @ingroup hprocessing
30 *
31 * @addtogroup libhydra
32 * @{
33 */
34
35 #ifndef HYDRA_H_
36 #define HYDRA_H_
37
38 typedef struct hydra_t hydra_t;
39
40 #include <attributes/attribute_manager.h>
41 #include <processing/processor.h>
42 #include <processing/scheduler.h>
43
44 #include <library.h>
45
46 /**
47 * IKE Daemon support object.
48 */
49 struct hydra_t {
50
51 /**
52 * manager for payload attributes
53 */
54 attribute_manager_t *attributes;
55
56 /**
57 * process jobs using a thread pool
58 */
59 processor_t *processor;
60
61 /**
62 * schedule jobs
63 */
64 scheduler_t *scheduler;
65
66 /**
67 * name of the daemon that initialized the library
68 */
69 const char *daemon;
70 };
71
72 /**
73 * The single instance of hydra_t.
74 *
75 * Set between calls to libhydra_init() and libhydra_deinit() calls.
76 */
77 extern hydra_t *hydra;
78
79 /**
80 * Initialize libhydra.
81 *
82 * The daemon's name is used to load daemon-specific settings.
83 *
84 * @param daemon name of the daemon that initializes the library
85 * @return FALSE if integrity check failed
86 */
87 bool libhydra_init(const char *daemon);
88
89 /**
90 * Deinitialize libhydra.
91 */
92 void libhydra_deinit();
93
94 #endif /** HYDRA_H_ @}*/