kpilot/lib
KPilotLink Class Reference
#include <kpilotlink.h>
Inheritance diagram for KPilotLink:

Detailed Description
This is the abstract base class for Handheld interaction.It tries to define all the behavior that we need; calls to virtual *Impl() functions are used to implement the specific behavior for subclasses.
Definition at line 151 of file kpilotlink.h.
Public Slots | |
virtual void | close ()=0 |
virtual void | reset ()=0 |
virtual bool | tickle ()=0 |
Signals | |
void | timeout () |
void | logMessage (const QString &) |
void | logError (const QString &) |
void | logProgress (const QString &s, int p) |
void | deviceReady (KPilotLink *) |
Public Member Functions | |
KPilotLink (QObject *parent=0, const char *name=0) | |
virtual | ~KPilotLink () |
virtual QString | statusString () const =0 |
virtual bool | isConnected () const =0 |
QString | pilotPath () const |
virtual void | reset (const QString &pilotPath)=0 |
virtual bool | event (QEvent *e) |
unsigned int | installFiles (const QStringList &l, const bool deleteFiles) |
void | addSyncLogEntry (const QString &entry, bool log=true) |
virtual int | findDatabase (const char *name, struct DBInfo *, int index=0, unsigned long type=0, unsigned long creator=0)=0 |
virtual bool | retrieveDatabase (const QString &path, struct DBInfo *db)=0 |
virtual int | getNextDatabase (int index, struct DBInfo *db)=0 |
virtual DBInfoList | getDBList (int cardno=0, int flags=dlpDBListRAM)=0 |
virtual PilotDatabase * | database (const QString &name)=0 |
KPilotUser & | getPilotUser () |
const KPilotSysInfo & | getSysInfo () |
virtual const KPilotCard * | getCardInfo (int card=0)=0 |
virtual void | endOfSync ()=0 |
virtual void | finishSync ()=0 |
Protected Member Functions | |
void | startTickle (unsigned int timeout=0) |
void | stopTickle () |
virtual bool | installFile (const QString &f, const bool deleteFile)=0 |
virtual int | openConduit () |
virtual int | pilotSocket () const |
virtual void | addSyncLogEntryImpl (const QString &s)=0 |
Protected Attributes | |
QString | fPilotPath |
KPilotUser * | fPilotUser |
KPilotSysInfo * | fPilotSysInfo |
Friends | |
class | SyncAction |
Constructor & Destructor Documentation
|
Constructor. Use reset() to start looking for a device. Definition at line 142 of file kpilotlink.cc. |
|
Destructor. This rudely interrupts any communication in progress. Definition at line 167 of file kpilotlink.cc. |
Member Function Documentation
|
Write a log entry to the handheld.
If Definition at line 246 of file kpilotlink.cc. |
|
Actually write an entry to the device link.
The message Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Release all resources, including the master pilot socket, timers, notifiers, etc.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Return a database object for manipulating the database with name This database may be local or remote, depending on the kind of link in use.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Emitted once the user information has been read and the HotSync is really ready to go.
|
|
End the sync in a gracuful manner.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Implementation detail to handle tickle timeouts.
Definition at line 174 of file kpilotlink.cc. |
|
Find a database with the given Fills in the DBInfo structure if found, returns < 0 on error. Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
End the sync in a graceful manner and update the last-sync time and user information on the handheld.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Retrieve information about the data card Non-device links return something fake. This function may return NULL (non-device links or on error).
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Returns a list of DBInfo structures describing all the databases available on the link (ie.
device) with the given card number
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Fill the DBInfo structure
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Retrieve the user information from the device. Ownership is kept by the link, and at the end of a sync the user information is synced back to the link -- so it may be modified, but don't make local copies of it.
Definition at line 268 of file kpilotlink.h. |
|
System information about the handheld. Ownership is kept by the link. For non-device links, something fake is returned.
Definition at line 277 of file kpilotlink.h. |
|
Install a single file onto the device link.
Full pathname The default Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Install the list of files (full paths!) named by
If
Definition at line 223 of file kpilotlink.cc. |
|
True if HotSync has been started but not finished yet (ie. the physical Pilot is waiting for sync commands) Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Signal that an error has occurred, for logging.
|
|
Signal that a message has been written to the sync log.
|
|
Signal that progress has been made, for logging purposes.
|
|
Notify the Pilot user that a conduit is running now. On real devices, this prints out (on screen) which database is now opened; useful for progress reporting.
Reimplemented in KPilotDeviceLink, and KPilotLocalLink. Definition at line 259 of file kpilotlink.cc. |
|
Information on what kind of device we're dealing with. A link is associated with a path -- either the node in /dev that the physical device is attached to, or an IP address, or a filesystem path for local links. Whichever is being used, this function returns its name in a human-readable form. Definition at line 180 of file kpilotlink.h. |
|
Returns a file handle for raw operations. Not recommended. On links with no physical device backing, returns -1.
Reimplemented in KPilotDeviceLink, and KPilotLocalLink. Definition at line 264 of file kpilotlink.cc. |
|
Assuming things have been set up at least once already by a call to reset() with parameters, use this slot to re-start with the same settings.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Return the device link to the Init state and try connecting to the given device path (if it's non-empty). What the path means depends on the kind of link we're instantiating.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Retrieve the database indicated by DBInfo
This copies all the data, and you can create a PilotLocalDatabase from the resulting
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Start tickling the Handheld (every few seconds).
This lasts until
Definition at line 188 of file kpilotlink.cc. |
|
Provides a human-readable status string.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
Stop tickling the Handheld. This may block for some time (less than a second) to allow the tickle thread to finish. Definition at line 212 of file kpilotlink.cc. |
|
Tickle the underlying device exactly once.
Implemented in KPilotDeviceLink, and KPilotLocalLink. |
|
A timeout associated with tickling has occurred. Each time startTickle() is called, you can state how long tickling should last (at most) before timing out. You can only get a timeout when the Qt event loop is running, which somewhat limits the usefulness of timeouts. |
Member Data Documentation
|
Path of the device special file that will be used. Usually /dev/pilot, /dev/ttySx, or /dev/usb/x. May be a filesystem path for local links. Definition at line 349 of file kpilotlink.h. |
|
System information about the device. Filled in when the sync starts. Non-device links need to fake something. Definition at line 404 of file kpilotlink.h. |
|
User information structure. Should be filled in when a sync starts, so that conduits can use the information. Definition at line 399 of file kpilotlink.h. |
The documentation for this class was generated from the following files: