Trait gio::prelude::DBusObjectExt

source ·
pub trait DBusObjectExt: IsA<DBusObject> + Sealed + 'static {
    // Provided methods
    fn interface(&self, interface_name: &str) -> Option<DBusInterface> { ... }
    fn interfaces(&self) -> Vec<DBusInterface> { ... }
    fn object_path(&self) -> GString { ... }
    fn connect_interface_added<F: Fn(&Self, &DBusInterface) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
    fn connect_interface_removed<F: Fn(&Self, &DBusInterface) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all DBusObject methods.

§Implementors

DBusObject

Provided Methods§

source

fn interface(&self, interface_name: &str) -> Option<DBusInterface>

Gets the D-Bus interface with name @interface_name associated with @self, if any.

§interface_name

A D-Bus interface name.

§Returns

None if not found, otherwise a #GDBusInterface that must be freed with g_object_unref().

source

fn interfaces(&self) -> Vec<DBusInterface>

Gets the D-Bus interfaces associated with @self.

§Returns

A list of #GDBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed with g_object_unref().

source

fn object_path(&self) -> GString

Gets the object path for @self.

§Returns

A string owned by @self. Do not free.

source

fn connect_interface_added<F: Fn(&Self, &DBusInterface) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted when @interface is added to @object.

§interface

The #GDBusInterface that was added.

source

fn connect_interface_removed<F: Fn(&Self, &DBusInterface) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted when @interface is removed from @object.

§interface

The #GDBusInterface that was removed.

Object Safety§

This trait is not object safe.

Implementors§