~ubuntu-branches/ubuntu/oneiric/gconf/oneiric-proposed

« back to all changes in this revision

Viewing changes to gconf/gconf-database.h

  • Committer: Bazaar Package Importer
  • Author(s): Takuo KITAME
  • Date: 2002-03-17 01:51:39 UTC
  • Revision ID: james.westby@ubuntu.com-20020317015139-z4f8fdg1hoe049g0
Tags: upstream-1.0.9
ImportĀ upstreamĀ versionĀ 1.0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GConf
 
2
 * Copyright (C) 1999, 2000 Red Hat Inc.
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
#ifndef GCONF_GCONF_DATABASE_H
 
21
#define GCONF_GCONF_DATABASE_H
 
22
 
 
23
#include <glib.h>
 
24
 
 
25
#ifdef __cplusplus
 
26
extern "C" {
 
27
#endif /* __cplusplus */
 
28
 
 
29
#include "gconf-error.h"
 
30
#include "GConf.h"
 
31
#include "gconf-listeners.h"
 
32
#include "gconf-sources.h"
 
33
#include "gconf-internals.h"
 
34
#include "gconf-glib-private.h"
 
35
 
 
36
typedef struct _GConfDatabase GConfDatabase;
 
37
 
 
38
struct _GConfDatabase
 
39
{
 
40
  /* "inherit" from the servant,
 
41
     must be first in struct */
 
42
  POA_ConfigDatabase2 servant;
 
43
 
 
44
  ConfigDatabase objref;
 
45
  
 
46
  GConfListeners* listeners;
 
47
  GConfSources* sources;
 
48
 
 
49
  GTime last_access;
 
50
  guint sync_idle;
 
51
  guint sync_timeout;
 
52
 
 
53
  gchar *persistent_name;
 
54
};
 
55
 
 
56
GConfDatabase* gconf_database_new     (GConfSources  *sources);
 
57
void           gconf_database_free (GConfDatabase *db);
 
58
 
 
59
void                gconf_database_drop_dead_listeners (GConfDatabase *db);
 
60
 
 
61
CORBA_unsigned_long gconf_database_add_listener     (GConfDatabase       *db,
 
62
                                                     ConfigListener       who,
 
63
                                                     const gchar         *where);
 
64
void                gconf_database_remove_listener  (GConfDatabase       *db,
 
65
                                                     CORBA_unsigned_long  cnxn);
 
66
 
 
67
CORBA_unsigned_long gconf_database_readd_listener   (GConfDatabase       *db,
 
68
                                                     ConfigListener       who,
 
69
                                                     const gchar         *where);
 
70
 
 
71
void                gconf_database_notify_listeners (GConfDatabase       *db,
 
72
                                                     const gchar         *key,
 
73
                                                     const ConfigValue   *value,
 
74
                                                     gboolean             is_default,
 
75
                                                     gboolean             is_writable);
 
76
 
 
77
 
 
78
GConfValue* gconf_database_query_value         (GConfDatabase  *db,
 
79
                                                const gchar    *key,
 
80
                                                const gchar   **locales,
 
81
                                                gboolean        use_schema_default,
 
82
                                                gchar         **schema_name,
 
83
                                                gboolean       *value_is_default,
 
84
                                                gboolean       *value_is_writable,
 
85
                                                GError    **err);
 
86
GConfValue* gconf_database_query_default_value (GConfDatabase  *db,
 
87
                                                const gchar    *key,
 
88
                                                const gchar   **locales,
 
89
                                                gboolean       *is_writable,
 
90
                                                GError    **err);
 
91
 
 
92
 
 
93
 
 
94
void gconf_database_set   (GConfDatabase      *db,
 
95
                           const gchar        *key,
 
96
                           GConfValue         *value,
 
97
                           const ConfigValue  *cvalue,
 
98
                           GError        **err);
 
99
void gconf_database_unset (GConfDatabase      *db,
 
100
                           const gchar        *key,
 
101
                           const gchar        *locale,
 
102
                           GError        **err);
 
103
 
 
104
 
 
105
 
 
106
gboolean gconf_database_dir_exists  (GConfDatabase  *db,
 
107
                                     const gchar    *dir,
 
108
                                     GError    **err);
 
109
void     gconf_database_remove_dir  (GConfDatabase  *db,
 
110
                                     const gchar    *dir,
 
111
                                     GError    **err);
 
112
GSList*  gconf_database_all_entries (GConfDatabase  *db,
 
113
                                     const gchar    *dir,
 
114
                                     const gchar   **locales,
 
115
                                     GError    **err);
 
116
GSList*  gconf_database_all_dirs    (GConfDatabase  *db,
 
117
                                     const gchar    *dir,
 
118
                                     GError    **err);
 
119
void     gconf_database_set_schema  (GConfDatabase  *db,
 
120
                                     const gchar    *key,
 
121
                                     const gchar    *schema_key,
 
122
                                     GError    **err);
 
123
 
 
124
 
 
125
void     gconf_database_sync             (GConfDatabase  *db,
 
126
                                          GError    **err);
 
127
gboolean gconf_database_synchronous_sync (GConfDatabase  *db,
 
128
                                          GError    **err);
 
129
void     gconf_database_clear_cache      (GConfDatabase  *db,
 
130
                                          GError    **err);
 
131
 
 
132
 
 
133
void gconfd_locale_cache_expire (void);
 
134
void gconfd_locale_cache_drop  (void);
 
135
 
 
136
const gchar* gconf_database_get_persistent_name (GConfDatabase *db);
 
137
 
 
138
void gconf_database_log_listeners_to_string (GConfDatabase *db,
 
139
                                             gboolean is_default,
 
140
                                             GString *str);
 
141
 
 
142
#ifdef __cplusplus
 
143
}
 
144
#endif /* __cplusplus */
 
145
 
 
146
#endif
 
147
 
 
148
 
 
149