Gio.DBusObjectManagerServer¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gio.DBusObjectManagerServer(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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 theorg.freedesktop.DBus.ObjectManager
interface.New in version 2.30.
- classmethod new(object_path)[source]¶
- Parameters:
object_path (
str
) – The object path to export the manager object at.- Returns:
A
Gio.DBusObjectManagerServer
object. Free withGObject.Object.unref
().- Return type:
Creates a new
Gio.DBusObjectManagerServer
object.The returned server isn’t yet exported on any connection. To do so, use
Gio.DBusObjectManagerServer.set_connection
(). Normally you want to export all of your objects before doing so to avoid InterfacesAdded signals being emitted.New in version 2.30.
- export(object)[source]¶
- Parameters:
object (
Gio.DBusObjectSkeleton
) – AGio.DBusObjectSkeleton
.
Exports object on self.
If there is already a
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 self.
Note that self will take a reference on object for as long as it is exported.
New in version 2.30.
- export_uniquely(object)[source]¶
- Parameters:
object (
Gio.DBusObjectSkeleton
) – An object.
Like
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, theGio.DBusObjectProxy
:g-object-path
property of object may be modified.New in version 2.30.
- get_connection()[source]¶
- Returns:
A
Gio.DBusConnection
object orNone
if self isn’t exported on a connection. The returned object should be freed withGObject.Object.unref
().- Return type:
Gets the
Gio.DBusConnection
used by self.New in version 2.30.
- is_exported(object)[source]¶
- Parameters:
object (
Gio.DBusObjectSkeleton
) – An object.- Returns:
True
if object is exported- Return type:
Returns whether object is currently exported on self.
New in version 2.34.
- set_connection(connection)[source]¶
- Parameters:
connection (
Gio.DBusConnection
orNone
) – AGio.DBusConnection
orNone
.
Exports all objects managed by self on connection. If connection is
None
, stops exporting objects.
Property Details¶
- Gio.DBusObjectManagerServer.props.connection¶
- Name:
connection
- Type:
- Default Value:
- Flags:
The
Gio.DBusConnection
to export objects on.New in version 2.30.