Debian Codegraph @

src/cd-mapping-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_MAPPING_DB_H
23 #define __CD_MAPPING_DB_H
24
25 #include <glib-object.h>
26
27 G_BEGIN_DECLS
28
29 #define CD_TYPE_MAPPING_DB (cd_mapping_db_get_type ())
30 G_DECLARE_DERIVABLE_TYPE (CdMappingDb, cd_mapping_db, CD, MAPPING_DB, GObject)
31
32 struct _CdMappingDbClass
33 {
34 GObjectClass parent_class;
35 };
36
37 CdMappingDb *cd_mapping_db_new (void);
38
39 gboolean cd_mapping_db_load (CdMappingDb *mdb,
40 const gchar *filename,
41 GError **error)
42 G_GNUC_WARN_UNUSED_RESULT;
43 gboolean cd_mapping_db_empty (CdMappingDb *mdb,
44 GError **error)
45 G_GNUC_WARN_UNUSED_RESULT;
46 gboolean cd_mapping_db_clear_timestamp (CdMappingDb *mdb,
47 const gchar *device_id,
48 const gchar *profile_id,
49 GError **error)
50 G_GNUC_WARN_UNUSED_RESULT;
51 gboolean cd_mapping_db_add (CdMappingDb *mdb,
52 const gchar *device_id,
53 const gchar *profile_id,
54 GError **error)
55 G_GNUC_WARN_UNUSED_RESULT;
56 gboolean cd_mapping_db_remove (CdMappingDb *mdb,
57 const gchar *device_id,
58 const gchar *profile_id,
59 GError **error)
60 G_GNUC_WARN_UNUSED_RESULT;
61 GPtrArray *cd_mapping_db_get_profiles (CdMappingDb *mdb,
62 const gchar *device_id,
63 GError **error)
64 G_GNUC_WARN_UNUSED_RESULT;
65 GPtrArray *cd_mapping_db_get_devices (CdMappingDb *mdb,
66 const gchar *profile_id,
67 GError **error)
68 G_GNUC_WARN_UNUSED_RESULT;
69 guint64 cd_mapping_db_get_timestamp (CdMappingDb *mdb,
70 const gchar *device_id,
71 const gchar *profile_id,
72 GError **error)
73 G_GNUC_WARN_UNUSED_RESULT;
74
75 G_END_DECLS
76
77 #endif /* __CD_MAPPING_DB_H */