|  |  |  | Xfconf Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | ||||
struct XfconfBackendInterface; XfconfBackend; gboolean xfconf_backend_initialize (XfconfBackend *backend,GError **error); gboolean xfconf_backend_set (XfconfBackend *backend,const gchar *channel,const gchar *property,const GValue *value,GError **error); gboolean xfconf_backend_get (XfconfBackend *backend,const gchar *channel,const gchar *property,GValue *value,GError **error); gboolean xfconf_backend_get_all (XfconfBackend *backend,const gchar *channel,const gchar *property_base,GHashTable *properties,GError **error); gboolean xfconf_backend_exists (XfconfBackend *backend,const gchar *channel,const gchar *property,gboolean *exists,GError **error); gboolean xfconf_backend_reset (XfconfBackend *backend,const gchar *channel,const gchar *property,gboolean recursive,GError **error); gboolean xfconf_backend_flush (XfconfBackend *backend,GError **error); void xfconf_backend_register_property_changed_func (XfconfBackend *backend,XfconfPropertyChangedFunc func,gpointer user_data);
XfconfBackend is an abstract interface that allows the Xfconf Daemon to use different backends for storing configuration data. These backends can be flat text or binary files, a database, or just about anything one could think of to store data.
struct XfconfBackendInterface {
    GTypeInterface parent;
    
    gboolean (*initialize)(XfconfBackend *backend,
                           GError **error);
    
    gboolean (*set)(XfconfBackend *backend,
                    const gchar *channel,
                    const gchar *property,
                    const GValue *value,
                    GError **error);
    
    gboolean (*get)(XfconfBackend *backend,
                    const gchar *channel,
                    const gchar *property,
                    GValue *value,
                    GError **error);
    
    gboolean (*get_all)(XfconfBackend *backend,
                        const gchar *channel,
                        const gchar *property_base,
                        GHashTable *properties,
                        GError **error);
    
    gboolean (*exists)(XfconfBackend *backend,
                       const gchar *channel,
                       const gchar *property,
                       gboolean *exists,
                       GError **error);
    
    gboolean (*reset)(XfconfBackend *backend,
                      const gchar *channel,
                      const gchar *property,
                      gboolean recursive,
                      GError **error);
    gboolean (*list_channels)(XfconfBackend *backend,
                              GSList **channels,
                              GError **error);
    gboolean (*is_property_locked)(XfconfBackend *backend,
                                   const gchar *channel,
                                   const gchar *property,
                                   gboolean *locked,
                                   GError **error);
    
    gboolean (*flush)(XfconfBackend *backend,
                      GError **error);
    void (*register_property_changed_func)(XfconfBackend *backend,
                                           XfconfPropertyChangedFunc func,
                                           gpointer user_data);
    
    /*< reserved for future expansion >*/
    void (*_xb_reserved0)();
    void (*_xb_reserved1)();
    void (*_xb_reserved2)();
    void (*_xb_reserved3)();
};
An interface for implementing pluggable configuration store backends into the Xfconf Daemon.
See the XfconfBackend function documentation for a description of what each virtual function in XfconfBackendInterface should do.
| GTypeInterface  | GObject interface parent. | 
| See xfconf_backend_initialize(). | |
| See xfconf_backend_set(). | |
| See xfconf_backend_get(). | |
| See xfconf_backend_get_all(). | |
| See xfconf_backend_exists(). | |
| See xfconf_backend_reset(). | |
| See xfconf_backend_list_channels(). | |
| See xfconf_backend_is_property_locked(). | |
| See xfconf_backend_flush(). | |
| See xfconf_backend_register_property_changed_func(). | |
| Reserved for future expansion. | |
| Reserved for future expansion. | |
| Reserved for future expansion. | |
| Reserved for future expansion. | 
typedef struct _XfconfBackend XfconfBackend;
An instance of a class implementing a XfconfBackendInterface.
gboolean xfconf_backend_initialize (XfconfBackend *backend,GError **error);
Does any pre-initialization that the backend needs to function.
| 
 | The XfconfBackend. | 
