[patch] remove DBusGPendingCall
walters at verbum.org
Sat Jul 9 02:23:22 EST 2005
On Fri, 2005-07-08 at 14:58 +0100, Ross Burton wrote:
> On Thu, 2005-07-07 at 15:19 -0400, Colin Walters wrote:
> > What I mean is, don't you want to pass the DBusGProxy * to the callback
> > here? (And change the typedef above to hold it)? People might have
> > additional data keyed off the proxy instead of in user data for the call
> > or something. For example you might just pass your generic app data to
> > an async call, and when it returns do a
> > g_hash_table_lookup (appdata->outgoing_get_book_calls, proxy) to get
> > additional data instead of creating a new structure with the main app
> > data and the call-specific data and passing that as your user data.
> Ah, I see.
> Well for all of my code the proxy pointer is a member of the state so
> the user_data is good enough, and I'd assumed that is how people would
> be working. I'll bow to your superior judgement here though.
Well, it parallels how the non-wrapped callbacks pass the proxy in; in
an example program I'm about to commit I look up the proxy in the main
> > Also I just noticed - the wrappers don't seem to provide a means of
> > cancelling the call? Shouldn't you return the DBusGProxyCall instead of
> > always returning TRUE?
> Yes, I had a TODO in there so that callers could tell if it worked some
> way or another.
> New patch with these changes and yet more tests attached.
Cool, thanks. Do you think you could do the GCallback/G_CALLBACK() bits
from the other part of this thread so it compiles with C++?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050708/9088de38/attachment.pgp
More information about the dbus