• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kpilot

DeviceCommWorker Class Reference

#include <kpilotdevicelinkPrivate.h>

Inheritance diagram for DeviceCommWorker:

Inheritance graph
[legend]

List of all members.


Detailed Description

Worker class that handles all device communications.

Definition at line 216 of file kpilotdevicelinkPrivate.h.


Public Member Functions

 DeviceCommWorker (KPilotDeviceLink *d)
virtual ~DeviceCommWorker ()

Protected Slots

void acceptDevice ()
void openDevice ()
void workaroundUSB ()

Constructor & Destructor Documentation

DeviceCommWorker::DeviceCommWorker ( KPilotDeviceLink *  d  ) 

We _always_ want to set a maximum amount of time that we will wait for the sync process to start. In the case where our user has told us that he has a funky USB device, set the workaround timeout for shorter than normal.

Definition at line 124 of file kpilotdevicelink.cc.

DeviceCommWorker::~DeviceCommWorker (  )  [virtual]

Definition at line 169 of file kpilotdevicelink.cc.


Member Function Documentation

void DeviceCommWorker::acceptDevice (  )  [protected, slot]

Called when the device is opened *and* activity occurs on the device.

We've been notified by our QSocketNotifier that we have data available on the socket.

This indicates the beginning of a hotsync.

Try to go through the remaining steps of the connection process. Note: If we return at all from this before the very end without a successful connection, we need to make sure we restart our connection open timer, otherwise it won't be restarted.

Our socket notifier should be the only reason that we end up here. If we're here without him being active, we have a problem. Try to clean up and get out.

Definition at line 409 of file kpilotdevicelink.cc.

void DeviceCommWorker::openDevice (  )  [protected, slot]

Attempt to open the device.

This is an asynchronous process.

Called regularly to check if the device exists (to handle USB-style devices).

We try to create a socket with the Palm and then bind to it (in open()). If we're able to do those 2 things, then we do 2 things: we set a timeout timer (which will tell us that X amount of time has transpired before we get into the meat of the sync transaction), and we also set up a QSocketNotifier, which will tell us when data is available to be read from the Palm socket. If we were unable to create a socket and/or bind to the Palm in this method, we'll start our timer again.

Definition at line 259 of file kpilotdevicelink.cc.

void DeviceCommWorker::workaroundUSB (  )  [protected, slot]

This slot fires whenever we've been trying to establish a hotsync with the device for longer than a given amount of time.

When this slot is fired, we will tear down the communications process and start over again.

Definition at line 569 of file kpilotdevicelink.cc.


The documentation for this class was generated from the following files:
  • kpilotdevicelinkPrivate.h
  • kpilotdevicelink.cc

kpilot

Skip menu "kpilot"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal