docs: Clarify error values for empty files when loading
[dconf.git] / gvdb-reader.h
blob39827737d94dc7889e53b609c25c7ac8e2b3b870
1 /*
2 * Copyright © 2010 Codethink Limited
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 * Author: Ryan Lortie <desrt@desrt.ca>
20 #ifndef __gvdb_reader_h__
21 #define __gvdb_reader_h__
23 #include <glib.h>
25 typedef struct _GvdbTable GvdbTable;
27 G_BEGIN_DECLS
29 G_GNUC_INTERNAL
30 GvdbTable * gvdb_table_new_from_bytes (GBytes *bytes,
31 gboolean trusted,
32 GError **error);
33 G_GNUC_INTERNAL
34 GvdbTable * gvdb_table_new (const gchar *filename,
35 gboolean trusted,
36 GError **error);
37 G_GNUC_INTERNAL
38 void gvdb_table_free (GvdbTable *table);
39 G_GNUC_INTERNAL
40 gchar ** gvdb_table_get_names (GvdbTable *table,
41 gint *length);
42 G_GNUC_INTERNAL
43 gchar ** gvdb_table_list (GvdbTable *table,
44 const gchar *key);
45 G_GNUC_INTERNAL
46 GvdbTable * gvdb_table_get_table (GvdbTable *table,
47 const gchar *key);
48 G_GNUC_INTERNAL
49 GVariant * gvdb_table_get_raw_value (GvdbTable *table,
50 const gchar *key);
51 G_GNUC_INTERNAL
52 GVariant * gvdb_table_get_value (GvdbTable *table,
53 const gchar *key);
55 G_GNUC_INTERNAL
56 gboolean gvdb_table_has_value (GvdbTable *table,
57 const gchar *key);
58 G_GNUC_INTERNAL
59 gboolean gvdb_table_is_valid (GvdbTable *table);
61 G_END_DECLS
63 #endif /* __gvdb_reader_h__ */