dbus/dbus dbus-glib-lowlevel.h, 1.3, 1.4 dbus-glib.h, 1.5,
1.6 dbus-pending-call.c, 1.9, 1.10
Havoc Pennington
hp at freedesktop.org
Sun Jan 30 15:06:34 PST 2005
Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv17174/dbus
Modified Files:
dbus-glib-lowlevel.h dbus-glib.h dbus-pending-call.c
Log Message:
2005-01-30 Havoc Pennington <hp at redhat.com>
* glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
(dbus_g_pending_call_cancel): new function
* dbus/dbus-glib.h: move GType decls for connection/message here;
* dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
here, just kind of rationalizing how we handle all that
* tools/dbus-names-model.c: new file for a tree model listing the
services on a bus
* tools/dbus-tree-view.c (model_new): use proper typing on the
model rows
Index: dbus-glib-lowlevel.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-glib-lowlevel.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dbus-glib-lowlevel.h 24 Aug 2004 00:47:22 -0000 1.3
+++ dbus-glib-lowlevel.h 30 Jan 2005 23:06:32 -0000 1.4
@@ -32,15 +32,12 @@
void dbus_set_g_error (GError **gerror,
DBusError *derror);
-#define DBUS_TYPE_CONNECTION (dbus_connection_get_g_type ())
-#define DBUS_TYPE_MESSAGE (dbus_message_get_g_type ())
-GType dbus_connection_get_g_type (void) G_GNUC_CONST;
-GType dbus_message_get_g_type (void) G_GNUC_CONST;
-
-#define DBUS_TYPE_G_CONNECTION (dbus_g_connection_get_g_type ())
-#define DBUS_TYPE_G_MESSAGE (dbus_g_message_get_g_type ())
-GType dbus_g_connection_get_g_type (void) G_GNUC_CONST;
-GType dbus_g_message_get_g_type (void) G_GNUC_CONST;
+#define DBUS_TYPE_CONNECTION (dbus_connection_get_g_type ())
+#define DBUS_TYPE_MESSAGE (dbus_message_get_g_type ())
+#define DBUS_TYPE_PENDING_CALL (dbus_pending_call_get_g_type ())
+GType dbus_connection_get_g_type (void) G_GNUC_CONST;
+GType dbus_message_get_g_type (void) G_GNUC_CONST;
+GType dbus_pending_call_get_g_type (void) G_GNUC_CONST;
void dbus_connection_setup_with_g_main (DBusConnection *connection,
GMainContext *context);
Index: dbus-glib.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-glib.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- dbus-glib.h 30 Jan 2005 05:18:44 -0000 1.5
+++ dbus-glib.h 30 Jan 2005 23:06:32 -0000 1.6
@@ -34,11 +34,11 @@
/**
- * Convert to DBusConnection with dbus_g_connection_get_connection()
+ * Convert to DBusConnection with dbus_g_connection_get_connection() in dbus-glib-lowlevel.h
*/
typedef struct DBusGConnection DBusGConnection;
/**
- * Convert to DBusMessage with dbus_g_message_get_message()
+ * Convert to DBusMessage with dbus_g_message_get_message() in dbus-glib-lowlevel.h
*/
typedef struct DBusGMessage DBusGMessage;
/**
@@ -46,7 +46,33 @@
*/
typedef struct DBusGPendingCall DBusGPendingCall;
-void dbus_g_connection_flush (DBusGConnection *connection);
+typedef void (* DBusGPendingCallNotify) (DBusGPendingCall *pending,
+ void *user_data);
+
+
+#define DBUS_TYPE_G_CONNECTION (dbus_g_connection_get_g_type ())
+#define DBUS_TYPE_G_MESSAGE (dbus_g_message_get_g_type ())
+#define DBUS_TYPE_G_PENDING_CALL (dbus_g_message_get_g_type ())
+GType dbus_g_connection_get_g_type (void) G_GNUC_CONST;
+GType dbus_g_message_get_g_type (void) G_GNUC_CONST;
+GType dbus_g_pending_call_get_g_type (void) G_GNUC_CONST;
+
+
+DBusGConnection* dbus_g_connection_ref (DBusGConnection *connection);
+void dbus_g_connection_unref (DBusGConnection *connection);
+DBusGPendingCall* dbus_g_pending_call_ref (DBusGPendingCall *call);
+void dbus_g_pending_call_unref (DBusGPendingCall *call);
+DBusGMessage* dbus_g_message_ref (DBusGMessage *message);
+void dbus_g_message_unref (DBusGMessage *message);
+
+void dbus_g_connection_flush (DBusGConnection *connection);
+
+void dbus_g_pending_call_set_notify (DBusGPendingCall *call,
+ DBusGPendingCallNotify callback,
+ void *callback_data,
+ GDestroyNotify free_data_func);
+void dbus_g_pending_call_cancel (DBusGPendingCall *call);
+
GQuark dbus_g_error_quark (void);
#define DBUS_GERROR dbus_g_error_quark ()
@@ -147,9 +173,6 @@
...);
const char* dbus_g_proxy_get_bus_name (DBusGProxy *proxy);
-DBusGPendingCall* dbus_g_pending_call_ref (DBusGPendingCall *call);
-void dbus_g_pending_call_unref (DBusGPendingCall *call);
-
#undef DBUS_INSIDE_DBUS_GLIB_H
G_END_DECLS
Index: dbus-pending-call.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-pending-call.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- dbus-pending-call.c 17 Jan 2005 00:16:28 -0000 1.9
+++ dbus-pending-call.c 30 Jan 2005 23:06:32 -0000 1.10
@@ -227,11 +227,11 @@
}
/**
- * Cancels the pending call, such that any reply
- * or error received will just be ignored.
- * Drops at least one reference to the #DBusPendingCall
- * so will free the call if nobody else is holding
- * a reference.
+ * Cancels the pending call, such that any reply or error received
+ * will just be ignored. Drops the dbus library's internal reference
+ * to the #DBusPendingCall so will free the call if nobody else is
+ * holding a reference. However you usually get a reference
+ * from dbus_connection_send() so probably your app owns a ref also.
*
* @param pending the pending call
*/
More information about the dbus-commit
mailing list