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

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 14 Apr 2010 19:28:38 +0200

>  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

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


Other related posts: