00b35367bc7be8b53d9713adcd7ebb13696ffe7e
[strongswan.git] / src / libimcv / plugins / imv_os / imv_os_database.h
1 /*
2 * Copyright (C) 2012 Andreas Steffen
3 * HSR 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 *
18 * @defgroup imv_os_database_t imv_os_database
19 * @{ @ingroup imv_os_database
20 */
21
22 #ifndef IMV_OS_DATABASE_H_
23 #define IMV_OS_DATABASE_H_
24
25 #include "imv_os_state.h"
26
27 #include <library.h>
28
29 typedef struct imv_os_database_t imv_os_database_t;
30
31 /**
32 * Internal state of an imv_os_database_t instance
33 */
34 struct imv_os_database_t {
35
36 /**
37 * Check Installed Packages for a given OS
38 *
39 * @param state OS IMV state
40 * @param package_enumerator enumerates over installed packages
41 */
42 status_t (*check_packages)(imv_os_database_t *this, imv_os_state_t *state,
43 enumerator_t *package_enumerator);
44
45 /**
46 * Get the primary database key of the device ID
47 *
48 * @param value Device ID value
49 */
50 int (*get_device_id)(imv_os_database_t *this, chunk_t value);
51
52 /**
53 * Destroys an imv_os_database_t object.
54 */
55 void (*destroy)(imv_os_database_t *this);
56
57 };
58
59 /**
60 * Create an imv_os_database_t instance
61 *
62 * @param uri database uri
63 */
64 imv_os_database_t* imv_os_database_create(char *uri);
65
66 #endif /** IMV_OS_DATABASE_H_ @}*/