[haiku-development] Re: [GSoC 2010] Services Kit API draft

  • From: Christophe Huriaux <c.huriaux@xxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Wed, 14 Apr 2010 19:55:41 +0200

Thanks for your reply :)

 *  As this is still a rough draft, I didn't put the overloaded
members. But, is this really useful to handle BString parameters since
BString::String() return the const char* version of the string ?
 *  My use of BMessage was more to provide a handy maneer of
passing/retrieving various options whose values could be pointers to
functions, scalar types, array pointers, etc. The BMessage is used
here as a container for all those values.
 * Oops, I forget to precise that BServicePaste::SendPaste() returns
the resulting URL where the data has been pasted (it would be quite
useless without it !)
 * I didn't see the BServicePaste from the point of view of an mad
scientist, but it's an interesting comment, I have updated the
document.

2010/4/14 Adrien Destugues <pulkomandy@xxxxxxxxx>:
>>  Hi,
>>
>> I published a rough draft of how I imagine the "Services Kit API" to
>> be, in order to offer simplicity and flexibility to developers using
>> the Kit. I would like to have some reviews to refine this draft if
>> possible.
>>
>> Link to the Google doc : http://docs.google.com/View?id=dfc49mzx_7gq8fbgfw
>> >
>>  Thanks in advance
>> --
>> Christophe Huriaux
>>
>
> Hello,
> It looks quite good.
> Some comments still :
>  * Some of your calls use "const char *" as parameters. It is usual to
> also provide a BString version of these.
>  * Your use of BMessage for the BUrl class allows for a single API
> call, but still the Application has to handle the message and extract
> the data from it. So it doesn't actually help with the handling of
> different kinds of protocols. I guess that's what you tried to do ? You
> may also want to have a look at BArchive (the serialization system that
> dump a whole object to a BMessage), and use this API instead.
>  * Why is BServicePaste::SendPaste returning a BString ? A status_t
> indicating the result of the operation would be better. Usually
> functions return a status_t and are passed a pointer to some object
> they must modify to put the result inside (as you did for
> RetrievePaste).
>  * Also, the private parameter should not be ignored : if the service
> can't handle private data, it should not accept the paste to avoid my
> secret world domination plan accidentaly leaking and everyone being
> able to see it.
>
> --
> Adrien.
>
>



-- 
Christophe Huriaux

Other related posts: