1 /* GDBus - GLib D-Bus Library
3 * Copyright (C) 2008-2010 Red Hat, Inc.
5 * SPDX-License-Identifier: LGPL-2.1-or-later
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.
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.
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/>.
20 * Author: David Zeuthen <davidz@redhat.com>
23 #ifndef __G_DBUS_PROXY_H__
24 #define __G_DBUS_PROXY_H__
26 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27 #error "Only <gio/gio.h> can be included directly."
30 #include <gio/giotypes.h>
31 #include <gio/gdbusintrospection.h>
32 #include <gio/tizen_header_glib.h> /* for TIZEN_PUBLIC_DEPRECATED_API */
36 #define G_TYPE_DBUS_PROXY (g_dbus_proxy_get_type ())
37 #define G_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_PROXY, GDBusProxy))
38 #define G_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_PROXY, GDBusProxyClass))
39 #define G_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_PROXY, GDBusProxyClass))
40 #define G_IS_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_PROXY))
41 #define G_IS_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_PROXY))
43 typedef struct _GDBusProxyClass GDBusProxyClass;
44 typedef struct _GDBusProxyPrivate GDBusProxyPrivate;
49 * The #GDBusProxy structure contains only private data and
50 * should only be accessed using the provided API.
57 GObject parent_instance;
58 GDBusProxyPrivate *priv;
63 * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
64 * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
66 * Class structure for #GDBusProxy.
70 struct _GDBusProxyClass
73 GObjectClass parent_class;
77 void (*g_properties_changed) (GDBusProxy *proxy,
78 GVariant *changed_properties,
79 const gchar* const *invalidated_properties);
80 void (*g_signal) (GDBusProxy *proxy,
81 const gchar *sender_name,
82 const gchar *signal_name,
83 GVariant *parameters);
86 /* Padding for future expansion */
91 GType g_dbus_proxy_get_type (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
93 void g_dbus_proxy_new (GDBusConnection *connection,
94 GDBusProxyFlags flags,
95 GDBusInterfaceInfo *info,
97 const gchar *object_path,
98 const gchar *interface_name,
99 GCancellable *cancellable,
100 GAsyncReadyCallback callback,
101 gpointer user_data) TIZEN_PUBLIC_DEPRECATED_API;
103 GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res,
104 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
106 GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection,
107 GDBusProxyFlags flags,
108 GDBusInterfaceInfo *info,
110 const gchar *object_path,
111 const gchar *interface_name,
112 GCancellable *cancellable,
113 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
115 void g_dbus_proxy_new_for_bus (GBusType bus_type,
116 GDBusProxyFlags flags,
117 GDBusInterfaceInfo *info,
119 const gchar *object_path,
120 const gchar *interface_name,
121 GCancellable *cancellable,
122 GAsyncReadyCallback callback,
123 gpointer user_data) TIZEN_PUBLIC_DEPRECATED_API;
125 GDBusProxy *g_dbus_proxy_new_for_bus_finish (GAsyncResult *res,
126 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
128 GDBusProxy *g_dbus_proxy_new_for_bus_sync (GBusType bus_type,
129 GDBusProxyFlags flags,
130 GDBusInterfaceInfo *info,
132 const gchar *object_path,
133 const gchar *interface_name,
134 GCancellable *cancellable,
135 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
137 GDBusConnection *g_dbus_proxy_get_connection (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
139 GDBusProxyFlags g_dbus_proxy_get_flags (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
141 const gchar *g_dbus_proxy_get_name (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
143 gchar *g_dbus_proxy_get_name_owner (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
145 const gchar *g_dbus_proxy_get_object_path (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
147 const gchar *g_dbus_proxy_get_interface_name (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
149 gint g_dbus_proxy_get_default_timeout (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
151 void g_dbus_proxy_set_default_timeout (GDBusProxy *proxy,
152 gint timeout_msec) TIZEN_PUBLIC_DEPRECATED_API;
154 GDBusInterfaceInfo *g_dbus_proxy_get_interface_info (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
156 void g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
157 GDBusInterfaceInfo *info) TIZEN_PUBLIC_DEPRECATED_API;
159 GVariant *g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
160 const gchar *property_name) TIZEN_PUBLIC_DEPRECATED_API;
162 void g_dbus_proxy_set_cached_property (GDBusProxy *proxy,
163 const gchar *property_name,
164 GVariant *value) TIZEN_PUBLIC_DEPRECATED_API;
166 gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy) TIZEN_PUBLIC_DEPRECATED_API;
168 void g_dbus_proxy_call (GDBusProxy *proxy,
169 const gchar *method_name,
170 GVariant *parameters,
171 GDBusCallFlags flags,
173 GCancellable *cancellable,
174 GAsyncReadyCallback callback,
175 gpointer user_data) TIZEN_PUBLIC_DEPRECATED_API;
177 GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy,
179 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
181 GVariant *g_dbus_proxy_call_sync (GDBusProxy *proxy,
182 const gchar *method_name,
183 GVariant *parameters,
184 GDBusCallFlags flags,
186 GCancellable *cancellable,
187 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
192 void g_dbus_proxy_call_with_unix_fd_list (GDBusProxy *proxy,
193 const gchar *method_name,
194 GVariant *parameters,
195 GDBusCallFlags flags,
197 GUnixFDList *fd_list,
198 GCancellable *cancellable,
199 GAsyncReadyCallback callback,
200 gpointer user_data) TIZEN_PUBLIC_DEPRECATED_API;
202 GVariant *g_dbus_proxy_call_with_unix_fd_list_finish (GDBusProxy *proxy,
203 GUnixFDList **out_fd_list,
205 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
207 GVariant *g_dbus_proxy_call_with_unix_fd_list_sync (GDBusProxy *proxy,
208 const gchar *method_name,
209 GVariant *parameters,
210 GDBusCallFlags flags,
212 GUnixFDList *fd_list,
213 GUnixFDList **out_fd_list,
214 GCancellable *cancellable,
215 GError **error) TIZEN_PUBLIC_DEPRECATED_API;
217 #endif /* G_OS_UNIX */
221 #endif /* __G_DBUS_PROXY_H__ */