Make GSettingsSchemaKey public
[platform/upstream/glib.git] / gio / gdbusproxy.h
1 /* GDBus - GLib D-Bus Library
2  *
3  * Copyright (C) 2008-2010 Red Hat, Inc.
4  *
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.
9  *
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.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Author: David Zeuthen <davidz@redhat.com>
21  */
22
23 #ifndef __G_DBUS_PROXY_H__
24 #define __G_DBUS_PROXY_H__
25
26 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27 #error "Only <gio/gio.h> can be included directly."
28 #endif
29
30 #include <gio/giotypes.h>
31 #include <gio/gdbusintrospection.h>
32
33 G_BEGIN_DECLS
34
35 #define G_TYPE_DBUS_PROXY         (g_dbus_proxy_get_type ())
36 #define G_DBUS_PROXY(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_PROXY, GDBusProxy))
37 #define G_DBUS_PROXY_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_PROXY, GDBusProxyClass))
38 #define G_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_PROXY, GDBusProxyClass))
39 #define G_IS_DBUS_PROXY(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_PROXY))
40 #define G_IS_DBUS_PROXY_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_PROXY))
41
42 typedef struct _GDBusProxyClass   GDBusProxyClass;
43 typedef struct _GDBusProxyPrivate GDBusProxyPrivate;
44
45 /**
46  * GDBusProxy:
47  *
48  * The #GDBusProxy structure contains only private data and
49  * should only be accessed using the provided API.
50  *
51  * Since: 2.26
52  */
53 struct _GDBusProxy
54 {
55   /*< private >*/
56   GObject parent_instance;
57   GDBusProxyPrivate *priv;
58 };
59
60 /**
61  * GDBusProxyClass:
62  * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
63  * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
64  *
65  * Class structure for #GDBusProxy.
66  *
67  * Since: 2.26
68  */
69 struct _GDBusProxyClass
70 {
71   /*< private >*/
72   GObjectClass parent_class;
73
74   /*< public >*/
75   /* Signals */
76   void (*g_properties_changed) (GDBusProxy          *proxy,
77                                 GVariant            *changed_properties,
78                                 const gchar* const  *invalidated_properties);
79   void (*g_signal)             (GDBusProxy          *proxy,
80                                 const gchar         *sender_name,
81                                 const gchar         *signal_name,
82                                 GVariant            *parameters);
83
84   /*< private >*/
85   /* Padding for future expansion */
86   gpointer padding[32];
87 };
88
89 GLIB_AVAILABLE_IN_ALL
90 GType            g_dbus_proxy_get_type                  (void) G_GNUC_CONST;
91 GLIB_AVAILABLE_IN_ALL
92 void             g_dbus_proxy_new                       (GDBusConnection     *connection,
93                                                          GDBusProxyFlags      flags,
94                                                          GDBusInterfaceInfo *info,
95                                                          const gchar         *name,
96                                                          const gchar         *object_path,
97                                                          const gchar         *interface_name,
98                                                          GCancellable        *cancellable,
99                                                          GAsyncReadyCallback  callback,
100                                                          gpointer             user_data);
101 GLIB_AVAILABLE_IN_ALL
102 GDBusProxy      *g_dbus_proxy_new_finish                (GAsyncResult        *res,
103                                                          GError             **error);
104 GLIB_AVAILABLE_IN_ALL
105 GDBusProxy      *g_dbus_proxy_new_sync                  (GDBusConnection     *connection,
106                                                          GDBusProxyFlags      flags,
107                                                          GDBusInterfaceInfo *info,
108                                                          const gchar         *name,
109                                                          const gchar         *object_path,
110                                                          const gchar         *interface_name,
111                                                          GCancellable        *cancellable,
112                                                          GError             **error);
113 GLIB_AVAILABLE_IN_ALL
114 void             g_dbus_proxy_new_for_bus               (GBusType             bus_type,
115                                                          GDBusProxyFlags      flags,
116                                                          GDBusInterfaceInfo *info,
117                                                          const gchar         *name,
118                                                          const gchar         *object_path,
119                                                          const gchar         *interface_name,
120                                                          GCancellable        *cancellable,
121                                                          GAsyncReadyCallback  callback,
122                                                          gpointer             user_data);
123 GLIB_AVAILABLE_IN_ALL
124 GDBusProxy      *g_dbus_proxy_new_for_bus_finish        (GAsyncResult        *res,
125                                                          GError             **error);
126 GLIB_AVAILABLE_IN_ALL
127 GDBusProxy      *g_dbus_proxy_new_for_bus_sync          (GBusType             bus_type,
128                                                          GDBusProxyFlags      flags,
129                                                          GDBusInterfaceInfo *info,
130                                                          const gchar         *name,
131                                                          const gchar         *object_path,
132                                                          const gchar         *interface_name,
133                                                          GCancellable        *cancellable,
134                                                          GError             **error);
135 GLIB_AVAILABLE_IN_ALL
136 GDBusConnection *g_dbus_proxy_get_connection            (GDBusProxy          *proxy);
137 GLIB_AVAILABLE_IN_ALL
138 GDBusProxyFlags  g_dbus_proxy_get_flags                 (GDBusProxy          *proxy);
139 GLIB_AVAILABLE_IN_ALL
140 const gchar     *g_dbus_proxy_get_name                  (GDBusProxy          *proxy);
141 GLIB_AVAILABLE_IN_ALL
142 gchar           *g_dbus_proxy_get_name_owner            (GDBusProxy          *proxy);
143 GLIB_AVAILABLE_IN_ALL
144 const gchar     *g_dbus_proxy_get_object_path           (GDBusProxy          *proxy);
145 GLIB_AVAILABLE_IN_ALL
146 const gchar     *g_dbus_proxy_get_interface_name        (GDBusProxy          *proxy);
147 GLIB_AVAILABLE_IN_ALL
148 gint             g_dbus_proxy_get_default_timeout       (GDBusProxy          *proxy);
149 GLIB_AVAILABLE_IN_ALL
150 void             g_dbus_proxy_set_default_timeout       (GDBusProxy          *proxy,
151                                                          gint                 timeout_msec);
152 GLIB_AVAILABLE_IN_ALL
153 GDBusInterfaceInfo *g_dbus_proxy_get_interface_info     (GDBusProxy          *proxy);
154 GLIB_AVAILABLE_IN_ALL
155 void             g_dbus_proxy_set_interface_info        (GDBusProxy           *proxy,
156                                                          GDBusInterfaceInfo   *info);
157 GLIB_AVAILABLE_IN_ALL
158 GVariant        *g_dbus_proxy_get_cached_property       (GDBusProxy          *proxy,
159                                                          const gchar         *property_name);
160 GLIB_AVAILABLE_IN_ALL
161 void             g_dbus_proxy_set_cached_property       (GDBusProxy          *proxy,
162                                                          const gchar         *property_name,
163                                                          GVariant            *value);
164 GLIB_AVAILABLE_IN_ALL
165 gchar          **g_dbus_proxy_get_cached_property_names (GDBusProxy          *proxy);
166 GLIB_AVAILABLE_IN_ALL
167 void             g_dbus_proxy_call                      (GDBusProxy          *proxy,
168                                                          const gchar         *method_name,
169                                                          GVariant            *parameters,
170                                                          GDBusCallFlags       flags,
171                                                          gint                 timeout_msec,
172                                                          GCancellable        *cancellable,
173                                                          GAsyncReadyCallback  callback,
174                                                          gpointer             user_data);
175 GLIB_AVAILABLE_IN_ALL
176 GVariant        *g_dbus_proxy_call_finish               (GDBusProxy          *proxy,
177                                                          GAsyncResult        *res,
178                                                          GError             **error);
179 GLIB_AVAILABLE_IN_ALL
180 GVariant        *g_dbus_proxy_call_sync                 (GDBusProxy          *proxy,
181                                                          const gchar         *method_name,
182                                                          GVariant            *parameters,
183                                                          GDBusCallFlags       flags,
184                                                          gint                 timeout_msec,
185                                                          GCancellable        *cancellable,
186                                                          GError             **error);
187
188 GLIB_AVAILABLE_IN_ALL
189 void             g_dbus_proxy_call_with_unix_fd_list        (GDBusProxy          *proxy,
190                                                              const gchar         *method_name,
191                                                              GVariant            *parameters,
192                                                              GDBusCallFlags       flags,
193                                                              gint                 timeout_msec,
194                                                              GUnixFDList         *fd_list,
195                                                              GCancellable        *cancellable,
196                                                              GAsyncReadyCallback  callback,
197                                                              gpointer             user_data);
198 GLIB_AVAILABLE_IN_ALL
199 GVariant        *g_dbus_proxy_call_with_unix_fd_list_finish (GDBusProxy          *proxy,
200                                                              GUnixFDList        **out_fd_list,
201                                                              GAsyncResult        *res,
202                                                              GError             **error);
203 GLIB_AVAILABLE_IN_ALL
204 GVariant        *g_dbus_proxy_call_with_unix_fd_list_sync   (GDBusProxy          *proxy,
205                                                              const gchar         *method_name,
206                                                              GVariant            *parameters,
207                                                              GDBusCallFlags       flags,
208                                                              gint                 timeout_msec,
209                                                              GUnixFDList         *fd_list,
210                                                              GUnixFDList        **out_fd_list,
211                                                              GCancellable        *cancellable,
212                                                              GError             **error);
213
214 G_END_DECLS
215
216 #endif /* __G_DBUS_PROXY_H__ */