summaryrefslogtreecommitdiff
path: root/src/mateconf-utils.h
blob: 528b83a0d559ebcaebddd653cd1f81d77ae50ceb (plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *  Engrampa
 *
 *  Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02110-1301, USA.
 */

/* eel-mateconf-extensions.h - Stuff to make MateConf easier to use.

   Copyright (C) 2000, 2001 Eazel, Inc.

   The Mate 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.

   The Mate 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 the Mate Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
   Boston, MA 02110-1301, USA.

   Authors: Ramiro Estrugo <ramiro@eazel.com>
*/

/* Modified by Paolo Bacchilega <paolo.bacch@tin.it> for File Roller. */

#ifndef MATECONF_UTILS_H
#define MATECONF_UTILS_H

#include <glib.h>
#include <mateconf/mateconf.h>
#include <mateconf/mateconf-client.h>

G_BEGIN_DECLS

#define EEL_MATECONF_UNDEFINED_CONNECTION 0

MateConfClient *eel_mateconf_client_get_global     (void);

void         eel_global_client_free          (void);

gboolean     eel_mateconf_handle_error          (GError                **error);

gboolean     eel_mateconf_get_boolean           (const char             *key,
					      gboolean                def_val);

void         eel_mateconf_set_boolean           (const char             *key,
					      gboolean                value);

int          eel_mateconf_get_integer           (const char             *key,
					      int                     def_val);

void         eel_mateconf_set_integer           (const char             *key,
					      int                     value);

float        eel_mateconf_get_float             (const char             *key,
					      float                   def_val);

void         eel_mateconf_set_float             (const char             *key,
					      float                   value);

char *       eel_mateconf_get_string            (const char             *key,
					      const char             *def_val);

void         eel_mateconf_set_string            (const char             *key,
					      const char             *value);

char *       eel_mateconf_get_locale_string     (const char             *key,
					      const char             *def_val);

void         eel_mateconf_set_locale_string     (const char             *key,
					      const char             *value);

GSList *     eel_mateconf_get_string_list       (const char             *key);

void         eel_mateconf_set_string_list       (const char             *key,
					      const GSList           *string_list_value);

GSList *     eel_mateconf_get_locale_string_list(const char             *key);

void         eel_mateconf_set_locale_string_list(const char             *key,
					      const GSList           *string_list_value);

gboolean     eel_mateconf_is_default            (const char             *key);

gboolean     eel_mateconf_monitor_add           (const char             *directory);

gboolean     eel_mateconf_monitor_remove        (const char             *directory);

void         eel_mateconf_preload_cache         (const char             *directory,
					      MateConfClientPreloadType  preload_type);

void         eel_mateconf_suggest_sync          (void);

MateConfValue*  eel_mateconf_get_value             (const char             *key);

MateConfValue*  eel_mateconf_get_default_value     (const char             *key);

gboolean     eel_mateconf_value_is_equal        (const MateConfValue       *a,
					      const MateConfValue       *b);

void         eel_mateconf_value_free            (MateConfValue             *value);

guint        eel_mateconf_notification_add      (const char             *key,
					      MateConfClientNotifyFunc   notification_callback,
					      gpointer                callback_data);

void         eel_mateconf_notification_remove   (guint                   notification_id);

GSList *     eel_mateconf_value_get_string_list (const MateConfValue       *value);

void         eel_mateconf_value_set_string_list (MateConfValue             *value,
					      const GSList           *string_list);

G_END_DECLS

#endif /* MATECONF_UTILS_H */