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_CLIENT_H__
24#define __G_DBUS_OBJECT_MANAGER_CLIENT_H__
25
26#include <gio/giotypes.h>
27
28G_BEGIN_DECLS
29
30#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT (g_dbus_object_manager_client_get_type ())
31#define G_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClient))
32#define G_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass))
33#define G_DBUS_OBJECT_MANAGER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass))
34#define G_IS_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT))
35#define G_IS_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT))
36
37typedef struct _GDBusObjectManagerClientClass GDBusObjectManagerClientClass;
38typedef struct _GDBusObjectManagerClientPrivate GDBusObjectManagerClientPrivate;
39
40struct _GDBusObjectManagerClient
41{
42 /*< private >*/
43 GObject parent_instance;
44 GDBusObjectManagerClientPrivate *priv;
45};
46
47/**
48 * GDBusObjectManagerClientClass:
49 * @parent_class: The parent class.
50 * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
51 * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
52 *
53 * Class structure for #GDBusObjectManagerClient.
54 *
55 * Since: 2.30
56 */
57struct _GDBusObjectManagerClientClass
58{
59 GObjectClass parent_class;
60
61 /* signals */
62 void (*interface_proxy_signal) (GDBusObjectManagerClient *manager,
63 GDBusObjectProxy *object_proxy,
64 GDBusProxy *interface_proxy,
65 const gchar *sender_name,
66 const gchar *signal_name,
67 GVariant *parameters);
68
69 void (*interface_proxy_properties_changed) (GDBusObjectManagerClient *manager,
70 GDBusObjectProxy *object_proxy,
71 GDBusProxy *interface_proxy,
72 GVariant *changed_properties,
73 const gchar* const *invalidated_properties);
74
75 /*< private >*/
76 gpointer padding[8];
77};
78
79GIO_AVAILABLE_IN_ALL
80GType g_dbus_object_manager_client_get_type (void) G_GNUC_CONST;
81GIO_AVAILABLE_IN_ALL
82void g_dbus_object_manager_client_new (GDBusConnection *connection,
83 GDBusObjectManagerClientFlags flags,
84 const gchar *name,
85 const gchar *object_path,
86 GDBusProxyTypeFunc get_proxy_type_func,
87 gpointer get_proxy_type_user_data,
88 GDestroyNotify get_proxy_type_destroy_notify,
89 GCancellable *cancellable,
90 GAsyncReadyCallback callback,
91 gpointer user_data);
92GIO_AVAILABLE_IN_ALL
93GDBusObjectManager *g_dbus_object_manager_client_new_finish (GAsyncResult *res,
94 GError **error);
95GIO_AVAILABLE_IN_ALL
96GDBusObjectManager *g_dbus_object_manager_client_new_sync (GDBusConnection *connection,
97 GDBusObjectManagerClientFlags flags,
98 const gchar *name,
99 const gchar *object_path,
100 GDBusProxyTypeFunc get_proxy_type_func,
101 gpointer get_proxy_type_user_data,
102 GDestroyNotify get_proxy_type_destroy_notify,
103 GCancellable *cancellable,
104 GError **error);
105GIO_AVAILABLE_IN_ALL
106void g_dbus_object_manager_client_new_for_bus (GBusType bus_type,
107 GDBusObjectManagerClientFlags flags,
108 const gchar *name,
109 const gchar *object_path,
110 GDBusProxyTypeFunc get_proxy_type_func,
111 gpointer get_proxy_type_user_data,
112 GDestroyNotify get_proxy_type_destroy_notify,
113 GCancellable *cancellable,
114 GAsyncReadyCallback callback,
115 gpointer user_data);
116GIO_AVAILABLE_IN_ALL
117GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_finish (GAsyncResult *res,
118 GError **error);
119GIO_AVAILABLE_IN_ALL
120GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_sync (GBusType bus_type,
121 GDBusObjectManagerClientFlags flags,
122 const gchar *name,
123 const gchar *object_path,
124 GDBusProxyTypeFunc get_proxy_type_func,
125 gpointer get_proxy_type_user_data,
126 GDestroyNotify get_proxy_type_destroy_notify,
127 GCancellable *cancellable,
128 GError **error);
129GIO_AVAILABLE_IN_ALL
130GDBusConnection *g_dbus_object_manager_client_get_connection (GDBusObjectManagerClient *manager);
131GIO_AVAILABLE_IN_ALL
132GDBusObjectManagerClientFlags g_dbus_object_manager_client_get_flags (GDBusObjectManagerClient *manager);
133GIO_AVAILABLE_IN_ALL
134const gchar *g_dbus_object_manager_client_get_name (GDBusObjectManagerClient *manager);
135GIO_AVAILABLE_IN_ALL
136gchar *g_dbus_object_manager_client_get_name_owner (GDBusObjectManagerClient *manager);
137
138G_END_DECLS
139
140#endif /* __G_DBUS_OBJECT_MANAGER_CLIENT_H */
141