already had the correct formatting
[strongswan.git] / src / pluto / library.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: library.h 5003 2009-03-24 17:43:01Z martin $
16 */
17
18 #ifndef LIBRARY_H_
19 #define LIBRARY_H_
20
21 #include <utils.h>
22 #include <settings.h>
23
24 typedef struct library_t library_t;
25
26 /**
27 * Libstrongswan library context, contains library relevant globals.
28 */
29 struct library_t {
30
31 /**
32 * Printf hook registering facility
33 */
34 printf_hook_t *printf_hook;
35
36 /**
37 * various settings loaded from settings file
38 */
39 settings_t *settings;
40
41 /**
42 * is leak detective running?
43 */
44 bool leak_detective;
45 };
46
47 /**
48 * Initialize library, creates "lib" instance.
49 *
50 * @param settings file to read settings from, may be NULL for none
51 */
52 void library_init(char *settings);
53
54 /**
55 * Deinitialize library, destroys "lib" instance.
56 */
57 void library_deinit();
58
59 /**
60 * Library instance, set after between library_init() and library_deinit() calls.
61 */
62 extern library_t *lib;
63
64 #endif /** LIBRARY_H_ @}*/