Debian Codegraph @

src/cd-device-db.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2011 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU General Public License Version 2
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #ifndef __CD_DEVICE_DB_H
23 #define __CD_DEVICE_DB_H
24
25 #include <glib-object.h>
26
27 G_BEGIN_DECLS
28
29 #define CD_TYPE_DEVICE_DB (cd_device_db_get_type ())
30 G_DECLARE_DERIVABLE_TYPE (CdDeviceDb, cd_device_db, CD, DEVICE_DB, GObject)
31
32 struct _CdDeviceDbClass
33 {
34 GObjectClass parent_class;
35 };
36
37 CdDeviceDb *cd_device_db_new (void);
38
39 gboolean cd_device_db_load (CdDeviceDb *ddb,
40 const gchar *filename,
41 GError **error)
42 G_GNUC_WARN_UNUSED_RESULT;
43 gboolean cd_device_db_empty (CdDeviceDb *ddb,
44 GError **error)
45 G_GNUC_WARN_UNUSED_RESULT;
46 gboolean cd_device_db_add (CdDeviceDb *ddb,
47 const gchar *device_id,
48 GError **error)
49 G_GNUC_WARN_UNUSED_RESULT;
50 gboolean cd_device_db_set_property (CdDeviceDb *ddb,
51 const gchar *device_id,
52 const gchar *property,
53 const gchar *value,
54 GError **error)
55 G_GNUC_WARN_UNUSED_RESULT;
56 gchar *cd_device_db_get_property (CdDeviceDb *ddb,
57 const gchar *device_id,
58 const gchar *property,
59 GError **error)
60 G_GNUC_WARN_UNUSED_RESULT;
61 gboolean cd_device_db_remove (CdDeviceDb *ddb,
62 const gchar *device_id,
63 GError **error)
64 G_GNUC_WARN_UNUSED_RESULT;
65 GPtrArray *cd_device_db_get_devices (CdDeviceDb *ddb,
66 GError **error)
67 G_GNUC_WARN_UNUSED_RESULT;
68 GPtrArray *cd_device_db_get_properties (CdDeviceDb *ddb,
69 const gchar *device_id,
70 GError **error)
71 G_GNUC_WARN_UNUSED_RESULT;
72
73 G_END_DECLS
74
75 #endif /* __CD_DEVICE_DB_H */