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 of the licence, 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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 * Author: Ryan Lortie <desrt@desrt.ca>
22 #ifndef __gvdb_reader_h__
23 #define __gvdb_reader_h__
27 typedef struct _GvdbTable GvdbTable
;
29 typedef gpointer (*GvdbRefFunc
) (gpointer data
);
34 GvdbTable
* gvdb_table_new (const gchar
*filename
,
38 GvdbTable
* gvdb_table_new_from_data (const void *data
,
46 GvdbTable
* gvdb_table_ref (GvdbTable
*table
);
48 void gvdb_table_unref (GvdbTable
*table
);
51 gchar
** gvdb_table_list (GvdbTable
*table
,
54 GvdbTable
* gvdb_table_get_table (GvdbTable
*table
,
57 GVariant
* gvdb_table_get_raw_value (GvdbTable
*table
,
60 GVariant
* gvdb_table_get_value (GvdbTable
*table
,
64 gboolean
gvdb_table_has_value (GvdbTable
*table
,
68 gboolean
gvdb_table_is_valid (GvdbTable
*table
);
70 typedef void (*GvdbWalkValueFunc
) (const gchar
*name
,
74 typedef gboolean (*GvdbWalkOpenFunc
) (const gchar
*name
,
77 typedef void (*GvdbWalkCloseFunc
) (gsize name_len
,
81 void gvdb_table_walk (GvdbTable
*table
,
83 GvdbWalkOpenFunc open_func
,
84 GvdbWalkValueFunc value_func
,
85 GvdbWalkCloseFunc close_func
,
90 #endif /* __gvdb_reader_h__ */