On 08/11/11 16:52, Roman Rakus wrote:
On 11/08/2011 11:23 AM, Radek Novacek wrote:
> Both run_uri and run_string commands should return string in this format:
> OK\n<data>
> or
> FAILED\n<code>\n<data>
>
> Where<data> is arbitrary optional data per backend and<code> is
> error code from the backend.
Wouldn't it be better to return some kind of struct? String isn't good
to handle multiple various data types.
Something like:
{
int code // 0 = ok,>1 failed
string data
}
Is it possible?
QMF supports multiple return values ("output arguments"), so in that
sense it is possible. Not sure about DBus?
I like this idea, and the current format is more a legacy of how our
ideas about the API have evolved than anything else. In the short term
I'd still like to see this patch go in to harmonise run_uri with
run_string, but this seems like a good direction to move in.
cheers,
Zane.