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, write to the
17 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: David Zeuthen <davidz@redhat.com>
23 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
24 #error "Only <gio/gio.h> can be included directly."
27 #ifndef __G_DBUS_PROXY_H__
28 #define __G_DBUS_PROXY_H__
30 #include <gio/giotypes.h>
31 #include <gio/gdbusintrospection.h>
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))
42 typedef struct _GDBusProxyClass GDBusProxyClass;
43 typedef struct _GDBusProxyPrivate GDBusProxyPrivate;
48 * The #GDBusProxy structure contains only private data and
49 * should only be accessed using the provided API.
56 GObject parent_instance;
57 GDBusProxyPrivate *priv;
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.
65 * Class structure for #GDBusProxy.
69 struct _GDBusProxyClass
72 GObjectClass parent_class;
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);
85 /* Padding for future expansion */
86 void (*_g_reserved1) (void);
87 void (*_g_reserved2) (void);
88 void (*_g_reserved3) (void);
89 void (*_g_reserved4) (void);
90 void (*_g_reserved5) (void);
91 void (*_g_reserved6) (void);
92 void (*_g_reserved7) (void);
93 void (*_g_reserved8) (void);
96 GType g_dbus_proxy_get_type (void) G_GNUC_CONST;
97 void g_dbus_proxy_new (GDBusConnection *connection,
98 GDBusProxyFlags flags,
99 GDBusInterfaceInfo *info,
101 const gchar *object_path,
102 const gchar *interface_name,
103 GCancellable *cancellable,
104 GAsyncReadyCallback callback,
106 GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res,
108 GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection,
109 GDBusProxyFlags flags,
110 GDBusInterfaceInfo *info,
112 const gchar *object_path,
113 const gchar *interface_name,
114 GCancellable *cancellable,
116 void g_dbus_proxy_new_for_bus (GBusType bus_type,
117 GDBusProxyFlags flags,
118 GDBusInterfaceInfo *info,
120 const gchar *object_path,
121 const gchar *interface_name,
122 GCancellable *cancellable,
123 GAsyncReadyCallback callback,
125 GDBusProxy *g_dbus_proxy_new_for_bus_finish (GAsyncResult *res,
127 GDBusProxy *g_dbus_proxy_new_for_bus_sync (GBusType bus_type,
128 GDBusProxyFlags flags,
129 GDBusInterfaceInfo *info,
131 const gchar *object_path,
132 const gchar *interface_name,
133 GCancellable *cancellable,
135 GDBusConnection *g_dbus_proxy_get_connection (GDBusProxy *proxy);
136 GDBusProxyFlags g_dbus_proxy_get_flags (GDBusProxy *proxy);
137 const gchar *g_dbus_proxy_get_name (GDBusProxy *proxy);
138 gchar *g_dbus_proxy_get_name_owner (GDBusProxy *proxy);
139 const gchar *g_dbus_proxy_get_object_path (GDBusProxy *proxy);
140 const gchar *g_dbus_proxy_get_interface_name (GDBusProxy *proxy);
141 gint g_dbus_proxy_get_default_timeout (GDBusProxy *proxy);
142 void g_dbus_proxy_set_default_timeout (GDBusProxy *proxy,
144 GDBusInterfaceInfo *g_dbus_proxy_get_interface_info (GDBusProxy *proxy);
145 void g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
146 GDBusInterfaceInfo *info);
147 GVariant *g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
148 const gchar *property_name);
149 void g_dbus_proxy_set_cached_property (GDBusProxy *proxy,
150 const gchar *property_name,
152 gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy);
153 void g_dbus_proxy_call (GDBusProxy *proxy,
154 const gchar *method_name,
155 GVariant *parameters,
156 GDBusCallFlags flags,
158 GCancellable *cancellable,
159 GAsyncReadyCallback callback,
161 GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy,
164 GVariant *g_dbus_proxy_call_sync (GDBusProxy *proxy,
165 const gchar *method_name,
166 GVariant *parameters,
167 GDBusCallFlags flags,
169 GCancellable *cancellable,
174 #endif /* __G_DBUS_PROXY_H__ */