1 /* GDBus - GLib D-Bus Library
3 * Copyright (C) 2008-2010 Red Hat, Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: David Zeuthen <davidz@redhat.com>
23 #ifndef __G_DBUS_OBJECT_MANAGER_H__
24 #define __G_DBUS_OBJECT_MANAGER_H__
26 #include <gio/giotypes.h>
30 #define G_TYPE_DBUS_OBJECT_MANAGER (g_dbus_object_manager_get_type())
31 #define G_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManager))
32 #define G_IS_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER))
33 #define G_DBUS_OBJECT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface))
35 typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface;
38 * GDBusObjectManagerIface:
39 * @parent_iface: The parent interface.
40 * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
41 * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
42 * @get_object: Virtual function for g_dbus_object_manager_get_object().
43 * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
44 * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
45 * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
46 * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
47 * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
49 * Base type for D-Bus object managers.
53 struct _GDBusObjectManagerIface
55 GTypeInterface parent_iface;
57 /* Virtual Functions */
58 const gchar *(*get_object_path) (GDBusObjectManager *manager);
59 GList *(*get_objects) (GDBusObjectManager *manager);
60 GDBusObject *(*get_object) (GDBusObjectManager *manager,
61 const gchar *object_path);
62 GDBusInterface *(*get_interface) (GDBusObjectManager *manager,
63 const gchar *object_path,
64 const gchar *interface_name);
67 void (*object_added) (GDBusObjectManager *manager,
69 void (*object_removed) (GDBusObjectManager *manager,
72 void (*interface_added) (GDBusObjectManager *manager,
74 GDBusInterface *interface_);
75 void (*interface_removed) (GDBusObjectManager *manager,
77 GDBusInterface *interface_);
80 GType g_dbus_object_manager_get_type (void) G_GNUC_CONST;
81 const gchar *g_dbus_object_manager_get_object_path (GDBusObjectManager *manager);
82 GList *g_dbus_object_manager_get_objects (GDBusObjectManager *manager);
83 GDBusObject *g_dbus_object_manager_get_object (GDBusObjectManager *manager,
84 const gchar *object_path);
85 GDBusInterface *g_dbus_object_manager_get_interface (GDBusObjectManager *manager,
86 const gchar *object_path,
87 const gchar *interface_name);
91 #endif /* __G_DBUS_OBJECT_MANAGER_H__ */