Update German translation
[glib.git] / gio / gdbusproxy.h
blob3dbe9cf93625069cf8e3134fdb1797d7219c4928
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."
26 #endif
28 #include <gio/giotypes.h>
29 #include <gio/gdbusintrospection.h>
31 G_BEGIN_DECLS
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;
43 /**
44 * GDBusProxy:
46 * The #GDBusProxy structure contains only private data and
47 * should only be accessed using the provided API.
49 * Since: 2.26
51 struct _GDBusProxy
53 /*< private >*/
54 GObject parent_instance;
55 GDBusProxyPrivate *priv;
58 /**
59 * GDBusProxyClass:
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.
65 * Since: 2.26
67 struct _GDBusProxyClass
69 /*< private >*/
70 GObjectClass parent_class;
72 /*< public >*/
73 /* Signals */
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);
82 /*< private >*/
83 /* Padding for future expansion */
84 gpointer padding[32];
87 GLIB_AVAILABLE_IN_ALL
88 GType g_dbus_proxy_get_type (void) G_GNUC_CONST;
89 GLIB_AVAILABLE_IN_ALL
90 void g_dbus_proxy_new (GDBusConnection *connection,
91 GDBusProxyFlags flags,
92 GDBusInterfaceInfo *info,
93 const gchar *name,
94 const gchar *object_path,
95 const gchar *interface_name,
96 GCancellable *cancellable,
97 GAsyncReadyCallback callback,
98 gpointer user_data);
99 GLIB_AVAILABLE_IN_ALL
100 GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res,
101 GError **error);
102 GLIB_AVAILABLE_IN_ALL
103 GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection,
104 GDBusProxyFlags flags,
105 GDBusInterfaceInfo *info,
106 const gchar *name,
107 const gchar *object_path,
108 const gchar *interface_name,
109 GCancellable *cancellable,
110 GError **error);
111 GLIB_AVAILABLE_IN_ALL
112 void g_dbus_proxy_new_for_bus (GBusType bus_type,
113 GDBusProxyFlags flags,
114 GDBusInterfaceInfo *info,
115 const gchar *name,
116 const gchar *object_path,
117 const gchar *interface_name,
118 GCancellable *cancellable,
119 GAsyncReadyCallback callback,
120 gpointer user_data);
121 GLIB_AVAILABLE_IN_ALL
122 GDBusProxy *g_dbus_proxy_new_for_bus_finish (GAsyncResult *res,
123 GError **error);
124 GLIB_AVAILABLE_IN_ALL
125 GDBusProxy *g_dbus_proxy_new_for_bus_sync (GBusType bus_type,
126 GDBusProxyFlags flags,
127 GDBusInterfaceInfo *info,
128 const gchar *name,
129 const gchar *object_path,
130 const gchar *interface_name,
131 GCancellable *cancellable,
132 GError **error);
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,
149 gint timeout_msec);
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,
161 GVariant *value);
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,
169 gint timeout_msec,
170 GCancellable *cancellable,
171 GAsyncReadyCallback callback,
172 gpointer user_data);
173 GLIB_AVAILABLE_IN_ALL
174 GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy,
175 GAsyncResult *res,
176 GError **error);
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,
182 gint timeout_msec,
183 GCancellable *cancellable,
184 GError **error);
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,
191 gint timeout_msec,
192 GUnixFDList *fd_list,
193 GCancellable *cancellable,
194 GAsyncReadyCallback callback,
195 gpointer user_data);
196 GLIB_AVAILABLE_IN_ALL
197 GVariant *g_dbus_proxy_call_with_unix_fd_list_finish (GDBusProxy *proxy,
198 GUnixFDList **out_fd_list,
199 GAsyncResult *res,
200 GError **error);
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,
206 gint timeout_msec,
207 GUnixFDList *fd_list,
208 GUnixFDList **out_fd_list,
209 GCancellable *cancellable,
210 GError **error);
212 G_END_DECLS
214 #endif /* __G_DBUS_PROXY_H__ */