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
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2008 Matthias Clasen <mclasen@redhat.com>
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef GCONF_DEFAULTS_H
#define GCONF_DEFAULTS_H
#include <glib-object.h>
#include <gio/gio.h>
G_BEGIN_DECLS
#define GCONF_TYPE_DEFAULTS (gconf_defaults_get_type ())
#define GCONF_DEFAULTS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GCONF_TYPE_DEFAULTS, GConfDefaults))
#define GCONF_DEFAULTS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GCONF_TYPE_DEFAULTS, GConfDefaultsClass))
#define GCONF_IS_DEFAULTS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GCONF_TYPE_DEFAULTS))
#define GCONF_IS_DEFAULTS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GCONF_TYPE_DEFAULTS))
#define GCONF_DEFAULTS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GCONF_TYPE_DEFAULTS, GConfDefaultsClass))
typedef struct GConfDefaultsPrivate GConfDefaultsPrivate;
typedef struct
{
GObject parent;
GConfDefaultsPrivate *priv;
} GConfDefaults;
typedef struct
{
GObjectClass parent_class;
void (* system_set) (GConfDefaults *defaults,
const char **keys);
} GConfDefaultsClass;
typedef enum
{
GCONF_DEFAULTS_ERROR_GENERAL,
GCONF_DEFAULTS_ERROR_NOT_PRIVILEGED,
GCONF_DEFAULTS_NUM_ERRORS
} GConfDefaultsError;
#define GCONF_DEFAULTS_ERROR gconf_defaults_error_quark ()
GType gconf_defaults_error_get_type (void);
#define GCONF_DEFAULTS_TYPE_ERROR (gconf_defaults_error_get_type ())
GQuark gconf_defaults_error_quark (void);
GType gconf_defaults_get_type (void);
GConfDefaults *gconf_defaults_new (GDBusConnection *connection);
/* exported methods */
void gconf_defaults_set_system (GConfDefaults *mechanism,
const char **includes,
const char **excludes,
GDBusMethodInvocation *context);
void gconf_defaults_set_system_value (GConfDefaults *mechanism,
const char *path,
const char *value,
GDBusMethodInvocation *context);
void gconf_defaults_set_mandatory (GConfDefaults *mechanism,
const char **includes,
const char **excludes,
GDBusMethodInvocation *context);
void gconf_defaults_set_mandatory_value (GConfDefaults *mechanism,
const char *path,
const char *value,
GDBusMethodInvocation *context);
void gconf_defaults_unset_mandatory (GConfDefaults *mechanism,
const char **includes,
const char **excludes,
GDBusMethodInvocation *context);
void gconf_defaults_can_set_system (GConfDefaults *mechanism,
const char **includes,
GDBusMethodInvocation *context);
void gconf_defaults_can_set_mandatory (GConfDefaults *mechanism,
const char **includes,
GDBusMethodInvocation *context);
G_END_DECLS
#endif /* GCONF_DEFAULTS_H */
|