From 0a34a4400619034e2be47f4387edf0204185d38b Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 23 Sep 2003 04:20:06 +0000 Subject: 2003-09-23 Havoc Pennington * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject subclass. This means dropping the transparent thread safety of the proxy; you now need a separate proxy per-thread, or your own locking on the proxy. Probably right anyway. (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref --- glib/dbus-glib.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'glib/dbus-glib.h') diff --git a/glib/dbus-glib.h b/glib/dbus-glib.h index 7fd88e71..556d896e 100644 --- a/glib/dbus-glib.h +++ b/glib/dbus-glib.h @@ -87,6 +87,17 @@ void dbus_connection_register_g_object (DBusConnection *connection, typedef struct DBusGProxy DBusGProxy; +typedef struct DBusGProxyClass DBusGProxyClass; + + +#define DBUS_TYPE_GPROXY (dbus_gproxy_get_type ()) +#define DBUS_GPROXY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), DBUS_TYPE_GPROXY, DBusGProxy)) +#define DBUS_GPROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUS_TYPE_GPROXY, DBusGProxyClass)) +#define DBUS_IS_GPROXY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), DBUS_TYPE_GPROXY)) +#define DBUS_IS_GPROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUS_TYPE_GPROXY)) +#define DBUS_GPROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUS_TYPE_GPROXY, DBusGProxyClass)) + +GType dbus_gproxy_get_type (void) G_GNUC_CONST; DBusGProxy* dbus_gproxy_new_for_service (DBusConnection *connection, const char *service_name, @@ -104,11 +115,16 @@ DBusGProxy* dbus_gproxy_new_for_peer (DBusConnection *connection void dbus_gproxy_ref (DBusGProxy *proxy); void dbus_gproxy_unref (DBusGProxy *proxy); gboolean dbus_gproxy_connect_signal (DBusGProxy *proxy, + const char *interface_name, const char *signal_name, GCallback callback, void *data, - GFreeFunc free_data_func, - GError **error); + GFreeFunc free_data_func); +gboolean dbus_gproxy_disconnect_signal (DBusGProxy *proxy, + const char *interface_name, + const char *signal_name, + GCallback callback, + void *data); DBusPendingCall* dbus_gproxy_begin_call (DBusGProxy *proxy, const char *method, int first_arg_type, -- cgit