2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GLIBMM_KEYFILE_H
4 #define _GLIBMM_KEYFILE_H
7 /* Copyright(C) 2006 The gtkmm Development Team
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or(at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include <glibmm/ustring.h>
26 #include <glibmm/arrayhandle.h>
27 #include <glibmm/error.h>
28 #include <glibmm/utility.h>
29 #include <glib/gkeyfile.h>
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 extern "C" { typedef struct _GKeyFile GKeyFile; }
38 /** @addtogroup glibmmEnums Enums and Flags */
41 * @ingroup glibmmEnums
42 * @par Bitwise operators:
43 * <tt>%KeyFileFlags operator|(KeyFileFlags, KeyFileFlags)</tt><br>
44 * <tt>%KeyFileFlags operator&(KeyFileFlags, KeyFileFlags)</tt><br>
45 * <tt>%KeyFileFlags operator^(KeyFileFlags, KeyFileFlags)</tt><br>
46 * <tt>%KeyFileFlags operator~(KeyFileFlags)</tt><br>
47 * <tt>%KeyFileFlags& operator|=(KeyFileFlags&, KeyFileFlags)</tt><br>
48 * <tt>%KeyFileFlags& operator&=(KeyFileFlags&, KeyFileFlags)</tt><br>
49 * <tt>%KeyFileFlags& operator^=(KeyFileFlags&, KeyFileFlags)</tt><br>
54 KEY_FILE_KEEP_COMMENTS = 1 << 0,
55 KEY_FILE_KEEP_TRANSLATIONS = 1 << 1
58 /** @ingroup glibmmEnums */
59 inline KeyFileFlags operator|(KeyFileFlags lhs, KeyFileFlags rhs)
60 { return static_cast<KeyFileFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
62 /** @ingroup glibmmEnums */
63 inline KeyFileFlags operator&(KeyFileFlags lhs, KeyFileFlags rhs)
64 { return static_cast<KeyFileFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
66 /** @ingroup glibmmEnums */
67 inline KeyFileFlags operator^(KeyFileFlags lhs, KeyFileFlags rhs)
68 { return static_cast<KeyFileFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
70 /** @ingroup glibmmEnums */
71 inline KeyFileFlags operator~(KeyFileFlags flags)
72 { return static_cast<KeyFileFlags>(~static_cast<unsigned>(flags)); }
74 /** @ingroup glibmmEnums */
75 inline KeyFileFlags& operator|=(KeyFileFlags& lhs, KeyFileFlags rhs)
76 { return (lhs = static_cast<KeyFileFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
78 /** @ingroup glibmmEnums */
79 inline KeyFileFlags& operator&=(KeyFileFlags& lhs, KeyFileFlags rhs)
80 { return (lhs = static_cast<KeyFileFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
82 /** @ingroup glibmmEnums */
83 inline KeyFileFlags& operator^=(KeyFileFlags& lhs, KeyFileFlags rhs)
84 { return (lhs = static_cast<KeyFileFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
87 /** Exception class for KeyFile errors.
89 class KeyFileError : public Glib::Error
102 KeyFileError(Code error_code, const Glib::ustring& error_message);
103 explicit KeyFileError(GError* gobject);
106 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109 #ifdef GLIBMM_EXCEPTIONS_ENABLED
110 static void throw_func(GError* gobject);
112 //When not using exceptions, we just pass the Exception object around without throwing it:
113 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
114 #endif //GLIBMM_EXCEPTIONS_ENABLED
116 friend void wrap_init(); // uses throw_func()
121 /** This class lets you parse, edit or create files containing groups of key-value pairs, which we call key files
122 * for lack of a better name. Several freedesktop.org specifications use key files now, e.g the Desktop Entry
123 * Specification and the Icon Theme Specification.
125 * The syntax of key files is described in detail in the Desktop Entry Specification, here is a quick summary: Key
126 * files consists of groups of key-value pairs, interspersed with comments.
129 * # this is just an example
130 * # there can be comments before the first group
134 * Name=Key File Example\tthis value shows\nescaping
136 * # localized strings are stored in multiple key-value pairs
139 * Welcome[fr]=Bonjour
144 * Numbers=2;20;-200;0
146 * Booleans=true;false;true;true
149 * Lines beginning with a '#' and blank lines are considered comments.
151 * Groups are started by a header line containing the group name enclosed in '[' and ']', and ended implicitly by
152 * the start of the next group or the end of the file. Each key-value pair must be contained in a group.
154 * Key-value pairs generally have the form key=value, with the exception of localized strings, which have the form
155 * key[locale]=value. Space before and after the '=' character are ignored. Newline, tab, carriage return and
156 * backslash characters in value are escaped as \n, \t, \r, and \\, respectively. To preserve leading spaces in
157 * values, these can also be escaped as \s.
159 * Key files can store strings (possibly with localized variants), integers, booleans and lists of these. Lists are
160 * separated by a separator character, typically ';' or ','. To use the list separator character in a value in a
161 * list, it has to be escaped by prefixing it with a backslash.
163 * This syntax is obviously inspired by the .ini files commonly met on Windows, but there are some important
165 * - .ini files use the ';' character to begin comments, key files use the '#' character.
166 * - Key files allow only comments before the first group.
167 * - Key files are always encoded in UTF-8.
168 * - Key and Group names are case-sensitive, for example a group called [GROUP] is a different group from [group].
170 * Note that in contrast to the Desktop Entry Specification, groups in key files may contain the same key multiple
171 * times; the last entry wins. Key files may also contain multiple groups with the same name; they are merged
172 * together. Another difference is that keys and group names in key files are not restricted to ASCII characters.
179 #ifndef DOXYGEN_SHOULD_SKIP_THIS
180 typedef KeyFile CppObjectType;
181 typedef GKeyFile BaseObjectType;
182 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
188 /** Creates a new, empty KeyFile object.
197 /** Creates a glibmm KeyFile wrapper for a GKeyFile object.
198 * Note, when using this that when the wrapper is deleted,
199 * it will not automatically deleted the GKeyFile unless you
200 * set the delete_c_instance boolean to true.
201 * @param castitem The C instance to wrap
202 * @param delete_c_instance If the C instance should be deleted when
203 * the wrapper is deleted.
205 KeyFile(GKeyFile* castitem, bool takes_ownership = false);
210 /** Loads a key file into an empty G::KeyFile structure.
211 * If the file could not be loaded then %error is set to
212 * either a G::FileError or G::KeyFileError.
213 * @param file The path of a filename to load, in the GLib file name encoding.
214 * @param flags Flags from G::KeyFileFlags.
215 * @param error Return location for a G::Error, or <tt>0</tt>.
216 * @return <tt>true</tt> if a key file could be loaded, <tt>false</tt> othewise
219 #ifdef GLIBMM_EXCEPTIONS_ENABLED
220 bool load_from_file(const std::string& filename, KeyFileFlags flags = Glib::KEY_FILE_NONE);
222 bool load_from_file(const std::string& filename, KeyFileFlags flags, std::auto_ptr<Glib::Error>& error);
223 #endif //GLIBMM_EXCEPTIONS_ENABLED
226 /** Loads a KeyFile from memory
227 * @param data The data to use as a KeyFile
228 * @param flags Bitwise combination of the flags to use for the KeyFile
229 * @return true if the KeyFile was successfully loaded, false otherwise
230 * @throw Glib::KeyFileError
233 bool load_from_data(const Glib::ustring& data, KeyFileFlags flags = Glib::KEY_FILE_NONE);
238 gboolean g_key_file_load_from_dirs (GKeyFile *key_file,
240 const gchar **search_dirs,
246 /** Looks for a KeyFile named @a file in the paths returned from
247 * g_get_user_data_dir() and g_get_system_data_dirs() and loads them
248 * into the keyfile object, placing the full path to the file in
250 * @param file The file to search for
251 * @param full_path Return location for a string containing the full path of the file
252 * @param flags Bitwise combination of the flags to use for the KeyFile
253 * @return true if the KeyFile was successfully loaded, false otherwise
254 * @throw Glib::KeyFileError
255 * @throw Glib::FileError
257 bool load_from_data_dirs(const std::string& file, std::string& full_path, KeyFileFlags flags = Glib::KEY_FILE_NONE);
260 /** Outputs the KeyFile as a string
261 * @return A string object holding the contents of KeyFile
263 Glib::ustring to_data();
266 /** Return value: The start group of the key file.
267 * @return The start group of the key file.
271 Glib::ustring get_start_group() const;
273 /** Gets a list of all groups in the KeyFile
274 * @returns A list containing the names of the groups
276 Glib::ArrayHandle<Glib::ustring> get_groups() const;
279 /** Gets a list of all keys from the group @a group_name.
280 * @param group_name The name of a group
281 * @returns A list containing the names of the keys in @a group_name
283 Glib::ArrayHandle<Glib::ustring> get_keys(const Glib::ustring& group_name) const;
286 /** Looks whether the key file has the group @a group_name .
287 * @param group_name A group name.
288 * @return <tt>true</tt> if @a group_name is a part of @a key_file , <tt>false</tt>
292 bool has_group(const Glib::ustring& group_name) const;
294 /** Looks whether the key file has the key @a key in the group
296 * @param group_name A group name.
297 * @param key A key name.
298 * @param error Return location for a G::Error.
299 * @return <tt>true</tt> if @a key is a part of @a group_name , <tt>false</tt>
304 #ifdef GLIBMM_EXCEPTIONS_ENABLED
305 bool has_key(const Glib::ustring& group_name, const Glib::ustring& key) const;
307 bool has_key(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const;
308 #endif //GLIBMM_EXCEPTIONS_ENABLED
311 /** Return value: a newly allocated string or <tt>0</tt> if the specified
312 * @param group_name A group name.
314 * @param error Return location for a G::Error, or <tt>0</tt>.
315 * @return A newly allocated string or <tt>0</tt> if the specified
316 * key cannot be found.
320 #ifdef GLIBMM_EXCEPTIONS_ENABLED
321 Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key) const;
323 Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const;
324 #endif //GLIBMM_EXCEPTIONS_ENABLED
327 /** Return value: a newly allocated string or <tt>0</tt> if the specified
328 * @param group_name A group name.
330 * @param error Return location for a G::Error, or <tt>0</tt>.
331 * @return A newly allocated string or <tt>0</tt> if the specified
332 * key cannot be found.
336 #ifdef GLIBMM_EXCEPTIONS_ENABLED
337 Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key) const;
339 Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const;
340 #endif //GLIBMM_EXCEPTIONS_ENABLED
343 /** Gets the value associated with @a key under @a group_name translated
344 * into the current locale.
346 Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key) const;
349 /** Return value: a newly allocated string or <tt>0</tt> if the specified
350 * @param group_name A group name.
352 * @param locale A locale or <tt>0</tt>.
353 * @param error Return location for a G::Error, or <tt>0</tt>.
354 * @return A newly allocated string or <tt>0</tt> if the specified
355 * key cannot be found.
359 #ifdef GLIBMM_EXCEPTIONS_ENABLED
360 Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const;
362 Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, std::auto_ptr<Glib::Error>& error) const;
363 #endif //GLIBMM_EXCEPTIONS_ENABLED
366 /** Return value: the value associated with the key as a boolean, or
367 * @param group_name A group name.
369 * @param error Return location for a G::Error.
370 * @return The value associated with the key as a boolean, or
371 * <tt>false</tt> if the key was not found or could not be parsed.
375 #ifdef GLIBMM_EXCEPTIONS_ENABLED
376 bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const;
378 bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const;
379 #endif //GLIBMM_EXCEPTIONS_ENABLED
382 /** Gets the value in the first group, under @a key, interpreting it as
384 * @param key The name of the key
385 * @return The value of @a key as an integer
386 * @throws Glib::KeyFileError
388 int get_integer(const Glib::ustring& key) const;
391 /** Return value: the value associated with the key as an integer, or
392 * @param group_name A group name.
394 * @param error Return location for a G::Error.
395 * @return The value associated with the key as an integer, or
396 * 0 if the key was not found or could not be parsed.
400 #ifdef GLIBMM_EXCEPTIONS_ENABLED
401 int get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const;
403 int get_integer(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const;
404 #endif //GLIBMM_EXCEPTIONS_ENABLED
407 /** Gets the value in the first group, under @a key, interpreting it as
409 * @param key The name of the key
410 * @return The value of @a key as an double
411 * @throws Glib::KeyFileError
415 double get_double(const Glib::ustring& key) const;
418 /** Return value: the value associated with the key as a double, or
419 * @param group_name A group name.
421 * @param error Return location for a G::Error.
422 * @return The value associated with the key as a double, or
423 * 0.0 if the key was not found or could not be parsed.
427 #ifdef GLIBMM_EXCEPTIONS_ENABLED
428 double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const;
430 double get_double(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const;
431 #endif //GLIBMM_EXCEPTIONS_ENABLED
434 /** Associates a new double value with @a key under @a group_name .
435 * If @a key cannot be found then it is created.
438 * @param group_name A group name.
440 * @param value An double value.
442 void set_double(const Glib::ustring& group_name, const Glib::ustring& key, double value);
444 /** Associates a new double value with @a key under the start group.
445 * If @a key cannot be found then it is created.
449 * @param value An double value.
451 void set_double(const Glib::ustring& key, double value);
453 /** Returns the values associated with @a key under @a group_name
454 * @param group_name The name of a group
455 * @param key The name of a key
456 * @return A list containing the values requested
457 * @throws Glib::KeyFileError
459 Glib::ArrayHandle<Glib::ustring> get_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const;
462 /** Returns the values associated with @a key under @a group_name
463 * translated into the current locale, if available.
464 * @param group_name The name of a group
465 * @param key The name of a key
466 * @return A list containing the values requested
467 * @throws Glib::KeyFileError
469 Glib::ArrayHandle<Glib::ustring> get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const;
471 /** Returns the values associated with @a key under @a group_name
472 * translated into @a locale, if available.
473 * @param group_name The name of a group
474 * @param key The name of a key
475 * @param locale The name of a locale
476 * @return A list containing the values requested
477 * @throws Glib::KeyFileError
479 Glib::ArrayHandle<Glib::ustring> get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const;
482 /** Returns the values associated with @a key under @a group_name
483 * @param group_name The name of a group
484 * @param key The name of a key
485 * @return A list of booleans
486 * @throws Glib::KeyFileError
488 Glib::ArrayHandle<bool> get_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key) const;
491 /** Returns the values associated with @a key under @a group_name
492 * @param group_name The name of a group
493 * @param key The name of a key
494 * @return A list of integers
495 * @throws Glib::KeyFileError
497 Glib::ArrayHandle<int> get_integer_list(const Glib::ustring& group_name, const Glib::ustring& key) const;
500 /** Returns the values associated with @a key under @a group_name
501 * @param group_name The name of a group
502 * @param key The name of a key
503 * @return A list of doubles
504 * @throws Glib::KeyFileError
506 Glib::ArrayHandle<double> get_double_list(const Glib::ustring& group_name, const Glib::ustring& key) const;
509 /** Get comment from top of file
510 * @return The comment
512 Glib::ustring get_comment() const;
514 /** Get comment from above a group
515 * @param group_name The group
516 * @return The comment
518 Glib::ustring get_comment(const Glib::ustring& group_name) const;
521 /** Retrieves a comment above @a key from @a group_name .
522 * @a group_name . If @a key is <tt>0</tt> then @a comment will
523 * be read from above @a group_name . If both @a key
524 * and @a group_name are <tt>0</tt>, then @a comment will
525 * be read from above the first group in the file.
526 * @param group_name A group name, or <tt>0</tt>.
528 * @param error Return location for a G::Error.
529 * @return A comment that should be freed with g_free()
533 #ifdef GLIBMM_EXCEPTIONS_ENABLED
534 Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const;
536 Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const;
537 #endif //GLIBMM_EXCEPTIONS_ENABLED
540 /** Sets the character which is used to separate
541 * values in lists. Typically ';' or ',' are used
542 * as separators. The default list separator is ';'.
545 * @param separator The separator.
547 void set_list_separator(gchar separator);
549 /** Associates a new value with @a key under @a group_name . If @a key
550 * cannot be found then it is created. If @a group_name cannot be
551 * found then it is created.
554 * @param group_name A group name.
556 * @param value A string.
558 void set_value(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& value);
560 /** Associates a new string value with @a key under @a group_name . If
561 * @a key cannot be found then it is created. If @a group_name
562 * cannot be found then it is created.
565 * @param group_name A group name.
567 * @param string A string.
569 void set_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& string);
571 /** Associates a string value for @a key and @a locale under
572 * @a group_name . If the translation for @a key cannot be found
573 * then it is created.
576 * @param group_name A group name.
578 * @param locale A locale.
579 * @param string A string.
581 void set_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ustring& string);
583 /** Associates a new boolean value with @a key under @a group_name .
584 * If @a key cannot be found then it is created.
587 * @param group_name A group name.
589 * @param value <tt>true</tt> or <tt>false</tt>.
591 void set_boolean(const Glib::ustring& group_name, const Glib::ustring& key, bool value);
593 /** Associates a new integer value with @a key under @a group_name .
594 * If @a key cannot be found then it is created.
597 * @param group_name A group name.
599 * @param value An integer value.
601 void set_integer(const Glib::ustring& group_name, const Glib::ustring& key, int value);
603 /** Sets a list of string values for @a key under @a group_name. If
604 * key cannot be found it is created. If @a group_name cannot be found
606 * @param group_name The name of a group
607 * @param key The name of a key
608 * @param list A list holding objects of type Glib::ustring
610 void set_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ArrayHandle<Glib::ustring>& list);
613 /** Sets a list of string values for the @a key under @a group_name and marks
614 * them as being for @a locale. If the @a key or @a group_name cannot be
615 * found, they are created.
616 * @param group_name The name of a group
617 * @param key The name of a key
618 * @param locale A locale
619 * @param list A list holding objects of type Glib::ustring
621 void set_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ArrayHandle<Glib::ustring>& list);
624 /** Sets a list of booleans for the @a key under @a group_name.
625 * If either the @a key or @a group_name cannot be found they are created.
626 * @param group_name The name of a group
627 * @param key The name of a key
628 * @param list A list holding object of type bool
630 void set_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle<bool>& list);
633 /** Sets a list of integers for the @a key under @a group_name.
634 * If either the @a key or @a group_name cannot be found they are created.
635 * @param group_name The name of a group
636 * @param key The name of a key
637 * @param list A list holding object of type int
639 void set_integer_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle<int>& list);
642 /** Sets a list of doubles for the @a key under @a group_name.
643 * If either the @a key or @a group_name cannot be found they are created.
644 * @param group_name The name of a group
645 * @param key The name of a key
646 * @param list A list holding object of type int
650 void set_double_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle<double>& list);
653 /** Places @a comment at the start of the file, before the first group.
654 * @param comment The Comment
656 void set_comment(const Glib::ustring& comment);
658 /** Places @a comment above @a group_name.
659 * @param group_name The Group the comment should be above
660 * @param comment The comment
662 void set_comment(const Glib::ustring& group_name, const Glib::ustring& comment);
664 /** Places a comment above @a key from @a group_name.
665 * @param key Key comment should be above
666 * @param group_name Group comment is in
667 * @param comment The comment
670 /** Places a comment above @a key from @a group_name .
671 * @a group_name . If @a key is <tt>0</tt> then @a comment will
672 * be written above @a group_name . If both @a key
673 * and @a group_name are <tt>0</tt>, then @a comment will
674 * be written above the first group in the file.
677 * @param group_name A group name, or <tt>0</tt>.
679 * @param comment A comment.
680 * @param error Return location for a G::Error.
682 #ifdef GLIBMM_EXCEPTIONS_ENABLED
683 void set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment);
685 void set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment, std::auto_ptr<Glib::Error>& error);
686 #endif //GLIBMM_EXCEPTIONS_ENABLED
689 /** Removes a comment above @a key from @a group_name .
690 * @a group_name . If @a key is <tt>0</tt> then @a comment will
691 * be written above @a group_name . If both @a key
692 * and @a group_name are <tt>0</tt>, then @a comment will
693 * be written above the first group in the file.
696 * @param group_name A group name, or <tt>0</tt>.
698 * @param error Return location for a G::Error.
700 #ifdef GLIBMM_EXCEPTIONS_ENABLED
701 void remove_comment(const Glib::ustring& group_name, const Glib::ustring& key);
703 void remove_comment(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error);
704 #endif //GLIBMM_EXCEPTIONS_ENABLED
707 /** Removes @a key in @a group_name from the key file.
710 * @param group_name A group name.
711 * @param key A key name to remove.
712 * @param error Return location for a G::Error or <tt>0</tt>.
714 #ifdef GLIBMM_EXCEPTIONS_ENABLED
715 void remove_key(const Glib::ustring& group_name, const Glib::ustring& key);
717 void remove_key(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error);
718 #endif //GLIBMM_EXCEPTIONS_ENABLED
721 /** Removes the specified group, @a group_name ,
725 * @param group_name A group name.
726 * @param error Return location for a G::Error or <tt>0</tt>.
728 #ifdef GLIBMM_EXCEPTIONS_ENABLED
729 void remove_group(const Glib::ustring& group_name);
731 void remove_group(const Glib::ustring& group_name, std::auto_ptr<Glib::Error>& error);
732 #endif //GLIBMM_EXCEPTIONS_ENABLED
735 GKeyFile* gobj() { return gobject_; }
736 const GKeyFile* gobj() const { return gobject_; }
744 KeyFile(const KeyFile&);
745 KeyFile& operator=(const KeyFile&);
753 #endif /* _GLIBMM_KEYFILE_H */