| 
 | An error return. | 
| Returns : | The backend should return TRUEif initialization
was successful, orFALSEotherwise.  OnFALSE,errorshould be set to a description of the failure. | 
gboolean xfconf_backend_set (XfconfBackend *backend,const gchar *channel,const gchar *property,const GValue *value,GError **error);
Sets the variant value for property on channel.
| 
 | The XfconfBackend. | 
| 
 | A channel name. | 
| 
 | A property name. | 
| 
 | A value. | 
| 
 | An error return. | 
| Returns : | The backend should return TRUEif the operation
was successful, orFALSEotherwise.  OnFALSE,errorshould be set to a description of the failure. | 
gboolean xfconf_backend_get (XfconfBackend *backend,const gchar *channel,const gchar *property,GValue *value,GError **error);
Gets the value of property on channel and stores it in value.
| 
 | The XfconfBackend. | 
| 
 | A channel name. | 
| 
 | A property name. | 
| 
 | A GValue return. | 
| 
 | An error return. | 
| Returns : | The backend should return TRUEif the operation
was successful, orFALSEotherwise.  OnFALSE,errorshould be set to a description of the failure. | 
gboolean xfconf_backend_get_all (XfconfBackend *backend,const gchar *channel,const gchar *property_base,GHashTable *properties,GError **error);
Gets multiple properties and values on channel and stores them in
properties, which is already initialized to hold gchar* keys and
GValue* values.  The property_base parameter can be
used to limit the retrieval to a sub-tree of the property tree.
A value of the empty string ("") or forward slash ("/") for
property_base indicates the entire channel.
| 
 | The XfconfBackend. | 
| 
 | A channel name. | 
| 
 | The base of properties to return. | 
| 
 | A GHashTable. | 
| 
 | An error return. | 
| Returns : | The backend should return TRUEif the operation
was successful, orFALSEotherwise.  OnFALSE,errorshould be set to a description of the failure. | 
gboolean xfconf_backend_exists (XfconfBackend *backend,const gchar *channel,const gchar *property,gboolean *exists,GError **error);
Checks to see if property exists on channel, and stores TRUE or
FALSE in exists.
| 
 | The XfconfBackend. | 
| 
 | A channel name. | 
| 
 | A property name. | 
| 
 | A boolean return. | 
| 
 | An error return. | 
| Returns : | The backend should return TRUEif the operation
was successful, orFALSEotherwise.  OnFALSE,errorshould be set to a description of the failure. | 
gboolean xfconf_backend_reset (XfconfBackend *backend,const gchar *channel,const gchar *property,gboolean recursive,GError **error);
Resets the property identified by property from channel.
If recursive is TRUE, all sub-properties of property will be
reset as well.  If the empty string ("") or a forward slash ("/")
is specified for property, the entire channel will be reset.
If none of the properties specified are locked or have root-owned system-wide defaults set, this effectively removes the properties from the configuration store entirely.
| 
 | The XfconfBackend. | 
| 
 | A channel name. | 
| 
 | A property name. | 
| 
 | Whether or not the reset is recursive. | 
| 
 | An error return. | 
| Returns : | The backend should return TRUEif the operation
was successful, orFALSEotherwise.  OnFALSE,errorshould be set to a description of the failure. | 
gboolean xfconf_backend_flush (XfconfBackend *backend,GError **error);
For backends that support persistent storage, ensures that all configuration data stored in memory is saved to persistent storage.
| 
 | The XfconfBackend. | 
| 
 | An error return. | 
| Returns : | The backend should return TRUEif the operation
was successful, orFALSEotherwise.  OnFALSE,errorshould be set to a description of the failure. | 
void xfconf_backend_register_property_changed_func (XfconfBackend *backend,XfconfPropertyChangedFunc func,gpointer user_data);
Registers a function to be called when a property changes.  The
backend implementation should keep a pointer to func and user_data
and call func when a property in the configuration store changes.
| 
 | The XfconfBackend. | 
| 
 | A function of type XfconfPropertyChangeFunc. | 
| 
 | Arbitrary caller-supplied data. |