2 * Copyright (C) 2012 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
18 * @defgroup imv_os_database_t imv_os_database
19 * @{ @ingroup imv_os_database
22 #ifndef IMV_OS_DATABASE_H_
23 #define IMV_OS_DATABASE_H_
25 #include "imv_os_state.h"
29 typedef struct imv_os_database_t imv_os_database_t
;
32 * Internal state of an imv_os_database_t instance
34 struct imv_os_database_t
{
37 * Check Installed Packages for a given OS
39 * @param state OS IMV state
40 * @param package_enumerator enumerates over installed packages
42 status_t (*check_packages
)(imv_os_database_t
*this, imv_os_state_t
*state
,
43 enumerator_t
*package_enumerator
);
46 * Get the primary database key of the device ID
48 * @param value Device ID value
50 int (*get_device_id
)(imv_os_database_t
*this, chunk_t value
);
53 * Destroys an imv_os_database_t object.
55 void (*destroy
)(imv_os_database_t
*this);
60 * Create an imv_os_database_t instance
62 * @param uri database uri
64 imv_os_database_t
* imv_os_database_create(char *uri
);
66 #endif /** IMV_OS_DATABASE_H_ @}*/