gio::prelude

Trait DBusObjectManagerServerExt

Source
pub trait DBusObjectManagerServerExt:
    IsA<DBusObjectManagerServer>
    + Sealed
    + 'static {
    // Provided methods
    fn export(&self, object: &impl IsA<DBusObjectSkeleton>) { ... }
    fn export_uniquely(&self, object: &impl IsA<DBusObjectSkeleton>) { ... }
    fn connection(&self) -> Option<DBusConnection> { ... }
    fn is_exported(&self, object: &impl IsA<DBusObjectSkeleton>) -> bool { ... }
    fn set_connection(&self, connection: Option<&DBusConnection>) { ... }
    fn unexport(&self, object_path: &str) -> bool { ... }
    fn connect_connection_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all DBusObjectManagerServer methods.

§Implementors

DBusObjectManagerServer

Provided Methods§

Source

fn export(&self, object: &impl IsA<DBusObjectSkeleton>)

Exports @object on @self.

If there is already a #GDBusObject exported at the object path, then the old object is removed.

The object path for @object must be in the hierarchy rooted by the object path for @self.

Note that @self will take a reference on @object for as long as it is exported.

§object

A #GDBusObjectSkeleton.

Source

fn export_uniquely(&self, object: &impl IsA<DBusObjectSkeleton>)

Like g_dbus_object_manager_server_export() but appends a string of the form _N (with N being a natural number) to @object’s object path if an object with the given path already exists. As such, the #GDBusObjectProxy:g-object-path property of @object may be modified.

§object

An object.

Source

fn connection(&self) -> Option<DBusConnection>

Gets the #GDBusConnection used by @self.

§Returns

A #GDBusConnection object or None if @self isn’t exported on a connection. The returned object should be freed with g_object_unref().

Source

fn is_exported(&self, object: &impl IsA<DBusObjectSkeleton>) -> bool

Returns whether @object is currently exported on @self.

§object

An object.

§Returns

true if @object is exported

Source

fn set_connection(&self, connection: Option<&DBusConnection>)

Exports all objects managed by @self on @connection. If @connection is None, stops exporting objects.

§connection

A #GDBusConnection or None.

Source

fn unexport(&self, object_path: &str) -> bool

If @self has an object at @path, removes the object. Otherwise does nothing.

Note that @object_path must be in the hierarchy rooted by the object path for @self.

§object_path

An object path.

§Returns

true if object at @object_path was removed, false otherwise.

Source

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

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§