source: trunk/third/GConf/backends/xml-dir.h @ 17087

Revision 17087, 3.6 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17086, which included commits to RCS files with non-trunk default branches.
Line 
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_XML_DIR_H
21#define GCONF_XML_DIR_H
22
23#include <gconf/gconf.h>
24#include <libxml/tree.h>
25
26/* Dir stores the information about a given directory */
27
28typedef struct _Dir Dir;
29Dir*           dir_new             (const gchar  *keyname,
30                                    const gchar  *xml_root_dir,
31                                    guint dir_mode,
32                                    guint file_mode);
33Dir*           dir_load            (const gchar  *key,
34                                    const gchar  *xml_root_dir,
35                                    GError  **err);
36void           dir_destroy         (Dir          *d);
37void           dir_clear_cache     (Dir          *d);
38gboolean       dir_ensure_exists   (Dir          *d,
39                                    GError  **err);
40gboolean       dir_sync            (Dir          *d,
41                                    GError  **err);
42
43const gchar*   dir_get_name        (Dir          *d);
44
45/* key should have no slashes in it */
46void           dir_set_value       (Dir          *d,
47                                    const gchar  *relative_key,
48                                    GConfValue   *value,
49                                    GError  **err);
50GConfValue*    dir_get_value       (Dir          *d,
51                                    const gchar  *relative_key,
52                                    const gchar **locales,
53                                    gchar       **schema_name,
54                                    GError  **err);
55GConfMetaInfo* dir_get_metainfo    (Dir          *d,
56                                    const gchar  *relative_key,
57                                    GError  **err);
58void           dir_unset_value     (Dir          *d,
59                                    const gchar  *relative_key,
60                                    const gchar  *locale,
61                                    GError  **err);
62GSList*        dir_all_entries     (Dir          *d,
63                                    const gchar **locales,
64                                    GError  **err);
65GSList*        dir_all_subdirs     (Dir          *d,
66                                    GError  **err);
67void           dir_set_schema      (Dir          *d,
68                                    const gchar  *relative_key,
69                                    const gchar  *schema_key,
70                                    GError  **err);
71GTime          dir_get_last_access (Dir          *d);
72
73gboolean       dir_sync_pending    (Dir          *d);
74
75/* Marks for deletion; dir cache really has to implement directory
76   deletion, since it is recursive */
77void           dir_mark_deleted    (Dir          *d);
78gboolean       dir_is_deleted      (Dir          *d);
79
80
81/* random utility function */
82#include <unistd.h>
83#include <sys/stat.h>
84#include <sys/types.h>
85guint mode_t_to_mode(mode_t orig);
86
87#endif
Note: See TracBrowser for help on using the repository browser.