1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/* -*- indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* LD_PRELOAD functions to make libgconf read defaults out of local schemas
* Copyright (C) 2009 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GCONF_DEFAULTS_HACK_H__
#define __GCONF_DEFAULTS_HACK_H__
#include <gconf/gconf.h>
#include <glib.h>
typedef struct _GConfDefaultsHackDatabase GConfDefaultsHackDatabase;
typedef struct _GConfDefaultsHackEntry GConfDefaultsHackEntry;
struct _GConfDefaultsHackEntry
{
char *type;
char *list_type;
char *car_type;
char *cdr_type;
char *default_value;
};
/* gconf-defaults-hack.c */
gboolean gconf_defaults_hack_verbose (void);
GConfValueType gconf_defaults_hack_value_type_from_string (const char *str);
/* gconf-cut-and-paste.c */
GConfValue *gconf_defaults_hack_value_new_list_from_string (GConfValueType list_type,
const gchar *str,
GError **err);
GConfValue *gconf_defaults_hack_value_new_pair_from_string (GConfValueType car_type,
GConfValueType cdr_type,
const gchar *str,
GError **err);
/* database.c */
GConfDefaultsHackDatabase *gconf_defaults_hack_database_open (const char *filename);
void gconf_defaults_hack_database_close (GConfDefaultsHackDatabase *database);
void gconf_defaults_hack_database_begin_transaction (GConfDefaultsHackDatabase *database);
void gconf_defaults_hack_database_commit (GConfDefaultsHackDatabase *database);
void gconf_defaults_hack_database_clear (GConfDefaultsHackDatabase *database);
GConfDefaultsHackEntry * gconf_defaults_hack_database_get (GConfDefaultsHackDatabase *database,
const char *key);
void gconf_defaults_hack_database_put (GConfDefaultsHackDatabase *database,
const char *key,
GConfDefaultsHackEntry *entry);
void gconf_defaults_hack_entry_free (GConfDefaultsHackEntry *entry);
/* rebuild.c */
void gconf_defaults_hack_rebuild_database (GConfDefaultsHackDatabase *database,
const char *schemas_dir);
#endif /* __GCONF_DEFAULTS_HACK_H__ */
|