                       Psion 'Sayanara' Server Access
                       ==============================

Just to be clear, first off, this code is NOT part of the Sayanara Project
itself: it simply communicates (through PsiONtrack) with Sayanara servers
on the Psion unit.  It contains no code from the project, and is not under GPL.
Instead it is simply freely available source.

It uses the PsiONtrack program (v1.1 or later, with the server-client add-on)
as an intermediary to communicate with the Psion, which must have the relevant
Sayanara server(s) installed.  (PsiONtrack must of course be running before
this program is run.)

PsiONtrack's server-client add-on provides a simple way for other programs
to send and receive data to and from servers installed on a Psion.
It uses inter-application BMessages for this. The PsionConnector class in
psionconn.h/PsionConn.cpp manages the details of the communication.
Its 'transaction' method is used to send a command and receive data back.
The data is actually retrieved through the 'response' method.  The fornat
of the blocks passed is of course determined by the server involved.

This app can talk to either the 'Contacts' (SYS$SAYANCNT) or 'Agenda' (SYS$SAYANAGN)
server, determined by a command line option: '-c' for Contacts (also the default)
and '-a' for Agenda.  Both servers have the same command format, with just two
commands. A byte of value '2' followed by a (Psion) filename (NO terminating
null byte!) opens the server on that file.  A '1' byte (alone) gets a packet of
data in 'SSML' format from the selected file; several such commands may be needed
to read the whole file -- the last returns sero-length data.

The data arrives in 'SSML' format.  This is a straightforward 'tagged' test
format (a la XML) tailored to the data contained in that database.  It will
normally be piped to other programs to be converted into something appropriate
for the platform. For example, Contacts SSML can be piped to ssml2vcard and
on to vcard2people to create Person files.

TO read a file on the Psion other than the default ('C:\System\Data\Contacts.cdb'
or 'C:\Documents\Agenda' as appropriate) use the '-f' command-line option.
Default output is to stdout, but it can be sent directly to a file with the
'-o' switch.


                                       -- Pete Goodeve --
                                       pete.goodeve@computer.org

                                       May 2002

You can find all the details of the Sayanara Project and SSML -- plus the original
source code -- at:
             http://www.goldenlion.freeserve.co.uk/sayanara/

