Next: The PilotDatabase classes for
Up: How the conduits work
Previous: The SyncAction base class
  Contents
For the communication with the handheld KPilot has a class
KPilotDeviceLink, and the ConduitAction class always stores an
instance of KPilotDeviceLink pointing to the current connection
in a variable called fHandle. The following list shows all members
of this class that you might need in your conduit:
- int getNextDatabase(int index,struct DBInfo *) ... Returns
the database at position index and stores its information to the DBInfo
variable, which can then be used in other functions.
- int findDatabase(char*name, struct DBInfo*) ... Finds a
database with a given name like "AddressDB" and stores its information
to the DBInfo variable, which can then be used in other functions.
- bool retrieveDatabase(const QString &path, struct DBInfo *db)
... Retrieve the database indicated by DBInfo *db into
the local file path.
- bool installFile(const QString &, bool deleteFile=true) ... Installs the .prc
or .pdb database from the PC to the handheld. Returns true on success.
If deleteFile is set true or left out, the local file is deleted after successfull installation.
- int installFiles(const QStringList &, bool deleteFiles=true) ... Installs
several .prc or .pdb databases from the PC to the handheld. Returns
the number of successfully installed databases. If deleteFiles is set true
or left out, the local files are deleted after successfull installation.
- static KPilotDeviceLink *link() ... returns the current
connection (only one can be open at the same time)
- void tickle() ... Tickle the palm to reset the timeout.
This is needed if you need to do a lengthy calculation or display a
dialogbox where the user might not respond immediately.
- KPilotUser *getPilotUser() ... Returns the user
information as set on the handheld.
- QDateTime getTime() ... Get the time from the handheld
device into a QDateTime
- bool setTime(const time_t &pctime) ... Set the time
on the handheld to the give time_t (QDateTime didn't
work for me, so I implemented it with time_t)
- unsigned long ROMversion() ... Get the version number
from the handheld
- unsigned long majorVersion() ... Get the major PalmOS
version number (e.g. 3 for PalmOS 3.0 and 3.5, 4 for PalmOS 4.x etc.)
If you want to modify a database on the handheld, you can work with a
PilotDatabase instance (see next subsection), which does all the
communication for you.
Next: The PilotDatabase classes for
Up: How the conduits work
Previous: The SyncAction base class
  Contents
Reinhold Kainhofer
2003-01-13