:right-sidebar: True DBusObjectManagerServer =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.30 .. class:: DBusObjectManagerServer(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.DBusObjectManager` :Constructors: :: DBusObjectManagerServer(**properties) new(object_path:str) -> Gio.DBusObjectManagerServer Constructors ------------ .. rst-class:: interim-class .. class:: DBusObjectManagerServer :no-index: .. classmethod:: new(object_path: str) -> ~gi.repository.Gio.DBusObjectManagerServer Creates a new :obj:`~gi.repository.Gio.DBusObjectManagerServer` object. The returned server isn't yet exported on any connection. To do so, use :func:`~gi.repository.Gio.DBusObjectManagerServer.set_connection`. Normally you want to export all of your objects before doing so to avoid `InterfacesAdded `_ signals being emitted. .. versionadded:: 2.30 :param object_path: The object path to export the manager object at. Methods ------- .. rst-class:: interim-class .. class:: DBusObjectManagerServer :no-index: .. method:: export(object: ~gi.repository.Gio.DBusObjectSkeleton) -> None Exports ``object`` on ``manager``. If there is already a :obj:`~gi.repository.Gio.DBusObject` 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 ``manager``. Note that ``manager`` will take a reference on ``object`` for as long as it is exported. .. versionadded:: 2.30 :param object: A :obj:`~gi.repository.Gio.DBusObjectSkeleton`. .. method:: export_uniquely(object: ~gi.repository.Gio.DBusObjectSkeleton) -> None Like :func:`~gi.repository.Gio.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 already exists. As such, the :obj:`~gi.repository.Gio.DBusObjectProxy`:g-object-path property of ``object`` may be modified. .. versionadded:: 2.30 :param object: An object. .. method:: get_connection() -> ~gi.repository.Gio.DBusConnection | None Gets the :obj:`~gi.repository.Gio.DBusConnection` used by ``manager``. .. versionadded:: 2.30 .. method:: is_exported(object: ~gi.repository.Gio.DBusObjectSkeleton) -> bool Returns whether ``object`` is currently exported on ``manager``. .. versionadded:: 2.34 :param object: An object. .. method:: set_connection(connection: ~gi.repository.Gio.DBusConnection | None = None) -> None Exports all objects managed by ``manager`` on ``connection``. If ``connection`` is :const:`None`, stops exporting objects. :param connection: A :obj:`~gi.repository.Gio.DBusConnection` or :const:`None`. .. method:: unexport(object_path: str) -> bool If ``manager`` 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 ``manager``. .. versionadded:: 2.30 :param object_path: An object path. Properties ---------- .. rst-class:: interim-class .. class:: DBusObjectManagerServer :no-index: .. attribute:: props.connection :type: ~gi.repository.Gio.DBusConnection The :obj:`~gi.repository.Gio.DBusConnection` to export objects on. .. versionadded:: 2.30 .. attribute:: props.object_path :type: str The object path to register the manager object at. .. versionadded:: 2.30 Fields ------ .. rst-class:: interim-class .. class:: DBusObjectManagerServer :no-index: .. attribute:: parent_instance .. attribute:: priv