GDBusObjectManager

GDBusObjectManager — Base type for D-Bus object managers

Synopsis

#include <gio/gio.h>

                    GDBusObjectManager;
struct              GDBusObjectManagerIface;
const gchar *       g_dbus_object_manager_get_object_path
                                                        (GDBusObjectManager *manager);
GList *             g_dbus_object_manager_get_objects   (GDBusObjectManager *manager);
GDBusObject *       g_dbus_object_manager_get_object    (GDBusObjectManager *manager,
                                                         const gchar *object_path);
GDBusInterface *    g_dbus_object_manager_get_interface (GDBusObjectManager *manager,
                                                         const gchar *object_path,
                                                         const gchar *interface_name);

Object Hierarchy

  GInterface
   +----GDBusObjectManager

Prerequisites

GDBusObjectManager requires GObject.

Known Implementations

GDBusObjectManager is implemented by GDBusObjectManagerClient and GDBusObjectManagerServer.

Signals

  "interface-added"                                : Run Last
  "interface-removed"                              : Run Last
  "object-added"                                   : Run Last
  "object-removed"                                 : Run Last

Description

The GDBusObjectManager type is the base type for service- and client-side implementations of the standardized org.freedesktop.DBus.ObjectManager interface.

See GDBusObjectManagerClient for the client-side implementation and GDBusObjectManagerServer for the service-side implementation.

Details

GDBusObjectManager

typedef struct _GDBusObjectManager GDBusObjectManager;

struct GDBusObjectManagerIface

struct GDBusObjectManagerIface {
  GTypeInterface parent_iface;

  /* Virtual Functions */
  const gchar     *(*get_object_path) (GDBusObjectManager    *manager);
  GList           *(*get_objects)     (GDBusObjectManager    *manager);
  GDBusObject     *(*get_object)      (GDBusObjectManager    *manager,
                                       const gchar           *object_path);
  GDBusInterface  *(*get_interface)   (GDBusObjectManager    *manager,
                                       const gchar           *object_path,
                                       const gchar           *interface_name);

  /* Signals */
  void    (*object_added)                 (GDBusObjectManager   *manager,
                                           GDBusObject          *object);
  void    (*object_removed)               (GDBusObjectManager   *manager,
                                           GDBusObject          *object);

  void    (*interface_added)              (GDBusObjectManager   *manager,
                                           GDBusObject          *object,
                                           GDBusInterface       *interface_);
  void    (*interface_removed)            (GDBusObjectManager   *manager,
                                           GDBusObject          *object,
                                           GDBusInterface       *interface_);
};

Base type for D-Bus object managers.

GTypeInterface parent_iface;

The parent interface.

get_object_path ()

Virtual function for g_dbus_object_manager_get_object_path().

get_objects ()

Virtual function for g_dbus_object_manager_get_objects().

get_object ()

Virtual function for g_dbus_object_manager_get_object().

get_interface ()

Virtual function for g_dbus_object_manager_get_interface().

object_added ()

Signal handler for the "object-added" signal.

object_removed ()

Signal handler for the "object-removed" signal.

interface_added ()

Signal handler for the "interface-added" signal.

interface_removed ()

Signal handler for the "interface-removed" signal.

Since 2.30


g_dbus_object_manager_get_object_path ()

const gchar *       g_dbus_object_manager_get_object_path
                                                        (GDBusObjectManager *manager);

Gets the object path that manager is for.

manager :

A GDBusObjectManager.

Returns :

A string owned by manager. Do not free.

Since 2.30


g_dbus_object_manager_get_objects ()

GList *             g_dbus_object_manager_get_objects   (GDBusObjectManager *manager);

Gets all GDBusObject objects known to manager.

manager :

A GDBusObjectManager.

Returns :

A list of GDBusObject objects. The returned list should be freed with g_list_free() after each element has been freed with g_object_unref(). [transfer full][element-type GDBusObject]

Since 2.30


g_dbus_object_manager_get_object ()

GDBusObject *       g_dbus_object_manager_get_object    (GDBusObjectManager *manager,
                                                         const gchar *object_path);

Gets the GDBusObjectProxy at object_path, if any.

manager :

A GDBusObjectManager.

object_path :

Object path to lookup.

Returns :

A GDBusObject or NULL. Free with g_object_unref(). [transfer full]

Since 2.30


g_dbus_object_manager_get_interface ()

GDBusInterface *    g_dbus_object_manager_get_interface (GDBusObjectManager *manager,
                                                         const gchar *object_path,
                                                         const gchar *interface_name);

Gets the interface proxy for interface_name at object_path, if any.

manager :

A GDBusObjectManager.

object_path :

Object path to lookup.

interface_name :

D-Bus interface name to lookup.

Returns :

A GDBusInterface instance or NULL. Free with g_object_unref(). [transfer full]

Since 2.30

Signal Details

The "interface-added" signal

void                user_function                      (GDBusObjectManager *manager,
                                                        GDBusObject        *object,
                                                        GDBusInterface     *interface,
                                                        gpointer            user_data)      : Run Last

Emitted when interface is added to object.

This signal exists purely as a convenience to avoid having to connect signals to all objects managed by manager.

manager :

The GDBusObjectManager emitting the signal.

object :

The GDBusObject on which an interface was added.

interface :

The GDBusInterface that was added.

user_data :

user data set when the signal handler was connected.

Since 2.30


The "interface-removed" signal

void                user_function                      (GDBusObjectManager *manager,
                                                        GDBusObject        *object,
                                                        GDBusInterface     *interface,
                                                        gpointer            user_data)      : Run Last

Emitted when interface has been removed from object.

This signal exists purely as a convenience to avoid having to connect signals to all objects managed by manager.

manager :

The GDBusObjectManager emitting the signal.

object :

The GDBusObject on which an interface was removed.

interface :

The GDBusInterface that was removed.

user_data :

user data set when the signal handler was connected.

Since 2.30


The "object-added" signal

void                user_function                      (GDBusObjectManager *manager,
                                                        GDBusObject        *object,
                                                        gpointer            user_data)      : Run Last

Emitted when object is added to manager.

manager :

The GDBusObjectManager emitting the signal.

object :

The GDBusObject that was added.

user_data :

user data set when the signal handler was connected.

Since 2.30


The "object-removed" signal

void                user_function                      (GDBusObjectManager *manager,
                                                        GDBusObject        *object,
                                                        gpointer            user_data)      : Run Last

Emitted when object is removed from manager.

manager :

The GDBusObjectManager emitting the signal.

object :

The GDBusObject that was removed.

user_data :

user data set when the signal handler was connected.

Since 2.30