IBus.Service

g GObject.InitiallyUnowned GObject.InitiallyUnowned IBus.Object IBus.Object GObject.InitiallyUnowned->IBus.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned IBus.Service IBus.Service IBus.Object->IBus.Service

Subclasses:

IBus.ConfigService, IBus.Engine, IBus.Factory, IBus.PanelService

Methods

Inherited:

IBus.Object (2), GObject.Object (37)

Structs:

IBus.ServiceClass (2), GObject.ObjectClass (5)

class

add_interfaces (xml_data)

class

free_interfaces (depth)

class

new (connection, path)

emit_signal (dest_bus_name, interface_name, signal_name, parameters)

get_connection ()

get_object_path ()

register (connection)

unregister (connection)

Virtual Methods

Inherited:

IBus.Object (1), GObject.Object (7)

do_service_get_property (connection, sender, object_path, interface_name, property_name)

do_service_method_call (connection, sender, object_path, interface_name, method_name, parameters, invocation)

do_service_set_property (connection, sender, object_path, interface_name, property_name, value)

Properties

Name

Type

Flags

Short Description

connection

Gio.DBusConnection

r/w/c

The connection of service object

object-path

str

r/w/co

The path of service object

Signals

Inherited:

IBus.Object (1), GObject.Object (1)

Fields

Inherited:

IBus.Object (1), GObject.Object (1)

Name

Type

Access

Description

parent

IBus.Object

r

Class Details

class IBus.Service(**kwargs)
Bases:

IBus.Object

Abstract:

No

Structure:

IBus.ServiceClass

An IBus.Service is a base class for services.

classmethod add_interfaces(xml_data)
Parameters:

xml_data (str) – The introspection xml data.

Returns:

True if xml_data is valid and succeeded to be added; False otherwise.

Return type:

bool

Set the interface introspection information with the service class.

classmethod free_interfaces(depth)
Parameters:

depth (int) – The number of D-Bus introspection interfaces.

Returns:

The actual freed number of the introspection interfaces if depth is not 0. If depth is 0, the total number of the introspection interfaces is returned but any interfaces are not freed.

Return type:

int

Free the first depth interfaces if depth is positive. Free the last -depth interfaces if depth is negative.

classmethod new(connection, path)
Parameters:
Returns:

A newly allocated IBus.Service

Return type:

IBus.Service

Creantes a new IBus.Service.

emit_signal(dest_bus_name, interface_name, signal_name, parameters)
Parameters:
Raises:

GLib.Error

Return type:

bool

get_connection()
Returns:

A Gio.DBusConnection of an IBus.Service instance.

Return type:

Gio.DBusConnection

Gets a connections.

get_object_path()
Returns:

The object path of self

Return type:

str

Gets the object path of an IBus.Service.

register(connection)
Parameters:

connection (Gio.DBusConnection) – A Gio.DBusConnection the service will be registered to.

Raises:

GLib.Error

Returns:

True if the service was registered, False otherwise.

Return type:

bool

Registers service to a connection.

unregister(connection)
Parameters:

connection (Gio.DBusConnection) – A Gio.DBusConnection the service was registered with.

Unregisters service from a connection.

do_service_get_property(connection, sender, object_path, interface_name, property_name) virtual
Parameters:
  • connection (Gio.DBusConnection) – A dbus connection.

  • sender (str) – A sender.

  • object_path (str) – An object path.

  • interface_name (str) – An interface name.

  • property_name (str) – A property name.

Returns:

A variant.

Return type:

GLib.Variant or None

The ::service_get_property class method is to connect Gio.DBusInterfaceGetPropertyFunc().

do_service_method_call(connection, sender, object_path, interface_name, method_name, parameters, invocation) virtual
Parameters:

The ::service_method_call class method is to connect Gio.DBusInterfaceMethodCallFunc().

do_service_set_property(connection, sender, object_path, interface_name, property_name, value) virtual
Parameters:
  • connection (Gio.DBusConnection) – A dbus connection.

  • sender (str) – A sender.

  • object_path (str) – An object path.

  • interface_name (str) – An interface name.

  • property_name (str) – An property name.

  • value (GLib.Variant) – An property value.

Returns:

True if set the value else False.

Return type:

bool

The ::service_set_property class method is to connect Gio.DBusInterfaceSetPropertyFunc().

Property Details

IBus.Service.props.connection
Name:

connection

Type:

Gio.DBusConnection

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The connection of service object.

IBus.Service.props.object_path
Name:

object-path

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The path of service object.