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
|
/*
* xfconf
*
* Copyright (c) 2007 Brian Tarricone <bjt23@cornell.edu>
*
* 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; version 2 of the License ONLY.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __XFCONF_CHANNEL_H__
#define __XFCONF_CHANNEL_H__
#if !defined(LIBXFCONF_COMPILATION) && !defined(XFCONF_IN_XFCONF_H)
#error "Do not include xfconf-channel.h, as this file may change or disappear in the future. Include <xfconf/xfconf.h> instead."
#endif
#include <glib-object.h>
#define XFCONF_TYPE_CHANNEL (xfconf_channel_get_type())
#define XFCONF_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XFCONF_TYPE_CHANNEL, XfconfChannel))
#define XFCONF_IS_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XFCONF_TYPE_CHANNEL))
#define XFCONF_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), XFCONF_TYPE_CHANNEL, XfconfChannelClass))
#define XFCONF_IS_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), XFCONF_TYPE_CHANNEL))
#define XFCONF_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), XFCONF_TYPE_CHANNEL, XfconfChannelClass))
G_BEGIN_DECLS
typedef struct _XfconfChannel XfconfChannel;
GType xfconf_channel_get_type() G_GNUC_CONST;
XfconfChannel *xfconf_channel_new(const gchar *channel_name);
gboolean xfconf_channel_has_property(XfconfChannel *channel,
const gchar *property);
void xfconf_channel_remove_property(XfconfChannel *channel,
const gchar *property);
GHashTable *xfconf_channel_get_all(XfconfChannel *channel);
gchar *xfconf_channel_get_string(XfconfChannel *channel,
const gchar *property,
const gchar *default_value);
gchar **xfconf_channel_get_string_list(XfconfChannel *channel,
const gchar *property,
const gchar **default_value);
gint xfconf_channel_get_int(XfconfChannel *channel,
const gchar *property,
gint default_value);
gint64 xfconf_channel_get_int64(XfconfChannel *channel,
const gchar *property,
gint64 default_value);
gdouble xfconf_channel_get_double(XfconfChannel *channel,
const gchar *property,
gdouble default_value);
gboolean xfconf_channel_get_bool(XfconfChannel *channel,
const gchar *property,
gboolean default_value);
gboolean xfconf_channel_set_string(XfconfChannel *channel,
const gchar *property,
const gchar *value);
gboolean xfconf_channel_set_string_list(XfconfChannel *channel,
const gchar *property,
const gchar **value);
gboolean xfconf_channel_set_int(XfconfChannel *channel,
const gchar *property,
gint value);
gboolean xfconf_channel_set_int64(XfconfChannel *channel,
const gchar *property,
gint64 value);
gboolean xfconf_channel_set_double(XfconfChannel *channel,
const gchar *property,
gdouble value);
gboolean xfconf_channel_set_bool(XfconfChannel *channel,
const gchar *property,
gboolean value);
#if 0 /* future (maybe) */
//gboolean xfconf_channel_begin_transaction(XfconfChannel *channel);
//gboolean xfconf_channel_commit_transaction(XfconfChannel *channel);
//void xfconf_channel_cancel_transaction(XfconfChannel *channel);
#endif
G_END_DECLS
#endif /* __XFCONF_CHANNEL_H__ */
|