Make GSettingsSchemaKey public
[platform/upstream/glib.git] / gio / gdbusobjectmanager.h
1 /* GDBus - GLib D-Bus Library
2  *
3  * Copyright (C) 2008-2010 Red Hat, Inc.
4  *
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.
9  *
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.
14  *
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.
19  *
20  * Author: David Zeuthen <davidz@redhat.com>
21  */
22
23 #ifndef __G_DBUS_OBJECT_MANAGER_H__
24 #define __G_DBUS_OBJECT_MANAGER_H__
25
26 #include <gio/giotypes.h>
27
28 G_BEGIN_DECLS
29
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))
34
35 typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface;
36
37 /**
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.
48  *
49  * Base type for D-Bus object managers.
50  *
51  * Since: 2.30
52  */
53 struct _GDBusObjectManagerIface
54 {
55   GTypeInterface parent_iface;
56
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);
65
66   /* Signals */
67   void    (*object_added)                 (GDBusObjectManager   *manager,
68                                            GDBusObject          *object);
69   void    (*object_removed)               (GDBusObjectManager   *manager,
70                                            GDBusObject          *object);
71
72   void    (*interface_added)              (GDBusObjectManager   *manager,
73                                            GDBusObject          *object,
74                                            GDBusInterface       *interface_);
75   void    (*interface_removed)            (GDBusObjectManager   *manager,
76                                            GDBusObject          *object,
77                                            GDBusInterface       *interface_);
78 };
79
80 GLIB_AVAILABLE_IN_ALL
81 GType            g_dbus_object_manager_get_type        (void) G_GNUC_CONST;
82 GLIB_AVAILABLE_IN_ALL
83 const gchar     *g_dbus_object_manager_get_object_path (GDBusObjectManager    *manager);
84 GLIB_AVAILABLE_IN_ALL
85 GList           *g_dbus_object_manager_get_objects     (GDBusObjectManager    *manager);
86 GLIB_AVAILABLE_IN_ALL
87 GDBusObject     *g_dbus_object_manager_get_object      (GDBusObjectManager    *manager,
88                                                         const gchar           *object_path);
89 GLIB_AVAILABLE_IN_ALL
90 GDBusInterface  *g_dbus_object_manager_get_interface   (GDBusObjectManager    *manager,
91                                                         const gchar           *object_path,
92                                                         const gchar           *interface_name);
93
94 G_END_DECLS
95
96 #endif /* __G_DBUS_OBJECT_MANAGER_H__ */