~xubuntu-dev/libxfce4util/maverick

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
/* $Id$ */
/*-
 * Copyright (c) 2003-2005 Benedikt Meurer <benny@xfce.org>
 * All rights reserved.
 *
 * 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., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __LIBXFCE4UTIL_XFCE_RC_PRIVATE_H__
#define __LIBXFCE4UTIL_XFCE_RC_PRIVATE_H__

#include <libxfce4util/libxfce4util.h>

typedef struct _XfceRcConfig XfceRcConfig;
typedef struct _XfceRcSimple XfceRcSimple;

struct _XfceRc
{
  void (*close) (XfceRc *rc);
  void (*flush) (XfceRc *rc);
  void (*rollback) (XfceRc *rc);
  gboolean (*is_dirty) (const XfceRc *rc);
  gboolean (*is_readonly) (const XfceRc *rc);
  gchar** (*get_groups) (const XfceRc *rc);
  gchar** (*get_entries) (const XfceRc *rc, const gchar *group);
  void (*delete_group) (XfceRc *rc, const gchar *group, gboolean global);
  const gchar* (*get_group) (const XfceRc *rc);
  gboolean (*has_group) (const XfceRc *rc, const gchar *group);
  void (*set_group) (XfceRc *rc, const gchar *group);
  void (*delete_entry) (XfceRc *rc, const gchar *key, gboolean global);
  gboolean (*has_entry) (const XfceRc *rc, const gchar *key);
  const gchar* (*read_entry) (const XfceRc *rc, const gchar *key,
                              gboolean translated);
  /* write_entry == NULL means readonly */
  void (*write_entry) (XfceRc *rc, const gchar *key, const gchar *value);
  void (*reserved1) (void);
  void (*reserved2) (void);
  void (*reserved3) (void);
  void (*reserved4) (void);

  gchar   *locale;
};

#define XFCE_RC_CONFIG(obj)       ((XfceRcConfig *) (obj))
#define XFCE_RC_CONFIG_CONST(obj) ((const XfceRcConfig *) (obj))

#define XFCE_RC_SIMPLE(obj)       ((XfceRcSimple *) (obj))
#define XFCE_RC_SIMPLE_CONST(obj) ((const XfceRcSimple *) (obj))


G_GNUC_INTERNAL void          _xfce_rc_init               (XfceRc       *rc);

G_GNUC_INTERNAL XfceRcSimple* _xfce_rc_simple_new         (XfceRcSimple *shared,
                                           const gchar  *filename,
                                           gboolean      readonly);
G_GNUC_INTERNAL gboolean      _xfce_rc_simple_parse       (XfceRcSimple *simple);
G_GNUC_INTERNAL void          _xfce_rc_simple_close       (XfceRc       *rc);
G_GNUC_INTERNAL void          _xfce_rc_simple_flush       (XfceRc       *rc);
G_GNUC_INTERNAL void          _xfce_rc_simple_rollback    (XfceRc       *rc);
G_GNUC_INTERNAL gboolean      _xfce_rc_simple_is_dirty    (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gboolean      _xfce_rc_simple_is_readonly (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL const gchar*  _xfce_rc_simple_get_filename(const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gchar**       _xfce_rc_simple_get_groups  (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gchar**       _xfce_rc_simple_get_entries (const XfceRc *rc,
                                           const gchar  *name) G_GNUC_CONST;
G_GNUC_INTERNAL void          _xfce_rc_simple_delete_group(XfceRc       *rc,
                                           const gchar  *name,
                                           gboolean      global);
const gchar*  _xfce_rc_simple_get_group   (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gboolean      _xfce_rc_simple_has_group   (const XfceRc *rc,
                                           const gchar  *name) G_GNUC_CONST;
G_GNUC_INTERNAL void          _xfce_rc_simple_set_group   (XfceRc       *rc,
                                           const gchar  *name);
G_GNUC_INTERNAL void          _xfce_rc_simple_delete_entry(XfceRc       *rc,
                                           const gchar  *key,
                                           gboolean      global);
G_GNUC_INTERNAL gboolean      _xfce_rc_simple_has_entry   (const XfceRc *rc,
                                           const gchar  *key) G_GNUC_CONST;
G_GNUC_INTERNAL const gchar*  _xfce_rc_simple_read_entry  (const XfceRc *rc,
                                           const gchar  *key,
                                           gboolean      translated) G_GNUC_CONST;
G_GNUC_INTERNAL void          _xfce_rc_simple_write_entry (XfceRc       *rc,
                                           const gchar  *key,
                                           const gchar  *value);

G_GNUC_INTERNAL XfceRcConfig* _xfce_rc_config_new         (XfceResourceType type,
                                           const gchar  *resource,
                                           gboolean      readonly);
G_GNUC_INTERNAL void          _xfce_rc_config_close       (XfceRc       *rc);
G_GNUC_INTERNAL void          _xfce_rc_config_flush       (XfceRc       *rc);
G_GNUC_INTERNAL void          _xfce_rc_config_rollback    (XfceRc       *rc);
G_GNUC_INTERNAL gboolean      _xfce_rc_config_is_dirty    (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gboolean      _xfce_rc_config_is_readonly (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gchar**       _xfce_rc_config_get_groups  (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gchar**       _xfce_rc_config_get_entries (const XfceRc *rc,
                                           const gchar  *name) G_GNUC_CONST;
G_GNUC_INTERNAL void          _xfce_rc_config_delete_group(XfceRc       *rc,
                                           const gchar  *name,
                                           gboolean      global);
G_GNUC_INTERNAL const gchar*  _xfce_rc_config_get_group   (const XfceRc *rc) G_GNUC_CONST;
G_GNUC_INTERNAL gboolean      _xfce_rc_config_has_group   (const XfceRc *rc,
                                           const gchar  *name) G_GNUC_CONST;
G_GNUC_INTERNAL void          _xfce_rc_config_set_group   (XfceRc       *rc,
                                           const gchar  *name);
G_GNUC_INTERNAL void          _xfce_rc_config_delete_entry(XfceRc       *rc,
                                           const gchar  *key,
                                           gboolean      global);
G_GNUC_INTERNAL gboolean      _xfce_rc_config_has_entry   (const XfceRc *rc,
                                           const gchar  *key) G_GNUC_CONST;
G_GNUC_INTERNAL const gchar*  _xfce_rc_config_read_entry  (const XfceRc *rc,
                                           const gchar  *key,
                                           gboolean      translated) G_GNUC_CONST;
G_GNUC_INTERNAL void          _xfce_rc_config_write_entry (XfceRc       *rc,
                                           const gchar  *key,
                                           const gchar  *value);


#endif /* !__LIBXFCE4UTIL_XFCE_RC_PRIVATE_H__ */