Change LGPL-2.1+ to LGPL-2.1-or-later
[platform/upstream/glib.git] / gio / gdbusobjectmanager.h
1 /* GDBus - GLib D-Bus Library
2  *
3  * Copyright (C) 2008-2010 Red Hat, Inc.
4  *
5  * SPDX-License-Identifier: LGPL-2.1-or-later
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General
18  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
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 #include <gio/tizen_header_glib.h>  /* for TIZEN_PUBLIC_DEPRECATED_API */
28
29 G_BEGIN_DECLS
30
31 #define G_TYPE_DBUS_OBJECT_MANAGER         (g_dbus_object_manager_get_type())
32 #define G_DBUS_OBJECT_MANAGER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManager))
33 #define G_IS_DBUS_OBJECT_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER))
34 #define G_DBUS_OBJECT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface))
35
36 typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface;
37
38 /**
39  * GDBusObjectManagerIface:
40  * @parent_iface: The parent interface.
41  * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
42  * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
43  * @get_object: Virtual function for g_dbus_object_manager_get_object().
44  * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
45  * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
46  * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
47  * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
48  * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
49  *
50  * Base type for D-Bus object managers.
51  *
52  * Since: 2.30
53  */
54 struct _GDBusObjectManagerIface
55 {
56   GTypeInterface parent_iface;
57
58   /* Virtual Functions */
59   const gchar     *(*get_object_path) (GDBusObjectManager    *manager);
60   GList           *(*get_objects)     (GDBusObjectManager    *manager);
61   GDBusObject     *(*get_object)      (GDBusObjectManager    *manager,
62                                        const gchar           *object_path);
63   GDBusInterface  *(*get_interface)   (GDBusObjectManager    *manager,
64                                        const gchar           *object_path,
65                                        const gchar           *interface_name);
66
67   /* Signals */
68   void    (*object_added)                 (GDBusObjectManager   *manager,
69                                            GDBusObject          *object);
70   void    (*object_removed)               (GDBusObjectManager   *manager,
71                                            GDBusObject          *object);
72
73   void    (*interface_added)              (GDBusObjectManager   *manager,
74                                            GDBusObject          *object,
75                                            GDBusInterface       *interface_);
76   void    (*interface_removed)            (GDBusObjectManager   *manager,
77                                            GDBusObject          *object,
78                                            GDBusInterface       *interface_);
79 };
80
81 GIO_AVAILABLE_IN_ALL
82 GType            g_dbus_object_manager_get_type        (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
83 GIO_AVAILABLE_IN_ALL
84 const gchar     *g_dbus_object_manager_get_object_path (GDBusObjectManager    *manager) TIZEN_PUBLIC_DEPRECATED_API;
85 GIO_AVAILABLE_IN_ALL
86 GList           *g_dbus_object_manager_get_objects     (GDBusObjectManager    *manager) TIZEN_PUBLIC_DEPRECATED_API;
87 GIO_AVAILABLE_IN_ALL
88 GDBusObject     *g_dbus_object_manager_get_object      (GDBusObjectManager    *manager,
89                                                         const gchar           *object_path) TIZEN_PUBLIC_DEPRECATED_API;
90 GIO_AVAILABLE_IN_ALL
91 GDBusInterface  *g_dbus_object_manager_get_interface   (GDBusObjectManager    *manager,
92                                                         const gchar           *object_path,
93                                                         const gchar           *interface_name) TIZEN_PUBLIC_DEPRECATED_API;
94
95 G_END_DECLS
96
97 #endif /* __G_DBUS_OBJECT_MANAGER_H__ */