Gio.DBusInterfaceSkeleton¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37), Gio.DBusInterface (3) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| export(connection, object_path) | |
| flush() | |
| get_connection() | |
| get_connections() | |
| get_flags() | |
| get_info() | |
| get_object_path() | |
| get_properties() | |
| has_connection(connection) | |
| set_flags(flags) | |
| unexport() | |
| unexport_from_connection(connection) | 
Virtual Methods¶
| Inherited: | GObject.Object (7), Gio.DBusInterface (3) | 
|---|
| do_flush() | |
| do_g_authorize_method(invocation) | |
| do_get_info() | |
| do_get_properties() | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| g-flags | Gio.DBusInterfaceSkeletonFlags | r/w | Flags for the interface skeleton | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| g-authorize-method | Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized. | 
Class Details¶
- 
class Gio.DBusInterfaceSkeleton(**kwargs)¶
- Bases: - GObject.Object,- Gio.DBusInterface- Abstract: - Yes - Structure: - Gio.DBusInterfaceSkeletonClass- Abstract base class for D-Bus interfaces on the service side. - New in version 2.30. - 
export(connection, object_path)[source]¶
- Parameters: - connection (Gio.DBusConnection) – AGio.DBusConnectionto export self on.
- object_path (str) – The path to export the interface at.
 - Raises: - Returns: - Trueif the interface was exported on connection, otherwise- Falsewith error set.- Return type: - Exports self at object_path on connection. - This can be called multiple times to export the same self onto multiple connections however the object_path provided must be the same for all connections. - Use - Gio.DBusInterfaceSkeleton.unexport() to unexport the object.- New in version 2.30. 
