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 #ifndef __G_DBUS_PROXY_H__
24 #define __G_DBUS_PROXY_H__
26 #include <gio/giotypes.h>
27 #include <gio/gdbusintrospection.h>
31 #define G_TYPE_DBUS_PROXY (g_dbus_proxy_get_type ())
32 #define G_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_PROXY, GDBusProxy))
33 #define G_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_PROXY, GDBusProxyClass))
34 #define G_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_PROXY, GDBusProxyClass))
35 #define G_IS_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_PROXY))
36 #define G_IS_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_PROXY))
38 typedef struct _GDBusProxyClass GDBusProxyClass;
39 typedef struct _GDBusProxyPrivate GDBusProxyPrivate;
44 * The #GDBusProxy structure contains only private data and
45 * should only be accessed using the provided API.
52 GObject parent_instance;
53 GDBusProxyPrivate *priv;
58 * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
59 * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
61 * Class structure for #GDBusProxy.
65 struct _GDBusProxyClass
68 GObjectClass parent_class;
72 void (*g_properties_changed) (GDBusProxy *proxy,
73 GVariant *changed_properties,
74 const gchar* const *invalidated_properties);
75 void (*g_signal) (GDBusProxy *proxy,
76 const gchar *sender_name,
77 const gchar *signal_name,
78 GVariant *parameters);
81 /* Padding for future expansion */
82 void (*_g_reserved1) (void);
83 void (*_g_reserved2) (void);
84 void (*_g_reserved3) (void);
85 void (*_g_reserved4) (void);
86 void (*_g_reserved5) (void);
87 void (*_g_reserved6) (void);
88 void (*_g_reserved7) (void);
89 void (*_g_reserved8) (void);
92 GType g_dbus_proxy_get_type (void) G_GNUC_CONST;
93 void g_dbus_proxy_new (GDBusConnection *connection,
95 GDBusProxyFlags flags,
96 GDBusInterfaceInfo *info,
97 const gchar *unique_bus_name,
98 const gchar *object_path,
99 const gchar *interface_name,
100 GCancellable *cancellable,
101 GAsyncReadyCallback callback,
103 GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res,
105 GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection,
107 GDBusProxyFlags flags,
108 GDBusInterfaceInfo *info,
109 const gchar *unique_bus_name,
110 const gchar *object_path,
111 const gchar *interface_name,
112 GCancellable *cancellable,
114 GDBusConnection *g_dbus_proxy_get_connection (GDBusProxy *proxy);
115 GDBusProxyFlags g_dbus_proxy_get_flags (GDBusProxy *proxy);
116 const gchar *g_dbus_proxy_get_unique_bus_name (GDBusProxy *proxy);
117 const gchar *g_dbus_proxy_get_object_path (GDBusProxy *proxy);
118 const gchar *g_dbus_proxy_get_interface_name (GDBusProxy *proxy);
119 gint g_dbus_proxy_get_default_timeout (GDBusProxy *proxy);
120 void g_dbus_proxy_set_default_timeout (GDBusProxy *proxy,
122 GDBusInterfaceInfo *g_dbus_proxy_get_interface_info (GDBusProxy *proxy);
123 void g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
124 GDBusInterfaceInfo *info);
125 GVariant *g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
126 const gchar *property_name);
127 void g_dbus_proxy_set_cached_property (GDBusProxy *proxy,
128 const gchar *property_name,
130 gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy);
131 void g_dbus_proxy_call (GDBusProxy *proxy,
132 const gchar *method_name,
133 GVariant *parameters,
134 GDBusCallFlags flags,
136 GCancellable *cancellable,
137 GAsyncReadyCallback callback,
139 GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy,
142 GVariant *g_dbus_proxy_call_sync (GDBusProxy *proxy,
143 const gchar *method_name,
144 GVariant *parameters,
145 GDBusCallFlags flags,
147 GCancellable *cancellable,
152 #endif /* __G_DBUS_PROXY_H__ */