IBusConfigService

IBusConfigService — Configuration service back-end.

Stability Level

Stable, unless otherwise indicated

Synopsis

                    IBusConfigService;
                    IBusConfigServiceClass;
IBusConfigService * ibus_config_service_new             (GDBusConnection *connection);
void                ibus_config_service_value_changed   (IBusConfigService *config,
                                                         const gchar *section,
                                                         const gchar *name,
                                                         GVariant *value);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----IBusObject
               +----IBusService
                     +----IBusConfigService

Description

An IBusConfigService is a base class for other configuration services such as GConf. Currently, directly known sub class is IBusConfigGConf.

IBusConfigServiceClass has following member functions: <itemizedlist> <listitem> <para>gboolean set_value(IBusConfigService *config, const gchar *section, const gchar *name, const GValue *value, IBusError **error) </para> <variablelist> <varlistentry> <term>config:</term> <listitem>A configure service</listitem> </varlistentry> <varlistentry> <term>section:</term> <listitem>Section name of the configuration option.</listitem> </varlistentry> <varlistentry> <term>name:</term> <listitem>Name of the configuration option.</listitem> </varlistentry> <varlistentry> <term>value:</term> <listitem>GValue that holds the value.</listitem> </varlistentry> <varlistentry> <term>error:</term> <listitem>Error outputs here.</listitem> </varlistentry> <varlistentry> <term>Returns:</term> <listitem>TRUE if succeed; FALSE otherwise.</listitem> </varlistentry> </variablelist> <para>Set a value to a configuration option. </para> </listitem> <listitem> <para>gboolean get_value(IBusConfigService *config, const gchar *section, const gchar *name, GValue *value, IBusError **error) </para> <variablelist> <varlistentry> <term>config:</term> <listitem>A configure service</listitem> </varlistentry> <varlistentry> <term>section:</term> <listitem>Section name of the configuration option.</listitem> </varlistentry> <varlistentry> <term>name:</term> <listitem>Name of the configuration option.</listitem> </varlistentry> <varlistentry> <term>value:</term> <listitem>GValue that holds the value.</listitem> </varlistentry> <varlistentry> <term>error:</term> <listitem>Error outputs here.</listitem> </varlistentry> <varlistentry> <term>Returns:</term> <listitem>TRUE if succeed; FALSE otherwise.</listitem> </varlistentry> </variablelist> <para>Get value of a configuration option. </para> </listitem> <listitem> <para>gboolean unset(IBusConfigService *config, const gchar *section, const gchar *name, IBusError **error) </para> <variablelist> <varlistentry> <term>config:</term> <listitem>A configure service</listitem> </varlistentry> <varlistentry> <term>section:</term> <listitem>Section name of the configuration option.</listitem> </varlistentry> <varlistentry> <term>name:</term> <listitem>Name of the configuration option.</listitem> </varlistentry> <varlistentry> <term>error:</term> <listitem>Error outputs here.</listitem> </varlistentry> <varlistentry> <term>Returns:</term> <listitem>TRUE if succeed; FALSE otherwise.</listitem> </varlistentry> </variablelist> <para>Remove an entry to a configuration option. </para> </listitem> </itemizedlist>

Details

IBusConfigService

typedef struct _IBusConfigService IBusConfigService;

An opaque data type representing a configure service.


IBusConfigServiceClass

typedef struct {
    /* class members */
    gboolean    (* set_value)   (IBusConfigService    *config,
                                 const gchar          *section,
                                 const gchar          *name,
                                 GVariant             *value,
                                 GError              **error);
    /**
     * get_value:
     * @config: An IBusConfig.
     * @section: section name
     * @name: value name
     *
     * @returns: (transfer full): The value in config associated with section and name.
     *
     */
    GVariant *  (* get_value)   (IBusConfigService    *config,
                                 const gchar          *section,
                                 const gchar          *name,
                                 GError              **error);
    gboolean    (* unset_value) (IBusConfigService    *config,
                                 const gchar          *section,
                                 const gchar          *name,
                                 GError              **error);
} IBusConfigServiceClass;


ibus_config_service_new ()

IBusConfigService * ibus_config_service_new             (GDBusConnection *connection);

New an IBusConfigService from an GDBusConnection.

connection :

An GDBusConnection.

Returns :

A newly allocated IBusConfigServices.

ibus_config_service_value_changed ()

void                ibus_config_service_value_changed   (IBusConfigService *config,
                                                         const gchar *section,
                                                         const gchar *name,
                                                         GVariant *value);

Change a value of a configuration option by sending a "ValueChanged" message to IBus service.

config :

An IBusConfigService.

section :

Section name of the configuration option.

name :

Name of the configure option.

value :

GVariant that holds the value.