Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DBusObjectManagerServer

[27:7] extends: object

GDBusObjectManagerServer is used to export [iface@Gio.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 [class@Gio.DBusObjectManagerClient] for the client-side code that is intended to be used with GDBusObjectManagerServer or any D-Bus object implementing the org.freedesktop.DBus.ObjectManager interface.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • DBusObjectManagerServer (object_path = null)

    Creates a new #GDBusObjectManagerServer object. The returned server isn't yet exported on any connection. To do so, use g_dbus_object_manager_server_set_connection(). Normally you want to export all of your objects before doing so to avoid InterfacesAdded signals being emitted.

    • @p object_path is The object path to export the manager object at..
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asDBusObjectManager ()

    Wraps this handle as DBusObjectManager.

    • @r A DBusObjectManager object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setConnection (object Value)

    The #GDBusConnection to export objects on.

    • @p Value is the new property value.
    • @r None.
  • export (object object)

    Exports @object on @manager. 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 @manager. Note that @manager will take a reference on @object for as long as it is exported.
    • @p object is A #GDBusObjectSkeleton..
    • @r None.
  • export_uniquely (object object)

    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.

    • @p object is An object..
    • @r None.
  • get_connection ()

    Gets the #GDBusConnection used by @manager.

  • is_exported (object object)

    Returns whether @object is currently exported on @manager.

    • @p object is An object..
  • set_connection (object connection)

    Exports all objects managed by @manager on @connection. If @connection is %NULL, stops exporting objects.

    • @p connection is A #GDBusConnection or %NULL..
    • @r None.
  • unexport (string object_path)

    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.

    • @p object_path is An object path..

class: DBusObjectManagerServerMeta

[234:14] static extends: object

Generated metadata helpers for DBusObjectManagerServer class surfaces.

Methods

  • properties ()

    Returns property metadata for DBusObjectManagerServer.

    • @r A list.