gio::prelude

Trait DBusObjectSkeletonExt

Source
pub trait DBusObjectSkeletonExt:
    IsA<DBusObjectSkeleton>
    + Sealed
    + 'static {
    // Provided methods
    fn add_interface(&self, interface_: &impl IsA<DBusInterfaceSkeleton>) { ... }
    fn flush(&self) { ... }
    fn remove_interface(&self, interface_: &impl IsA<DBusInterfaceSkeleton>) { ... }
    fn remove_interface_by_name(&self, interface_name: &str) { ... }
    fn set_object_path(&self, object_path: &str) { ... }
    fn g_object_path(&self) -> Option<GString> { ... }
    fn set_g_object_path(&self, g_object_path: Option<&str>) { ... }
    fn connect_authorize_method<F: Fn(&Self, &DBusInterfaceSkeleton, &DBusMethodInvocation) -> bool + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_g_object_path_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all DBusObjectSkeleton methods.

§Implementors

DBusObjectSkeleton

Provided Methods§

Source

fn add_interface(&self, interface_: &impl IsA<DBusInterfaceSkeleton>)

Adds @interface_ to @self.

If @self already contains a #GDBusInterfaceSkeleton with the same interface name, it is removed before @interface_ is added.

Note that @self takes its own reference on @interface_ and holds it until removed.

§interface_

A #GDBusInterfaceSkeleton.

Source

fn flush(&self)

This method simply calls g_dbus_interface_skeleton_flush() on all interfaces belonging to @self. See that method for when flushing is useful.

Source

fn remove_interface(&self, interface_: &impl IsA<DBusInterfaceSkeleton>)

Removes @interface_ from @self.

§interface_

A #GDBusInterfaceSkeleton.

Source

fn remove_interface_by_name(&self, interface_name: &str)

Removes the #GDBusInterface with @interface_name from @self.

If no D-Bus interface of the given interface exists, this function does nothing.

§interface_name

A D-Bus interface name.

Source

fn set_object_path(&self, object_path: &str)

Sets the object path for @self.

§object_path

A valid D-Bus object path.

Source

fn g_object_path(&self) -> Option<GString>

The object path where the object is exported.

Source

fn set_g_object_path(&self, g_object_path: Option<&str>)

The object path where the object is exported.

Source

fn connect_authorize_method<F: Fn(&Self, &DBusInterfaceSkeleton, &DBusMethodInvocation) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized.

This signal is like #GDBusInterfaceSkeleton’s #GDBusInterfaceSkeleton::g-authorize-method signal, except that it is for the enclosing object.

The default class handler just returns true.

§interface

The #GDBusInterfaceSkeleton that @invocation is for.

§invocation

A #GDBusMethodInvocation.

§Returns

true if the call is authorized, false otherwise.

Source

fn connect_g_object_path_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§