Add myself to the DOAP for GLib
[glib.git] / gio / gdbusobjectmanager.h
blob260ae2ee67faba32350a2febe041b1f5adead914
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.1 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, see <http://www.gnu.org/licenses/>.
18 * Author: David Zeuthen <davidz@redhat.com>
21 #ifndef __G_DBUS_OBJECT_MANAGER_H__
22 #define __G_DBUS_OBJECT_MANAGER_H__
24 #include <gio/giotypes.h>
26 G_BEGIN_DECLS
28 #define G_TYPE_DBUS_OBJECT_MANAGER (g_dbus_object_manager_get_type())
29 #define G_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManager))
30 #define G_IS_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER))
31 #define G_DBUS_OBJECT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface))
33 typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface;
35 /**
36 * GDBusObjectManagerIface:
37 * @parent_iface: The parent interface.
38 * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
39 * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
40 * @get_object: Virtual function for g_dbus_object_manager_get_object().
41 * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
42 * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
43 * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
44 * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
45 * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
47 * Base type for D-Bus object managers.
49 * Since: 2.30
51 struct _GDBusObjectManagerIface
53 GTypeInterface parent_iface;
55 /* Virtual Functions */
56 const gchar *(*get_object_path) (GDBusObjectManager *manager);
57 GList *(*get_objects) (GDBusObjectManager *manager);
58 GDBusObject *(*get_object) (GDBusObjectManager *manager,
59 const gchar *object_path);
60 GDBusInterface *(*get_interface) (GDBusObjectManager *manager,
61 const gchar *object_path,
62 const gchar *interface_name);
64 /* Signals */
65 void (*object_added) (GDBusObjectManager *manager,
66 GDBusObject *object);
67 void (*object_removed) (GDBusObjectManager *manager,
68 GDBusObject *object);
70 void (*interface_added) (GDBusObjectManager *manager,
71 GDBusObject *object,
72 GDBusInterface *interface_);
73 void (*interface_removed) (GDBusObjectManager *manager,
74 GDBusObject *object,
75 GDBusInterface *interface_);
78 GLIB_AVAILABLE_IN_ALL
79 GType g_dbus_object_manager_get_type (void) G_GNUC_CONST;
80 GLIB_AVAILABLE_IN_ALL
81 const gchar *g_dbus_object_manager_get_object_path (GDBusObjectManager *manager);
82 GLIB_AVAILABLE_IN_ALL
83 GList *g_dbus_object_manager_get_objects (GDBusObjectManager *manager);
84 GLIB_AVAILABLE_IN_ALL
85 GDBusObject *g_dbus_object_manager_get_object (GDBusObjectManager *manager,
86 const gchar *object_path);
87 GLIB_AVAILABLE_IN_ALL
88 GDBusInterface *g_dbus_object_manager_get_interface (GDBusObjectManager *manager,
89 const gchar *object_path,
90 const gchar *interface_name);
92 G_END_DECLS
94 #endif /* __G_DBUS_OBJECT_MANAGER_H__ */