## IBusService IBusService — IBus service back-end. |

## Stability Level

Stable, unless otherwise indicated

## Synopsis

    struct              IBusService;
    struct              IBusServiceClass;
    IBusService *       ibus_service_new                    (GDBusConnection *connection,
                                                             const gchar *path);
    const gchar *       ibus_service_get_object_path        (IBusService *service);
    GDBusConnection *   ibus_service_get_connection         (IBusService *service);
    gboolean            ibus_service_register               (IBusService *service,
                                                             GDBusConnection *connection,
                                                             GError **error);
    void                ibus_service_unregister             (IBusService *service,
                                                             GDBusConnection *connection);
    gboolean            ibus_service_emit_signal            (IBusService *service,
                                                             const gchar *dest_bus_name,
                                                             const gchar *interface_name,
                                                             const gchar *signal_name,
                                                             GVariant *parameters,
                                                             GError **error);
    gboolean            ibus_service_class_add_interfaces   (IBusServiceClass *klass,
                                                             const gchar *xml_data);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----IBusObject
                   +----IBusService
                         +----IBusFactory
                         +----IBusConfigService
                         +----IBusEngine
                         +----IBusPanelService

## Description

An IBusService is a base class for services.

## Details

### struct IBusService

    struct IBusService;

An opaque data type representing an IBusService.

### struct IBusServiceClass

    struct IBusServiceClass {
        /* virtual functions */
        void        (* service_method_call)
                                        (IBusService        *service,
                                         GDBusConnection    *connection,
                                         const gchar        *sender,
                                         const gchar        *object_path,
                                         const gchar        *interface_name,
                                         const gchar        *method_name,
                                         GVariant           *parameters,
                                         GDBusMethodInvocation
                                                            *invocation);
        GVariant *  (* service_get_property)
                                        (IBusService        *service,
                                         GDBusConnection    *connection,
                                         const gchar        *sender,
                                         const gchar        *object_path,
                                         const gchar        *interface_name,
                                         const gchar        *property_name,
                                         GError            **error);
        gboolean    (* service_set_property)
                                        (IBusService        *service,
                                         GDBusConnection    *connection,
                                         const gchar        *sender,
                                         const gchar        *object_path,
                                         const gchar        *interface_name,
                                         const gchar        *property_name,
                                         GVariant           *value,
                                         GError            **error);
    };

### ibus_service_new ()

    IBusService *       ibus_service_new                    (GDBusConnection *connection,
                                                             const gchar *path);

New an IBusService.

`path` : | Object path.
Returns : | A newly allocated IBusService

### ibus_service_get_object_path ()

    const gchar *       ibus_service_get_object_path        (IBusService *service);

Returns the object path of an IBusService.

`service` : | An IBusService.
Returns : | The object path of `service`

### ibus_service_get_connection ()

    GDBusConnection *   ibus_service_get_connection         (IBusService *service);

Returns a connections.

`service` : | An IBusService.
Returns : | A GDBusConnection of an IBusService instance. [transfer none]

### ibus_service_register ()

    gboolean            ibus_service_register               (IBusService *service,
                                                             GDBusConnection *connection,
                                                             GError **error);

Registers service to a connection.

`service` : | An IBusService.
`connection` : | A GDBusConnection the service will be registered to.
`error` : | Return location for error or NULL.
Returns : | TRUE if the service was registered, FALSE otherwise.

### ibus_service_unregister ()

    void                ibus_service_unregister             (IBusService *service,
                                                             GDBusConnection *connection);

Unregisters service from a connection.

`service` : | An IBusService.
`connection` : | A GDBusConnection the service was registered with.

### ibus_service_emit_signal ()

    gboolean            ibus_service_emit_signal            (IBusService *service,
                                                             const gchar *dest_bus_name,
                                                             const gchar *interface_name,
                                                             const gchar *signal_name,
                                                             GVariant *parameters,
                                                             GError **error);

### ibus_service_class_add_interfaces ()

    gboolean            ibus_service_class_add_interfaces   (IBusServiceClass *klass,
                                                             const gchar *xml_data);

Set the interface introspection information with the service class.

`klass` : | An IBusServiceClass.
`xml_data` : | The introspection xml data.