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 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_PROXY_H__
22 #define __G_DBUS_PROXY_H__
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
28 #include <gio/giotypes.h>
29 #include <gio/gdbusintrospection.h>
33 #define G_TYPE_DBUS_PROXY (g_dbus_proxy_get_type ())
34 #define G_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_PROXY, GDBusProxy))
35 #define G_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_PROXY, GDBusProxyClass))
36 #define G_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_PROXY, GDBusProxyClass))
37 #define G_IS_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_PROXY))
38 #define G_IS_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_PROXY))
40 typedef struct _GDBusProxyClass GDBusProxyClass
;
41 typedef struct _GDBusProxyPrivate GDBusProxyPrivate
;
46 * The #GDBusProxy structure contains only private data and
47 * should only be accessed using the provided API.
54 GObject parent_instance
;
55 GDBusProxyPrivate
*priv
;
60 * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
61 * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
63 * Class structure for #GDBusProxy.
67 struct _GDBusProxyClass
70 GObjectClass parent_class
;
74 void (*g_properties_changed
) (GDBusProxy
*proxy
,
75 GVariant
*changed_properties
,
76 const gchar
* const *invalidated_properties
);
77 void (*g_signal
) (GDBusProxy
*proxy
,
78 const gchar
*sender_name
,
79 const gchar
*signal_name
,
80 GVariant
*parameters
);
83 /* Padding for future expansion */
88 GType
g_dbus_proxy_get_type (void) G_GNUC_CONST
;
90 void g_dbus_proxy_new (GDBusConnection
*connection
,
91 GDBusProxyFlags flags
,
92 GDBusInterfaceInfo
*info
,
94 const gchar
*object_path
,
95 const gchar
*interface_name
,
96 GCancellable
*cancellable
,
97 GAsyncReadyCallback callback
,
100 GDBusProxy
*g_dbus_proxy_new_finish (GAsyncResult
*res
,
102 GLIB_AVAILABLE_IN_ALL
103 GDBusProxy
*g_dbus_proxy_new_sync (GDBusConnection
*connection
,
104 GDBusProxyFlags flags
,
105 GDBusInterfaceInfo
*info
,
107 const gchar
*object_path
,
108 const gchar
*interface_name
,
109 GCancellable
*cancellable
,
111 GLIB_AVAILABLE_IN_ALL
112 void g_dbus_proxy_new_for_bus (GBusType bus_type
,
113 GDBusProxyFlags flags
,
114 GDBusInterfaceInfo
*info
,
116 const gchar
*object_path
,
117 const gchar
*interface_name
,
118 GCancellable
*cancellable
,
119 GAsyncReadyCallback callback
,
121 GLIB_AVAILABLE_IN_ALL
122 GDBusProxy
*g_dbus_proxy_new_for_bus_finish (GAsyncResult
*res
,
124 GLIB_AVAILABLE_IN_ALL
125 GDBusProxy
*g_dbus_proxy_new_for_bus_sync (GBusType bus_type
,
126 GDBusProxyFlags flags
,
127 GDBusInterfaceInfo
*info
,
129 const gchar
*object_path
,
130 const gchar
*interface_name
,
131 GCancellable
*cancellable
,
133 GLIB_AVAILABLE_IN_ALL
134 GDBusConnection
*g_dbus_proxy_get_connection (GDBusProxy
*proxy
);
135 GLIB_AVAILABLE_IN_ALL
136 GDBusProxyFlags
g_dbus_proxy_get_flags (GDBusProxy
*proxy
);
137 GLIB_AVAILABLE_IN_ALL
138 const gchar
*g_dbus_proxy_get_name (GDBusProxy
*proxy
);
139 GLIB_AVAILABLE_IN_ALL
140 gchar
*g_dbus_proxy_get_name_owner (GDBusProxy
*proxy
);
141 GLIB_AVAILABLE_IN_ALL
142 const gchar
*g_dbus_proxy_get_object_path (GDBusProxy
*proxy
);
143 GLIB_AVAILABLE_IN_ALL
144 const gchar
*g_dbus_proxy_get_interface_name (GDBusProxy
*proxy
);
145 GLIB_AVAILABLE_IN_ALL
146 gint
g_dbus_proxy_get_default_timeout (GDBusProxy
*proxy
);
147 GLIB_AVAILABLE_IN_ALL
148 void g_dbus_proxy_set_default_timeout (GDBusProxy
*proxy
,
150 GLIB_AVAILABLE_IN_ALL
151 GDBusInterfaceInfo
*g_dbus_proxy_get_interface_info (GDBusProxy
*proxy
);
152 GLIB_AVAILABLE_IN_ALL
153 void g_dbus_proxy_set_interface_info (GDBusProxy
*proxy
,
154 GDBusInterfaceInfo
*info
);
155 GLIB_AVAILABLE_IN_ALL
156 GVariant
*g_dbus_proxy_get_cached_property (GDBusProxy
*proxy
,
157 const gchar
*property_name
);
158 GLIB_AVAILABLE_IN_ALL
159 void g_dbus_proxy_set_cached_property (GDBusProxy
*proxy
,
160 const gchar
*property_name
,
162 GLIB_AVAILABLE_IN_ALL
163 gchar
**g_dbus_proxy_get_cached_property_names (GDBusProxy
*proxy
);
164 GLIB_AVAILABLE_IN_ALL
165 void g_dbus_proxy_call (GDBusProxy
*proxy
,
166 const gchar
*method_name
,
167 GVariant
*parameters
,
168 GDBusCallFlags flags
,
170 GCancellable
*cancellable
,
171 GAsyncReadyCallback callback
,
173 GLIB_AVAILABLE_IN_ALL
174 GVariant
*g_dbus_proxy_call_finish (GDBusProxy
*proxy
,
177 GLIB_AVAILABLE_IN_ALL
178 GVariant
*g_dbus_proxy_call_sync (GDBusProxy
*proxy
,
179 const gchar
*method_name
,
180 GVariant
*parameters
,
181 GDBusCallFlags flags
,
183 GCancellable
*cancellable
,
186 GLIB_AVAILABLE_IN_ALL
187 void g_dbus_proxy_call_with_unix_fd_list (GDBusProxy
*proxy
,
188 const gchar
*method_name
,
189 GVariant
*parameters
,
190 GDBusCallFlags flags
,
192 GUnixFDList
*fd_list
,
193 GCancellable
*cancellable
,
194 GAsyncReadyCallback callback
,
196 GLIB_AVAILABLE_IN_ALL
197 GVariant
*g_dbus_proxy_call_with_unix_fd_list_finish (GDBusProxy
*proxy
,
198 GUnixFDList
**out_fd_list
,
201 GLIB_AVAILABLE_IN_ALL
202 GVariant
*g_dbus_proxy_call_with_unix_fd_list_sync (GDBusProxy
*proxy
,
203 const gchar
*method_name
,
204 GVariant
*parameters
,
205 GDBusCallFlags flags
,
207 GUnixFDList
*fd_list
,
208 GUnixFDList
**out_fd_list
,
209 GCancellable
*cancellable
,
214 #endif /* __G_DBUS_PROXY_H__ */