[patch] remove DBusGPendingCall

Ross Burton ross at burtonini.com
Fri Jul 8 23:58:32 EST 2005


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.

> 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.

Ross
-- 
Ross Burton                                 mail: ross at burtonini.com
                                          jabber: ross at burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

-------------- next part --------------
A non-text attachment was scrubbed...
Name: async-bindings.diff
Type: text/x-patch
Size: 7443 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050708/1812fce0/async-bindings.bin


More information about the dbus mailing list