gio::prelude

Trait DBusObjectManagerExt

Source
pub trait DBusObjectManagerExt: IsA<DBusObjectManager> + 'static {
    // Provided methods
    fn interface(
        &self,
        object_path: &str,
        interface_name: &str,
    ) -> Option<DBusInterface> { ... }
    fn object(&self, object_path: &str) -> Option<DBusObject> { ... }
    fn object_path(&self) -> GString { ... }
    fn objects(&self) -> Vec<DBusObject> { ... }
    fn connect_interface_added<F: Fn(&Self, &DBusObject, &DBusInterface) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_interface_removed<F: Fn(&Self, &DBusObject, &DBusInterface) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_object_added<F: Fn(&Self, &DBusObject) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_object_removed<F: Fn(&Self, &DBusObject) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all DBusObjectManager methods.

§Implementors

DBusObjectManagerServer, DBusObjectManager

Provided Methods§

Source

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

Gets the interface proxy for @interface_name at @object_path, if any.

§object_path

Object path to look up.

§interface_name

D-Bus interface name to look up.

§Returns

A #GDBusInterface instance or None. Free with g_object_unref().

Source

fn object(&self, object_path: &str) -> Option<DBusObject>

Gets the #GDBusObject at @object_path, if any.

§object_path

Object path to look up.

§Returns

A #GDBusObject or None. Free with g_object_unref().

Source

fn object_path(&self) -> GString

Gets the object path that @self is for.

§Returns

A string owned by @self. Do not free.

Source

fn objects(&self) -> Vec<DBusObject>

Gets all #GDBusObject objects known to @self.

§Returns

A list of #GDBusObject objects. The returned list should be freed with g_list_free() after each element has been freed with g_object_unref().

Source

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

Emitted when @interface is added to @object.

This signal exists purely as a convenience to avoid having to connect signals to all objects managed by @manager.

§object

The #GDBusObject on which an interface was added.

§interface

The #GDBusInterface that was added.

Source

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

Emitted when @interface has been removed from @object.

This signal exists purely as a convenience to avoid having to connect signals to all objects managed by @manager.

§object

The #GDBusObject on which an interface was removed.

§interface

The #GDBusInterface that was removed.

Source

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

Emitted when @object is added to @manager.

§object

The #GDBusObject that was added.

Source

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

Emitted when @object is removed from @manager.

§object

The #GDBusObject that was removed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§