ZeeGeek [2007-10-07 01:17]: > On 10/7/07, Tilman Sauerbeck <[EMAIL PROTECTED]> wrote: > > > > Hi guys, > > I'm currently working on Ruby bindings for the service method stuff, and > > I noticed something's strange. > > > > See eg > > > > http://repo.or.cz/w/xmms2-tutorial.git?a=blob;f=c/service_client/recursion.c;h=50d4af56a3e836dfb07ffec31707f5ef5f3195c6;hb=HEAD > > as an example of a service method. atm, service methods get passed an > > xmmsc_result_t*, that is only used to check for errors > > (xmmsc_result_iserror, xmmsc_result_get_error) and to get the arguments > > to the service method (xmmsc_result_get_dict_entry_...). > > It's also used to return a value from the service method, as it is > > passed to xmmsc_service_return(). > > > > I believe it is *very* wrong to pass an xmmsc_result_t* there! > > In libxmmsclient, results are used as handles to the xmmsc_blah > > functions, all of trigger some action in the server and return some > > data. Results can be handled sync or async, that's why > > xmmsc_result_notifier_set is defined for *all* of them. > > > > This just doesn't apply to the argument to the service method. What we > > get there isn't a common result, but some strange bastard ;) > > It makes no sense at all to call xmmsc_result_notifier_set on it, for > > example, or xmmsc_result_wait, or xmmsc_result_get_value. > > Isn't that true for all results passed to callbacks that it makes no sense > to call xmmsc_result_notifier_set and xmmsc_result_wait in the callbacks?
Oh man, I didn't see that %) Yes, you are right. If you're looking at the service method notifier function as a result callback then it all adds up. Maybe then my argument is that we've got a result callback even though I never explicitly registered it. I need to think about this some more I guess. Regards, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
pgpLXU6bTPYXR.pgp
Description: PGP signature
-- _______________________________________________ Xmms2-devel mailing list Xmms2-devel@lists.xmms.se http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel