gio.dbus_object_manager_server

Module for [DBusObjectManagerServer] class

Types 3

gio.dbus_object_manager_server.DBusObjectManagerServer is used to export gio.dbus_object.DBusObject instances using the standardized org.freedesktop.DBus.ObjectManager interface. For example, remote D-Bus clients can get all objects and properties in a single call. Additionally, any change in the object hierarchy is broadcast using signals. This means that D-Bus clients can keep caches up to date by only listening to D-Bus signals.

The recommended path to export an object manager at is the path form of the well-known name of a D-Bus service, or below. For example, if a D-Bus service is available at the well-known name net.example.ExampleService1, the object manager should typically be exported at /net/example/ExampleService1, or below (to allow for multiple object managers in a service).

It is supported, but not recommended, to export an object manager at the root path, `/`.

See gio.dbus_object_manager_client.DBusObjectManagerClient for the client-side code that is intended to be used with gio.dbus_object_manager_server.DBusObjectManagerServer or any D-Bus object implementing the org.freedesktop.DBus.ObjectManager interface.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
DBusObjectManagerServer self() nothrowReturns `this`, for use in `with` statements.
DBusObjectManagerServerGidBuilder builder() static nothrowGet builder for [gio.dbus_object_manager_server.DBusObjectManagerServer] Returns: New builder object
gio.dbus_connection.DBusConnection connection() @property nothrowGet `connection` property. Returns: The #GDBusConnection to export objects on.
void connection(gio.dbus_connection.DBusConnection propval) @property nothrowSet `connection` property. Params: propval = The #GDBusConnection to export objects on.
string objectPath() @property nothrowGet `objectPath` property. Returns: The object path to register the manager object at.
void export_(gio.dbus_object_skeleton.DBusObjectSkeleton object) nothrowExports object on manager.
void exportUniquely(gio.dbus_object_skeleton.DBusObjectSkeleton object) nothrowLike [gio.dbus_object_manager_server.DBusObjectManagerServer.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 alr...
gio.dbus_connection.DBusConnection getConnection() nothrowGets the #GDBusConnection used by manager. Returns: A #GDBusConnection object or null if manager isn't exported on a connection. The returned object should be freed with [gobject.object.ObjectWrap....
bool isExported(gio.dbus_object_skeleton.DBusObjectSkeleton object) nothrowReturns whether object is currently exported on manager.
void setConnection(gio.dbus_connection.DBusConnection connection = null) nothrowExports all objects managed by manager on connection. If connection is null, stops exporting objects.
bool unexport(string objectPath) nothrowIf manager has an object at path, removes the object. Otherwise does nothing.
Constructors
this(void * ptr, Flag!"Take" take)
this(string objectPath)Creates a new #GDBusObjectManagerServer object.

Fluent builder implementation template for gio.dbus_object_manager_server.DBusObjectManagerServer

Methods
T connection(gio.dbus_connection.DBusConnection propval) nothrowSet `connection` property. Params: propval = The #GDBusConnection to export objects on. Returns: Builder instance for fluent chaining
T objectPath(string propval) nothrowSet `objectPath` property. Params: propval = The object path to register the manager object at. Returns: Builder instance for fluent chaining