Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 /* gkeyfile.h - desktop entry file parser
3 * Copyright 2004 Red Hat, Inc.
5 * Ray Strode <halfline@hawaii.rr.com>
6 * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
8 * GLib is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * GLib is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with GLib; see the file COPYING.LIB. If not,
20 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #ifndef __G_KEY_FILE_H__
25 #define __G_KEY_FILE_H__
28 #include <glib/gerror.h>
34 G_KEY_FILE_ERROR_UNKNOWN_ENCODING,
35 G_KEY_FILE_ERROR_PARSE,
36 G_KEY_FILE_ERROR_NOT_FOUND,
37 G_KEY_FILE_ERROR_KEY_NOT_FOUND,
38 G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
39 G_KEY_FILE_ERROR_INVALID_VALUE
42 #define G_KEY_FILE_ERROR g_key_file_error_quark()
44 IMPORT_C GQuark g_key_file_error_quark (void);
46 typedef struct _GKeyFile GKeyFile;
51 G_KEY_FILE_KEEP_COMMENTS = 1 << 0,
52 G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1
55 IMPORT_C GKeyFile *g_key_file_new (void);
56 IMPORT_C void g_key_file_free (GKeyFile *key_file);
57 IMPORT_C void g_key_file_set_list_separator (GKeyFile *key_file,
59 IMPORT_C gboolean g_key_file_load_from_file (GKeyFile *key_file,
63 IMPORT_C gboolean g_key_file_load_from_data (GKeyFile *key_file,
68 IMPORT_C gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file,
73 IMPORT_C gchar *g_key_file_to_data (GKeyFile *key_file,
75 GError **error) G_GNUC_MALLOC;
76 IMPORT_C gchar *g_key_file_get_start_group (GKeyFile *key_file) G_GNUC_MALLOC;
77 IMPORT_C gchar **g_key_file_get_groups (GKeyFile *key_file,
78 gsize *length) G_GNUC_MALLOC;
79 IMPORT_C gchar **g_key_file_get_keys (GKeyFile *key_file,
80 const gchar *group_name,
82 GError **error) G_GNUC_MALLOC;
83 IMPORT_C gboolean g_key_file_has_group (GKeyFile *key_file,
84 const gchar *group_name);
85 IMPORT_C gboolean g_key_file_has_key (GKeyFile *key_file,
86 const gchar *group_name,
89 IMPORT_C gchar *g_key_file_get_value (GKeyFile *key_file,
90 const gchar *group_name,
92 GError **error) G_GNUC_MALLOC;
93 IMPORT_C void g_key_file_set_value (GKeyFile *key_file,
94 const gchar *group_name,
97 IMPORT_C gchar *g_key_file_get_string (GKeyFile *key_file,
98 const gchar *group_name,
100 GError **error) G_GNUC_MALLOC;
101 IMPORT_C void g_key_file_set_string (GKeyFile *key_file,
102 const gchar *group_name,
104 const gchar *string);
105 IMPORT_C gchar *g_key_file_get_locale_string (GKeyFile *key_file,
106 const gchar *group_name,
109 GError **error) G_GNUC_MALLOC;
110 IMPORT_C void g_key_file_set_locale_string (GKeyFile *key_file,
111 const gchar *group_name,
114 const gchar *string);
115 IMPORT_C gboolean g_key_file_get_boolean (GKeyFile *key_file,
116 const gchar *group_name,
119 IMPORT_C void g_key_file_set_boolean (GKeyFile *key_file,
120 const gchar *group_name,
123 IMPORT_C gint g_key_file_get_integer (GKeyFile *key_file,
124 const gchar *group_name,
127 IMPORT_C void g_key_file_set_integer (GKeyFile *key_file,
128 const gchar *group_name,
131 IMPORT_C gchar **g_key_file_get_string_list (GKeyFile *key_file,
132 const gchar *group_name,
135 GError **error) G_GNUC_MALLOC;
136 IMPORT_C void g_key_file_set_string_list (GKeyFile *key_file,
137 const gchar *group_name,
139 const gchar * const list[],
141 IMPORT_C gchar **g_key_file_get_locale_string_list (GKeyFile *key_file,
142 const gchar *group_name,
146 GError **error) G_GNUC_MALLOC;
147 IMPORT_C void g_key_file_set_locale_string_list (GKeyFile *key_file,
148 const gchar *group_name,
151 const gchar * const list[],
153 IMPORT_C gboolean *g_key_file_get_boolean_list (GKeyFile *key_file,
154 const gchar *group_name,
157 GError **error) G_GNUC_MALLOC;
158 IMPORT_C void g_key_file_set_boolean_list (GKeyFile *key_file,
159 const gchar *group_name,
163 IMPORT_C gint *g_key_file_get_integer_list (GKeyFile *key_file,
164 const gchar *group_name,
167 GError **error) G_GNUC_MALLOC;
168 IMPORT_C void g_key_file_set_integer_list (GKeyFile *key_file,
169 const gchar *group_name,
173 IMPORT_C void g_key_file_set_comment (GKeyFile *key_file,
174 const gchar *group_name,
176 const gchar *comment,
178 IMPORT_C gchar *g_key_file_get_comment (GKeyFile *key_file,
179 const gchar *group_name,
181 GError **error) G_GNUC_MALLOC;
183 IMPORT_C void g_key_file_remove_comment (GKeyFile *key_file,
184 const gchar *group_name,
187 IMPORT_C void g_key_file_remove_key (GKeyFile *key_file,
188 const gchar *group_name,
191 IMPORT_C void g_key_file_remove_group (GKeyFile *key_file,
192 const gchar *group_name,
197 #endif /* __G_KEY_FILE_H__ */