- connection (
 - 
flush()[source]¶
- If self has outstanding changes, request for these changes to be emitted immediately. - For example, an exported D-Bus interface may queue up property changes and emit the - org.freedesktop.DBus.Properties.PropertiesChangedsignal later (e.g. in an idle handler). This technique is useful for collapsing multiple property changes into one.- New in version 2.30. 
 - 
get_connection()[source]¶
- Returns: - A - Gio.DBusConnectionor- Noneif self is not exported anywhere. Do not free, the object belongs to self.- Return type: - Gio.DBusConnection- Gets the first connection that self is exported on, if any. - New in version 2.30. 
 - 
get_connections()[source]¶
- Returns: - A list of all the connections that self is exported on. The returned list should be freed with g_list_free() after each element has been freed with - GObject.Object.unref().- Return type: - [ - Gio.DBusConnection]- Gets a list of the connections that self is exported on. - New in version 2.32. 
 - 
get_flags()[source]¶
- Returns: - One or more flags from the - Gio.DBusInterfaceSkeletonFlagsenumeration.- Return type: - Gio.DBusInterfaceSkeletonFlags- Gets the - Gio.DBusInterfaceSkeletonFlagsthat describes what the behavior of self- New in version 2.30. 
 - 
get_info()[source]¶
- Returns: - A - Gio.DBusInterfaceInfo(never- None). Do not free.- Return type: - Gio.DBusInterfaceInfo- Gets D-Bus introspection information for the D-Bus interface implemented by self. - New in version 2.30. 
 - 
get_object_path()[source]¶
- Returns: - A string owned by self or - Noneif self is not exported anywhere. Do not free, the string belongs to self.- Return type: - str- Gets the object path that self is exported on, if any. - New in version 2.30. 
 - 
get_properties()[source]¶
- Returns: - A - GLib.Variantof type ‘’a{sv}’ [G-VARIANT-TYPE-VARDICT:CAPS]’. Free with- GLib.Variant.unref().- Return type: - GLib.Variant- Gets all D-Bus properties for self. - New in version 2.30. 
 - 
has_connection(connection)[source]¶
- Parameters: - connection ( - Gio.DBusConnection) – A- Gio.DBusConnection.- Returns: - Trueif self is exported on connection,- Falseotherwise.- Return type: - bool- Checks if self is exported on connection. - New in version 2.32. 
 - 
set_flags(flags)[source]¶
- Parameters: - flags ( - Gio.DBusInterfaceSkeletonFlags) – Flags from the- Gio.DBusInterfaceSkeletonFlagsenumeration.- Sets flags describing what the behavior of skeleton should be. - New in version 2.30. 
 - 
unexport()[source]¶
- Stops exporting self on all connections it is exported on. - To unexport self from only a single connection, use - Gio.DBusInterfaceSkeleton.unexport_from_connection()- New in version 2.30. 
 - 
unexport_from_connection(connection)[source]¶
- Parameters: - connection ( - Gio.DBusConnection) – A- Gio.DBusConnection.- Stops exporting self on connection. - To stop exporting on all connections the interface is exported on, use - Gio.DBusInterfaceSkeleton.unexport().- New in version 2.32. 
 - 
do_flush() virtual¶
- If interface_ has outstanding changes, request for these changes to be emitted immediately. - For example, an exported D-Bus interface may queue up property changes and emit the - org.freedesktop.DBus.Properties.PropertiesChangedsignal later (e.g. in an idle handler). This technique is useful for collapsing multiple property changes into one.- New in version 2.30. 
 - Parameters: - invocation ( - Gio.DBusMethodInvocation) –- Return type: - bool
 - 
do_get_info() virtual¶
- Returns: - A - Gio.DBusInterfaceInfo(never- None). Do not free.- Return type: - Gio.DBusInterfaceInfo- Gets D-Bus introspection information for the D-Bus interface implemented by interface_. - New in version 2.30. 
 - 
do_get_properties() virtual¶
- Returns: - A - GLib.Variantof type ‘’a{sv}’ [G-VARIANT-TYPE-VARDICT:CAPS]’. Free with- GLib.Variant.unref().- Return type: - GLib.Variant- Gets all D-Bus properties for interface_. - New in version 2.30. 
 
- 
Signal Details¶
- Signal Name: - g-authorize-method- Flags: - Parameters: - d_bus_interface_skeleton (Gio.DBusInterfaceSkeleton) – The object which received the signal
- invocation (Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
 - Returns: - Return type: - Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized. - Note that this signal is emitted in a thread dedicated to handling the method call so handlers are allowed to perform blocking IO. This means that it is appropriate to call e.g. polkit_authority_check_authorization_sync() with the POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION flag set. - If - Falseis returned then no further handlers are run and the signal handler must take a reference to invocation and finish handling the call (e.g. return an error via g_dbus_method_invocation_return_error()).- Otherwise, if - Trueis returned, signal emission continues. If no handlers return- False, then the method is dispatched. If interface has an enclosing- Gio.DBusObjectSkeleton, then the- Gio.DBusObjectSkeleton- ::authorize-methodsignal handlers run before the handlers for this signal.- The default class handler just returns - True.- Please note that the common case is optimized: if no signals handlers are connected and the default class handler isn’t overridden (for both interface and the enclosing - Gio.DBusObjectSkeleton, if any) and- Gio.DBusInterfaceSkeleton- :g-flagsdoes not have the- Gio.DBusInterfaceSkeletonFlags.HANDLE_METHOD_INVOCATIONS_IN_THREADflags set, no dedicated thread is ever used and the call will be handled in the same thread as the object that interface belongs to was exported in.- New in version 2.30. 
- d_bus_interface_skeleton (
Property Details¶
- 
Gio.DBusInterfaceSkeleton.props.g_flags¶
- Name: - g-flags- Type: - Gio.DBusInterfaceSkeletonFlags- Default Value: - Gio.DBusInterfaceSkeletonFlags.NONE- Flags: - READABLE,- WRITABLE- Flags from the - Gio.DBusInterfaceSkeletonFlagsenumeration.- New in version 2.30.