|  |  |  | GIO Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Signals | ||||
#include <gio/gio.h>
                    GDBusObject;
struct              GDBusObjectIface;
const gchar *       g_dbus_object_get_object_path       (GDBusObject *object);
GList *             g_dbus_object_get_interfaces        (GDBusObject *object);
GDBusInterface *    g_dbus_object_get_interface         (GDBusObject *object,
                                                         const gchar *interface_name);
The GDBusObject type is the base type for D-Bus objects on both the service side (see GDBusObjectSkeleton) and the client side (see GDBusObjectProxy). It is essentially just a container of interfaces.
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.
| GTypeInterface  | The parent interface. | 
| Returns the object path. See g_dbus_object_get_object_path(). | |
| Returns all interfaces. See g_dbus_object_get_interfaces(). | |
| Returns an interface by name. See g_dbus_object_get_interface(). | |
| Signal handler for the "interface-added" signal. | |
| Signal handler for the "interface-removed" signal. | 
Since 2.30
const gchar *       g_dbus_object_get_object_path       (GDBusObject *object);
Gets the object path for object.
| 
 | A GDBusObject. | 
| Returns : | A string owned by object. Do not free. | 
Since 2.30
GList *             g_dbus_object_get_interfaces        (GDBusObject *object);
Gets the D-Bus interfaces associated with object.
| 
 | A GDBusObject. | 
| Returns : | (element-type GDBusInterface) (transfer full) : A list of GDBusInterface instances.
The returned list must be freed by g_list_free()after each element has been freed
withg_object_unref(). | 
Since 2.30
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.
| 
 | A GDBusObject. | 
| 
 | A D-Bus interface name. | 
| Returns : | NULLif not found, otherwise a
GDBusInterface that must be freed withg_object_unref(). [transfer full] | 
Since 2.30
"interface-added" signalvoid                user_function                      (GDBusObject    *object,
                                                        GDBusInterface *interface,
                                                        gpointer        user_data)      : Run Last
Emitted when interface is added to object.
| 
 | The GDBusObject emitting the signal. | 
| 
 | The GDBusInterface that was added. | 
| 
 | user data set when the signal handler was connected. | 
Since 2.30
"interface-removed" signalvoid                user_function                      (GDBusObject    *object,
                                                        GDBusInterface *interface,
                                                        gpointer        user_data)      : Run Last
Emitted when interface is removed from object.
| 
 | The GDBusObject emitting the signal. | 
| 
 | The GDBusInterface that was removed. | 
| 
 | user data set when the signal handler was connected. | 
Since 2.30