GDBusObjectManagerServer
GDBusObjectManagerServer — Service-side object manager
|
|
Object Hierarchy
GObject
╰── GDBusObjectManagerServer
Includes
#include <gio/gio.h>
Description
GDBusObjectManagerServer is used to export GDBusObject 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 GDBusObjectManagerClient 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.
Functions
g_dbus_object_manager_server_set_connection ()
void
g_dbus_object_manager_server_set_connection
(GDBusObjectManagerServer *manager,
GDBusConnection *connection);
Exports all objects managed by manager
on connection
. If
connection
is NULL, stops exporting objects.
g_dbus_object_manager_server_export ()
void
g_dbus_object_manager_server_export (GDBusObjectManagerServer *manager,
GDBusObjectSkeleton *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.
Since: 2.30
g_dbus_object_manager_server_is_exported ()
gboolean
g_dbus_object_manager_server_is_exported
(GDBusObjectManagerServer *manager,
GDBusObjectSkeleton *object);
Returns whether object
is currently exported on manager
.
Returns
TRUE if object
is exported
Since: 2.34
g_dbus_object_manager_server_unexport ()
gboolean
g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager,
const gchar *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
.
Returns
TRUE if object at object_path
was removed, FALSE otherwise.
Since: 2.30
Types and Values
GDBusObjectManagerServer
typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer;
The GDBusObjectManagerServer structure contains private data and should
only be accessed using the provided API.
Since: 2.30
struct GDBusObjectManagerServerClass
struct GDBusObjectManagerServerClass {
GObjectClass parent_class;
};
Class structure for GDBusObjectManagerServer.
Since: 2.30
Property Details
The “object-path” property
“object-path” gchar *
The object path to register the manager object at.
Owner: GDBusObjectManagerServer
Flags: Read / Write / Construct Only
Default value: NULL
Since: 2.30