next up previous contents
Next: The KPilotDeviceLink class for Up: How the conduits work Previous: How the conduits work   Contents

The SyncAction base class for conduits

All conduits are subclasses of SyncAction, which provides the following methods. The exec method is a pure virtual function and needs to be implemented by each conduit:

In addition to these functions the class also has some signals you can emit to display log messages and to indicate that the conduit has finished and KPilot should go on with the next conduit:

If your conduit will have to ask the user some question, the handheld needs to be tickled to prevent a timeout while the message box or dialog window is shown. The InteractiveAction class (which is a subclass of SyncAction) can be used as a base class for your conduit in this case. Call startTickle() some time before showing a dialog to the user (we're assuming a local event loop here) so that while the dialog is up and the user is thinking, the pilot stays awake. Afterwards, call stopTickle(). The parameter to startTickle indicates the timeout, in seconds, before signal timeout is emitted. You can connect to that signal, to take down the user interface part if the user isn't reacting. In addition to SyncAction's methods it adds the following methods:

For conduits that sync one specific database (e.g. "AddressDB" or "TodoDB"), there is the class ConduitAction, which is a child class of SyncAction, and adds the following methods and members:


next up previous contents
Next: The KPilotDeviceLink class for Up: How the conduits work Previous: How the conduits work   Contents
Reinhold Kainhofer 2003-01-13