GDBusObject
GDBusObject — Base type for D-Bus objects
|
|
Object Hierarchy
GInterface
╰── GDBusObject
Prerequisites
GDBusObject requires
GObject.
Includes
#include <gio/gio.h>
Functions
g_dbus_object_get_object_path ()
const gchar *
g_dbus_object_get_object_path (GDBusObject *object);
Gets the object path for object
.
Returns
A string owned by object
. Do not free.
Since: 2.30
g_dbus_object_get_interfaces ()
GList *
g_dbus_object_get_interfaces (GDBusObject *object);
Gets the D-Bus interfaces associated with object
.
Returns
A list of GDBusInterface instances.
The returned list must be freed by g_list_free() after each element has been freed
with g_object_unref().
[element-type GDBusInterface][transfer full]
Since: 2.30
g_dbus_object_get_interface ()
GDBusInterface *
g_dbus_object_get_interface (GDBusObject *object,
const gchar *interface_name);
Gets the D-Bus interface with name interface_name
associated with
object
, if any.
Returns
NULL if not found, otherwise a
GDBusInterface that must be freed with g_object_unref().
[transfer full]
Since: 2.30
Types and Values
GDBusObject
typedef struct _GDBusObject GDBusObject;
GDBusObject is an opaque data structure and can only be accessed
using the following functions.
struct GDBusObjectIface
struct GDBusObjectIface {
GTypeInterface parent_iface;
/* Virtual Functions */
const gchar *(*get_object_path) (GDBusObject *object);
GList *(*get_interfaces) (GDBusObject *object);
GDBusInterface *(*get_interface) (GDBusObject *object,
const gchar *interface_name);
/* Signals */
void (*interface_added) (GDBusObject *object,
GDBusInterface *interface_);
void (*interface_removed) (GDBusObject *object,
GDBusInterface *interface_);
};
Base object type for D-Bus objects.
Since: 2.30
Signal Details
The “interface-added” signal
void
user_function (GDBusObject *object,
GDBusInterface *interface,
gpointer user_data)
Emitted when interface
is added to object
.
Flags: Run Last
Since: 2.30
The “interface-removed” signal
void
user_function (GDBusObject *object,
GDBusInterface *interface,
gpointer user_data)
Emitted when interface
is removed from object
.
Flags: Run Last
Since: 2.30