From b31dbfc3dbeb38886519bbcf835a0fbe2306bcda Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 29 Mar 2011 15:07:23 +0100 Subject: [PATCH 2/5] Document that most DBusGProxy methods stop working on ::destroy --- dbus/dbus-gproxy.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c index 898e4fe..9686bd2 100644 --- a/dbus/dbus-gproxy.c +++ b/dbus/dbus-gproxy.c @@ -2080,6 +2080,9 @@ dbus_g_proxy_new_for_peer (DBusGConnection *connection, * unique connection name will be returned. If you created it * with dbus_g_proxy_new_for_peer() then #NULL will be returned. * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * Returns: the bus name the proxy sends messages to */ const char* @@ -2101,6 +2104,9 @@ dbus_g_proxy_get_bus_name (DBusGProxy *proxy) * * Gets the object interface proxy is bound to (may be #NULL in some cases). * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * Returns: an object interface */ const char* @@ -2142,6 +2148,9 @@ dbus_g_proxy_set_interface (DBusGProxy *proxy, * Gets the path this proxy is bound to * @proxy: the proxy * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * Returns: an object path */ const char* @@ -2438,6 +2447,9 @@ dbus_g_proxy_end_call_internal (DBusGProxy *proxy, * will be invoked; you can then collect the results of the call * (which may be an error, or a reply), use dbus_g_proxy_end_call(). * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * TODO this particular function shouldn't die on out of memory, * since you should be able to do a call with large arguments. * @@ -2491,6 +2503,9 @@ dbus_g_proxy_begin_call (DBusGProxy *proxy, * will be invoked; you can then collect the results of the call * (which may be an error, or a reply), use dbus_g_proxy_end_call(). * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * TODO this particular function shouldn't die on out of memory, * since you should be able to do a call with large arguments. * @@ -2582,6 +2597,9 @@ dbus_g_proxy_end_call (DBusGProxy *proxy, * output values, followed by a second G_TYPE_INVALID. Note that * this means you must always specify G_TYPE_INVALID twice. * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * Returns: #FALSE if an error is set, #TRUE otherwise. */ gboolean @@ -2643,6 +2661,9 @@ dbus_g_proxy_call (DBusGProxy *proxy, * output values, followed by a second G_TYPE_INVALID. Note that * this means you must always specify G_TYPE_INVALID twice. * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * Returns: #FALSE if an error is set, #TRUE otherwise. */ gboolean @@ -2687,6 +2708,9 @@ dbus_g_proxy_call_with_timeout (DBusGProxy *proxy, * Sends a method call message as with dbus_g_proxy_begin_call(), but * does not ask for a reply or allow you to receive one. * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * TODO: this particular function shouldn't die on out of memory, * since you should be able to do a call with large arguments. */ @@ -2737,6 +2761,9 @@ dbus_g_proxy_call_no_reply (DBusGProxy *proxy, * initiated with dbus_g_proxy_begin_call(). This function * may not be used on pending calls that have already been * ended with dbus_g_proxy_end_call. + * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. */ void dbus_g_proxy_cancel_call (DBusGProxy *proxy, @@ -2779,6 +2806,9 @@ dbus_g_proxy_cancel_call (DBusGProxy *proxy, * * This function adds a reference to the message, so the caller * still owns its original reference. + * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. */ void dbus_g_proxy_send (DBusGProxy *proxy, @@ -2827,6 +2857,9 @@ array_free_all (gpointer array) * Specifies the argument signature of a signal;.only necessary * if the remote object does not support introspection. The arguments * specified are the GLib types expected. + * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. */ void dbus_g_proxy_add_signal (DBusGProxy *proxy, @@ -2888,6 +2921,9 @@ dbus_g_proxy_add_signal (DBusGProxy *proxy, * Connect a signal handler to a proxy for a remote interface. When * the remote interface emits the specified signal, the proxy will * emit a corresponding GLib signal. + * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. */ void dbus_g_proxy_connect_signal (DBusGProxy *proxy, @@ -2939,6 +2975,9 @@ dbus_g_proxy_connect_signal (DBusGProxy *proxy, * * Disconnect all signal handlers from a proxy that match the given * criteria. + * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. */ void dbus_g_proxy_disconnect_signal (DBusGProxy *proxy, @@ -2997,6 +3036,9 @@ dbus_g_proxy_disconnect_signal (DBusGProxy *proxy, * (e.g. immediately) and emits a signal when the operation terminates * (though beware of leaking information with/in the signal return value). * + * It is an error to call this method on a proxy that has emitted + * the #DBusGProxy::destroy signal. + * * Since: 0.75 */ void -- 1.7.4.1