| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
#include <gio/gio.h>
GDBusInterfaceSkeleton;
struct GDBusInterfaceSkeletonClass;
void g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_);
GDBusInterfaceInfo * g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_);
GDBusInterfaceVTable * g_dbus_interface_skeleton_get_vtable
(GDBusInterfaceSkeleton *interface_);
GVariant * g_dbus_interface_skeleton_get_properties
(GDBusInterfaceSkeleton *interface_);
gboolean g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_,
GDBusConnection *connection,
const gchar *object_path,
GError **error);
void g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_);
void g_dbus_interface_skeleton_unexport_from_connection
(GDBusInterfaceSkeleton *interface_,
GDBusConnection *connection);
GDBusConnection * g_dbus_interface_skeleton_get_connection
(GDBusInterfaceSkeleton *interface_);
GList * g_dbus_interface_skeleton_get_connections
(GDBusInterfaceSkeleton *interface_);
gboolean g_dbus_interface_skeleton_has_connection
(GDBusInterfaceSkeleton *interface_,
GDBusConnection *connection);
const gchar * g_dbus_interface_skeleton_get_object_path
(GDBusInterfaceSkeleton *interface_);
enum GDBusInterfaceSkeletonFlags;
GDBusInterfaceSkeletonFlags g_dbus_interface_skeleton_get_flags
(GDBusInterfaceSkeleton *interface_);
void g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_,
GDBusInterfaceSkeletonFlags flags);
typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton;
The GDBusInterfaceSkeleton structure contains private data and should only be accessed using the provided API.
Since 2.30
struct GDBusInterfaceSkeletonClass {
GObjectClass parent_class;
/* Virtual Functions */
GDBusInterfaceInfo *(*get_info) (GDBusInterfaceSkeleton *interface_);
GDBusInterfaceVTable *(*get_vtable) (GDBusInterfaceSkeleton *interface_);
GVariant *(*get_properties) (GDBusInterfaceSkeleton *interface_);
void (*flush) (GDBusInterfaceSkeleton *interface_);
/* Signals */
gboolean (*g_authorize_method) (GDBusInterfaceSkeleton *interface_,
GDBusMethodInvocation *invocation);
};
Class structure for GDBusInterfaceSkeleton.
GObjectClass |
The parent class. |
Returns a GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details. |
|
Returns a GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details. |
|
Returns a GVariant with all properties. See g_dbus_interface_skeleton_get_properties(). |
|
Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush(). |
|
| Signal class handler for the "g-authorize-method" signal. |
Since 2.30
void g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_);
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::PropertiesChanged
signal later (e.g. in an idle handler). This technique is useful
for collapsing multiple property changes into one.
|
A GDBusInterfaceSkeleton. |
Since 2.30
GDBusInterfaceInfo * g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_);
Gets D-Bus introspection information for the D-Bus interface
implemented by interface_.
|
A GDBusInterfaceSkeleton. |
Returns : |
A GDBusInterfaceInfo (never NULL). Do not free. [transfer none]
|
Since 2.30
GDBusInterfaceVTable * g_dbus_interface_skeleton_get_vtable
(GDBusInterfaceSkeleton *interface_);
Gets the interface vtable for the D-Bus interface implemented by
interface_. The returned function pointers should expect interface_
itself to be passed as user_data.
|
A GDBusInterfaceSkeleton. |
Returns : |
A GDBusInterfaceVTable (never NULL). |
Since 2.30
GVariant * g_dbus_interface_skeleton_get_properties
(GDBusInterfaceSkeleton *interface_);
Gets all D-Bus properties for interface_.
|
A GDBusInterfaceSkeleton. |
Returns : |
A GVariant of type 'a{sv}'. Free with g_variant_unref(). [transfer full]
|
Since 2.30
gboolean g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_,GDBusConnection *connection,const gchar *object_path,GError **error);
Exports interface_ at object_path on connection.
This can be called multiple times to export the same interface_
onto multiple connections however the object_path provided must be
the same for all connections.
Use g_dbus_interface_skeleton_unexport() to unexport the object.
|
The D-Bus interface to export. |
|
A GDBusConnection to export interface_ on. |
|
The path to export the interface at. |
|
Return location for error or NULL. |
Returns : |
TRUE if the interface was exported on connection, otherwise FALSE with
error set. |
Since 2.30
void g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_);
Stops exporting interface_ on all connections it is exported on.
To unexport interface_ from only a single connection, use
g_dbus_interface_skeleton_unexport_from_connection()
|
A GDBusInterfaceSkeleton. |
Since 2.30
void g_dbus_interface_skeleton_unexport_from_connection (GDBusInterfaceSkeleton *interface_,GDBusConnection *connection);
Stops exporting interface_ on connection.
To stop exporting on all connections the interface is exported on,
use g_dbus_interface_skeleton_unexport().
|
A GDBusInterfaceSkeleton. |
|
A GDBusConnection. |
Since 2.32
GDBusConnection * g_dbus_interface_skeleton_get_connection
(GDBusInterfaceSkeleton *interface_);
Gets the first connection that interface_ is exported on, if any.
|
A GDBusInterfaceSkeleton. |
Returns : |
A GDBusConnection or NULL if interface_ is
not exported anywhere. Do not free, the object belongs to interface_. [transfer none]
|
Since 2.30
GList * g_dbus_interface_skeleton_get_connections
(GDBusInterfaceSkeleton *interface_);
Gets a list of the connections that interface_ is exported on.
|
A GDBusInterfaceSkeleton. |
Returns : |
A list of
all the connections that interface_ is exported on. The returned
list should be freed with g_list_free() after each element has
been freed with g_object_unref(). [element-type GDBusConnection][transfer full]
|
Since 2.32
gboolean g_dbus_interface_skeleton_has_connection (GDBusInterfaceSkeleton *interface_,GDBusConnection *connection);
Checks if interface_ is exported on connection.
|
A GDBusInterfaceSkeleton. |
|
A GDBusConnection. |
Returns : |
TRUE if interface_ is exported on connection, FALSE otherwise. |
Since 2.32
const gchar * g_dbus_interface_skeleton_get_object_path
(GDBusInterfaceSkeleton *interface_);
Gets the object path that interface_ is exported on, if any.
|
A GDBusInterfaceSkeleton. |
Returns : |
A string owned by interface_ or NULL if interface_ is not exported
anywhere. Do not free, the string belongs to interface_. |
Since 2.30
typedef enum {
G_DBUS_INTERFACE_SKELETON_FLAGS_NONE = 0,
G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD = (1<<0)
} GDBusInterfaceSkeletonFlags;
Flags describing the behavior of a GDBusInterfaceSkeleton instance.
Since 2.30
GDBusInterfaceSkeletonFlags g_dbus_interface_skeleton_get_flags
(GDBusInterfaceSkeleton *interface_);
Gets the GDBusInterfaceSkeletonFlags that describes what the behavior
of interface_
|
A GDBusInterfaceSkeleton. |
Returns : |
One or more flags from the GDBusInterfaceSkeletonFlags enumeration. |
Since 2.30
void g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_,GDBusInterfaceSkeletonFlags flags);
Sets flags describing what the behavior of skeleton should be.
|
A GDBusInterfaceSkeleton. |
|
Flags from the GDBusInterfaceSkeletonFlags enumeration. |
Since 2.30
"g-flags" property"g-flags" GDBusInterfaceSkeletonFlags : Read / Write
Flags from the GDBusInterfaceSkeletonFlags enumeration.
Since 2.30
"g-authorize-method" signalgboolean user_function (GDBusInterfaceSkeleton *interface,
GDBusMethodInvocation *invocation,
gpointer user_data) : Run Last
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 FALSE is 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 TRUE is returned, signal emission continues. If no
handlers return FALSE, then the method is dispatched. If
interface has an enclosing GDBusObjectSkeleton, then the
"authorize-method" signal 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
GDBusObjectSkeleton, if any) and "g-flags" does
not have the
G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
flags 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.
|
The GDBusInterfaceSkeleton emitting the signal. |
|
A GDBusMethodInvocation. |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the call is authorized, FALSE otherwise. |
Since 2.30