[Psi-devel] IceRAM's CLI options patch?

Maciek Niedzielski machekku at uaznia.net
Fri Aug 25 09:48:31 PDT 2006


Mircea Bardac wrote:
> On Friday 25 August 2006 16:54, Maciek Niedzielski wrote:
>> Mircea Bardac wrote:
>>> I'm curious to see exactly how you want to send the QStringList as CLI
>>> argument(s). The reason for this is that, under POSIX standards, a CLI
>>> option (--uri) can have only one argument (one_something)
>> I guess I need to put "sorry for my bad English in my signature" ;)
>>
>> What I meant to say is: I'm sending a list of strings between psi
>> instances (via a very simple IPC). I know it would be enough just to
>> pass one string (the URI), but I know that sooner or later I'd regret
>> taking this simple approach, because one day I will want to do something
>> else than just opening URI.
> 
> I've asked this because I wanted to know how you're planning to send the 
> string list to the command line

It's other way ;)

Ok, picture :)
(fixed-width font required)


                                    your "normal" psi instance
                                                .
                                                .
psi  --uri=xmpp:a at example.org                   .
          |                                     .
          v                                     .
     CLI parser                                 .
          | user wants to open                  .
          | xmpp:a at example.org                  .
          v                                     .
 otherPsi = pickActiveProfile()                 .
  strList = ["openUri", "xmpp:a at example.org"]   .
          |                                     .
          |      send(otherPsi, strList)        .
          +------------------------------------>.
                                                |
                                                v
                                       switch(strList[0])
                                          case "openUri":
                                             doOpenUri(strList[1])



So the first string on the list is a command, and next strings are params.

-- 
Maciek
 xmpp:machekku at uaznia.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : /pipermail/psi-devel-affinix.com/attachments/20060825/17969fc0/signature-0001.pgp


More information about the psi-devel mailing list