kpilot Library API Documentation

ActionQueue Class Reference

The constructor with one parameter is preferred. More...

#include <syncStack.h>

List of all members.

Public Types

enum  SyncModes {
  Test = 0, Backup = 1, Restore = 2, HotSync = 4,
  WithUserCheck = 0x20, WithInstaller = 0x40, WithConduits = 0x80, FlagLocal = 0x1000,
  FlagTest = 0x4000, ActionMask = 0xf, MixinMask = 0xf0, FlagMask = 0xf000,
  TestMode = Test | WithUserCheck | WithConduits, BackupMode = Backup | WithUserCheck | WithConduits, RestoreMode = Restore | WithUserCheck, HotSyncMode = HotSync | WithUserCheck | WithConduits
}

Public Member Functions

 ActionQueue (KPilotDeviceLink *device)
 ActionQueue (KPilotDeviceLink *device, KConfig *config, const QStringList &conduits=QStringList(), const QString &installDir=QString::null, const QStringList &installFiles=QStringList())
 DEPRECATED *.

bool isEmpty () const
void addAction (SyncAction *a)
 You can push your own actions onto the stack, but you should only do so if you don't call prepare().

void prepare (int m)
 Call prepare() to push a "standard profile" of SyncActions onto the stack, ready for execution.

void prepareBackup ()
void prepareRestore ()
void prepareSync ()
void queueInit (int mode=WithUserCheck)
 Call these queue*() functions to append standard functional blocks.

void queueConduits (KConfig *, const QStringList &conduits, int mode=0)
void queueInstaller (const QString &dir, const QStringList &files)
void queueCleanup ()

Protected Slots

void actionCompleted (SyncAction *)
 When one action finishes, start the next one.


Protected Member Functions

void clear ()
SyncAction * nextAction ()
virtual bool exec ()

Protected Attributes

bool fReady
KConfig * fConfig
QString fInstallerDir
QStringList fInstallerFiles
QStringList fConduits


Detailed Description

The constructor with one parameter is preferred.

You can call the public member functions to enqueue actions in several standard ways.

Definition at line 97 of file syncStack.h.


Constructor & Destructor Documentation

ActionQueue::ActionQueue KPilotDeviceLink *  device,
KConfig *  config,
const QStringList conduits = QStringList(),
const QString installDir = QString::null,
const QStringList installFiles = QStringList()
 

DEPRECATED *.

Definition at line 208 of file syncStack.cc.

References QStringList::join().


Member Function Documentation

void ActionQueue::addAction SyncAction *  a  )  [inline]
 

You can push your own actions onto the stack, but you should only do so if you don't call prepare().

Definition at line 119 of file syncStack.h.

References QPtrQueue< SyncAction >::enqueue().

Referenced by prepare(), and queueInit().

void ActionQueue::prepare int  m  ) 
 

Call prepare() to push a "standard profile" of SyncActions onto the stack, ready for execution.

These are welcome, cleanup, and actions indicated by m. m is a bitwise or of items from SyncModes --- Exactly one of Test, Backup, Restore or HotSync, for the main intent of the stack, and possibly one or more of the With* elements, which insert extra actions at the relevant moment in the execution of the stack.

Definition at line 250 of file syncStack.cc.

References addAction(), and queueInit().

void ActionQueue::queueInit int  mode = WithUserCheck  ) 
 

Call these queue*() functions to append standard functional blocks.

They're pretty much mutually exclusive with the prepare*() functions above.

You should at least call queueInit() and queueCleanup() to add the welcome and cleanup actions to the queue (unless you do that yourself.)

For queueInit, relevant modes are WithUserCheck. For queueConduits, whatever is relevant for the conduits can be used, usually things in the FlagMask and ActionMask.

Definition at line 304 of file syncStack.cc.

References addAction().

Referenced by prepare().

void ActionQueue::actionCompleted SyncAction *   )  [protected, slot]
 

When one action finishes, start the next one.

Definition at line 349 of file syncStack.cc.

References QObject::connect(), and QTimer::singleShot().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:45 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001