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 void (*g_signal) (GDBusProxy *proxy,
75 const gchar *sender_name,
76 const gchar *signal_name,
77 GVariant *parameters);
80 /* Padding for future expansion */
81 void (*_g_reserved1) (void);
82 void (*_g_reserved2) (void);
83 void (*_g_reserved3) (void);
84 void (*_g_reserved4) (void);
85 void (*_g_reserved5) (void);
86 void (*_g_reserved6) (void);
87 void (*_g_reserved7) (void);
88 void (*_g_reserved8) (void);
91 GType g_dbus_proxy_get_type (void) G_GNUC_CONST;
92 void g_dbus_proxy_new (GDBusConnection *connection,
94 GDBusProxyFlags flags,
95 GDBusInterfaceInfo *info,
96 const gchar *unique_bus_name,
97 const gchar *object_path,
98 const gchar *interface_name,
99 GCancellable *cancellable,
100 GAsyncReadyCallback callback,
102 GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res,
104 GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection,
106 GDBusProxyFlags flags,
107 GDBusInterfaceInfo *info,
108 const gchar *unique_bus_name,
109 const gchar *object_path,
110 const gchar *interface_name,
111 GCancellable *cancellable,
113 GDBusConnection *g_dbus_proxy_get_connection (GDBusProxy *proxy);
114 GDBusProxyFlags g_dbus_proxy_get_flags (GDBusProxy *proxy);
115 const gchar *g_dbus_proxy_get_unique_bus_name (GDBusProxy *proxy);
116 const gchar *g_dbus_proxy_get_object_path (GDBusProxy *proxy);
117 const gchar *g_dbus_proxy_get_interface_name (GDBusProxy *proxy);
118 gint g_dbus_proxy_get_default_timeout (GDBusProxy *proxy);
119 void g_dbus_proxy_set_default_timeout (GDBusProxy *proxy,
121 GDBusInterfaceInfo *g_dbus_proxy_get_interface_info (GDBusProxy *proxy);
122 void g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
123 GDBusInterfaceInfo *info);
124 GVariant *g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
125 const gchar *property_name,
127 gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy,
129 void g_dbus_proxy_call (GDBusProxy *proxy,
130 const gchar *method_name,
131 GVariant *parameters,
132 GDBusCallFlags flags,
134 GCancellable *cancellable,
135 GAsyncReadyCallback callback,
137 GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy,
140 GVariant *g_dbus_proxy_call_sync (GDBusProxy *proxy,
141 const gchar *method_name,
142 GVariant *parameters,
143 GDBusCallFlags flags,
145 GCancellable *cancellable,
150 #endif /* __G_DBUS_PROXY_H__ */