#include <client.h>
Inheritance diagram for Gnome::Conf::Client:
Public Member Functions | |
virtual | ~Client () |
GConfClient * | gobj () |
const GConfClient * | gobj () const |
GConfClient * | gobj_copy () |
void | add_dir (const Glib::ustring &dir, ClientPreloadType preload=CLIENT_PRELOAD_NONE) |
Add a directory to the list of directories the Client will watch. | |
void | remove_dir (const Glib::ustring &dir) |
Remove a directory from the list of directories the Client will watch. | |
guint | notify_add (const Glib::ustring &namespace_section, Callback callback) |
Request notification of changes to namespace_section. | |
void | notify_remove (guint cnxn) |
Cancel a notification request. | |
void | set_error_handling (ClientErrorHandlingMode mode) |
void | clear_cache () |
Clear the client-side cache. | |
void | preload (const Glib::ustring &dirname, ClientPreloadType type) |
Preloads a directory. | |
Value | get (const Glib::ustring &key) const |
Get the value of a configuration key. | |
Value | get_without_default (const Glib::ustring &key) const |
Get the value of a configuration key, without falling back to the default if the key has not been set. | |
Value | get_default_from_schema (const Glib::ustring &key) const |
Get the default value of this key by looking it up in the appropriate schema. | |
Entry | get_entry (const Glib::ustring &key, bool use_schema_default=true) const |
Get the complete Entry of the specified key. | |
Entry | get_entry (const Glib::ustring &key, const char *locale, bool use_schema_default=true) const |
Get the complete Entry of the specified key. | |
void | unset (const Glib::ustring &key) |
Unset a configuration key. | |
Glib::SListHandle< Entry > | all_entries (const Glib::ustring &dir) const |
Retrieve all keys in the given configuration directory. | |
Glib::SListHandle< Glib::ustring > | all_dirs (const Glib::ustring &dir) const |
Retrieve all subdirectories of a given configuration directory. | |
void | suggest_sync () |
Suggest to the GConf server that a sync of cached data to stable storage would be appropriate now. | |
bool | dir_exists (const Glib::ustring &) const |
Determine whether a given configuration directory exists. | |
bool | key_is_writable (const Glib::ustring &) const |
Determine whether a given configuration key is writeable by the application. | |
double | get_float (const Glib::ustring &key) const |
Get the float value at the given configuration key. | |
gint | get_int (const Glib::ustring &key) const |
Get the integer at the given configuration key. | |
bool | get_bool (const Glib::ustring &key) const |
Get the boolean at the given configuration key. | |
Glib::ustring | get_string (const Glib::ustring &key) const |
Get the string at the given configuration key. | |
Schema | get_schema (const Glib::ustring &key) const |
Get the Schema at the given configuration key. | |
SListHandle_ValueInt | get_int_list (const Glib::ustring &key) const |
Get the list of integers at the given configuration key. | |
SListHandle_ValueBool | get_bool_list (const Glib::ustring &key) const |
Get the list of booleans at the given configuration key. | |
SListHandle_ValueFloat | get_float_list (const Glib::ustring &key) const |
Get the list of doubles at the given configuration key. | |
SListHandle_ValueSchema | get_schema_list (const Glib::ustring &key) const |
Get the list of Schemas at the given configuration key. | |
SListHandle_ValueString | get_string_list (const Glib::ustring &key) const |
Get the list of strings at the given configuration key. | |
ValuePair | get_pair (const Glib::ustring &key, ValueTypePair types) const |
Get the pair at the given configuration key. | |
void | set (const Glib::ustring &key, int what) |
Set the given configuration key to the specified integer value. | |
void | set (const Glib::ustring &key, bool what) |
Set the given configuration key to the specified boolean value. | |
void | set (const Glib::ustring &key, double what) |
Set the given configuration key to the specified double value. | |
void | set (const Glib::ustring &key, const Glib::ustring &what) |
Set the given configuration key to the specified string. | |
void | set (const Glib::ustring &key, const Schema &what) |
Set the given configuration key to the specified Schema. | |
void | set (const Glib::ustring &key, const Value &what) |
Set the given configuration key to the specified Value. | |
ChangeSet | change_set_from_current (const Glib::SArray &set) |
Create a ChangeSet from the current values of the configuration database. | |
void | change_set_commit (ChangeSet &set, bool remove_commited) |
Commit the ChangeSet to the configuration database. | |
ChangeSet | change_set_reverse (const ChangeSet &set) |
Creates a ChangeSet to reverse the effects of the given ChangeSet. | |
Glib::SignalProxy2< void, const Glib::ustring &, const Value & > | signal_value_changed () |
void | value_changed (const Glib::ustring &key, const Value &value) |
Glib::SignalProxy1< void, const Glib::Error & > | signal_error () |
void | error (const Glib::Error &error) |
Static Public Member Functions | |
Glib::RefPtr< Client > | get_default_client () |
Get the default client object for this application. | |
Glib::RefPtr< Client > | get_client_for_engine (GConfEngine *engine) |
Protected Member Functions | |
virtual void | on_value_changed (const Glib::ustring &key, const Value &value) |
virtual void | on_unreturned_error (const Glib::Error &error) |
virtual void | on_error (const Glib::Error &error) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gnome::Conf::Client > | wrap (GConfClient *object, bool take_copy=false) |
This class allows you to interface withe the Gnome configuration system. Generally, it stores key-value pairs. The keys have an hierarchical namespace, with elements separated by slashes. The values are either typed primitives (int, bool, string, float or a Schema
), or lists of primitives or pairs of primitives (for limits on the compound values, see Value). For conventions on the names of keys, see the GConf documentation.
|
|
|
Add a directory to the list of directories the Client will watch. Any changes to keys below this directory will cause the "value_changed" signal to be emitted. When you add the directory, you can request that the Client preloads its contents - see ClientPreloadType for details. Added directories may not overlap. That is, if you add "/foo", you may not add "/foo/bar". However you can add "/foo" and "/bar". You can also add "/foo" multiple times; if you add a directory multiple times, it will not be removed until you call remove_dir() an equal number of times.
|
|
Retrieve all subdirectories of a given configuration directory.
|
|
Retrieve all keys in the given configuration directory. Get all the configuration keys in the given directory, without recursion.
|
|
Commit the ChangeSet to the configuration database.
Commits the configuration changes in the ChangeSet to the database. If
|
|
Create a ChangeSet from the current values of the configuration database.
Creates a ChangeSet containing the current values of all the keys listed in the
|
|
Creates a ChangeSet to reverse the effects of the given ChangeSet.
Creates a ChangeSet that contains the current values of the keys in
|
|
Clear the client-side cache.
|
|
Determine whether a given configuration directory exists.
|
|
|
|
Get the value of a configuration key. key: the configuration key to retrieve.
|
|
Get the boolean at the given configuration key. Throws an error if the key does not contain the appropriate type.
|
|
Get the list of booleans at the given configuration key. If the given key is not a list, or the list elements are not of the appropriate type, an error will be thrown.
|
|
|
|
Get the default client object for this application. The object is a Singleton, so you will always get the same instance. Most applications should use this. |
|
Get the default value of this key by looking it up in the appropriate schema. key: the configuration key to retrieve.
|
|
Get the complete Entry of the specified key.
|
|
Get the complete Entry of the specified key. Uses the default locale
|
|
Get the float value at the given configuration key. Throws an error if the key does not contain the appropriate type.
|
|
Get the list of doubles at the given configuration key. If the given key is not a list, or the list elements are not of the appropriate type, an error will be thrown.
|
|
Get the integer at the given configuration key. Throws an error if the key does not contain the appropriate type.
|
|
Get the list of integers at the given configuration key. If the given key is not a list, or the list elements are not of the appropriate type, an error will be thrown.
|
|
Get the pair at the given configuration key.
The pair's elements must have the types given in
|
|
Get the Schema at the given configuration key. Throws an error if the key does not contain the appropriate type.
|
|
Get the list of Schemas at the given configuration key. If the given key is not a list, or the list elements are not of the appropriate type, an error will be thrown.
|
|
Get the string at the given configuration key. Throws an error if the key does not contain the appropriate type.
|
|
Get the list of strings at the given configuration key. If the given key is not a list, or the list elements are not of the appropriate type, an error will be thrown.
|
|
Get the value of a configuration key, without falling back to the default if the key has not been set. In that case, the type of the value will be VALUE_INVALID.
|
|
Reimplemented from Glib::ObjectBase. |
|
Reimplemented from Glib::ObjectBase. |
|
|
|
Determine whether a given configuration key is writeable by the application.
|
|
Request notification of changes to namespace_section.
This includes the key The callback will be called with the key that changed and the Entry that holds the new Value. If the Value has a type of VALUE_INVALID, then the key has been unset. The function returns a connection ID you can use when calling notify_remove().
|
|
Cancel a notification request.
|
|
|
|
|
|
|
|
Preloads a directory. Normally this happens automatically with add_dir(), but if you've called clear_cache() you may need to do it again.
|
|
Remove a directory from the list of directories the Client will watch.
|
|
Set the given configuration key to the specified Value.
Implements Gnome::Conf::SetInterface. |
|
Set the given configuration key to the specified Schema.
Implements Gnome::Conf::SetInterface. |
|
Set the given configuration key to the specified string.
Implements Gnome::Conf::SetInterface. |
|
Set the given configuration key to the specified double value.
Implements Gnome::Conf::SetInterface. |
|
Set the given configuration key to the specified boolean value.
Implements Gnome::Conf::SetInterface. |
|
Set the given configuration key to the specified integer value.
Implements Gnome::Conf::SetInterface. |
|
|
|
|
|
|
|
Suggest to the GConf server that a sync of cached data to stable storage would be appropriate now.
|
|
Unset a configuration key.
|
|
|
|
|