kpilot Library API Documentation

hotSync.h

00001 #ifndef _KPILOT_HOTSYNC_H
00002 #define _KPILOT_HOTSYNC_H
00003 /* hotSync.h                            KPilot
00004 **
00005 ** Copyright (C) 2001 by Dan Pilone
00006 **
00007 ** This file defines SyncActions, which are used to perform some specific
00008 ** task during a HotSync. Conduits are not included here, nor are 
00009 ** sync actions requiring user interaction. Those can be found in the
00010 ** conduits subdirectory or interactiveSync.h.
00011 */
00012  
00013 /*
00014 ** This program is free software; you can redistribute it and/or modify
00015 ** it under the terms of the GNU General Public License as published by
00016 ** the Free Software Foundation; either version 2 of the License, or
00017 ** (at your option) any later version.
00018 **
00019 ** This program is distributed in the hope that it will be useful,
00020 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00022 ** GNU General Public License for more details.
00023 **
00024 ** You should have received a copy of the GNU General Public License
00025 ** along with this program in a file called COPYING; if not, write to
00026 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00027 ** MA 02111-1307, USA.
00028 */
00029  
00030 /*
00031 ** Bug reports and questions can be sent to kde-pim@kde.org
00032 */
00033 
00034 
00035 class QTimer;
00036 
00037 #include <qstring.h>
00038 #include <qstringlist.h>
00039 
00040 #include "syncAction.h"
00041 
00042 
00043 class TestLink : public SyncAction
00044 {
00045 Q_OBJECT
00046 
00047 public:
00048         TestLink(KPilotDeviceLink *);
00049 
00050 protected:
00051         virtual bool exec();
00052 } ;
00053 
00054 class BackupAction : public SyncAction
00055 {
00056 Q_OBJECT
00057 
00058 public:
00059         BackupAction(KPilotDeviceLink *);
00060 
00061         enum Status { Init,
00062                 Error,
00063                 FullBackup,
00064                 BackupIncomplete,
00065                 BackupEnded,
00066                 BackupComplete
00067                 } ;
00068         virtual QString statusString() const;
00069 
00070 protected:
00071         virtual bool exec();
00072 
00073 private:
00077         void endBackup();
00078         bool createLocalDatabase(DBInfo *);
00079 
00080 private slots:
00081         void backupOneDB();
00082 
00083 private:
00084         QTimer *fTimer;
00085         int fDBIndex;
00086         QString fDatabaseDir;
00087 } ;
00088 
00089 class FileInstallAction : public SyncAction
00090 {
00091 Q_OBJECT
00092 public:
00093         FileInstallAction(KPilotDeviceLink *,
00094                 const QString &fileDir,
00095                 const QStringList &fileNames);
00096         virtual ~FileInstallAction();
00097 
00098         virtual QString statusString() const;
00099 
00100 protected:
00101         virtual bool exec();
00102 
00103 protected slots:
00104         void installNextFile();
00105 
00106 private:
00107         int fDBIndex;
00108         QTimer *fTimer;
00109         QString fDir;
00110         QStringList fList;
00111 } ;
00112 
00113 class CleanupAction : public SyncAction
00114 {
00115 public:
00116         CleanupAction(KPilotDeviceLink * p);
00117         virtual ~CleanupAction();
00118         
00119 protected:
00120         virtual bool exec();
00121 } ;
00122 
00123 #endif
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:43 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001