author | zautrix <zautrix> | 2004-10-07 19:42:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 19:42:44 (UTC) |
commit | 0a661f5800b86df385cc23f4c9a8324bd0b50a5c (patch) (side-by-side diff) | |
tree | fcc17cfad0ffd022a4b92974bc53d39ba3f650de | |
parent | 1f1538e5707b59bfcff2014901f29a65589229e3 (diff) | |
download | kdepimpi-0a661f5800b86df385cc23f4c9a8324bd0b50a5c.zip kdepimpi-0a661f5800b86df385cc23f4c9a8324bd0b50a5c.tar.gz kdepimpi-0a661f5800b86df385cc23f4c9a8324bd0b50a5c.tar.bz2 |
sync fix
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 126 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 93 |
2 files changed, 100 insertions, 119 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 568c2a9..01309d5 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -1,42 +1,42 @@ /* - This file is part of KDE-Pim/Pi. - Copyright (c) 2004 Ulf Schenk - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + This file is part of KDE-Pim/Pi. + Copyright (c) 2004 Ulf Schenk + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ // $Id$ #include "ksyncmanager.h" #include <stdlib.h> #ifndef _WIN32_ #include <unistd.h> #endif #include "ksyncprofile.h" #include "ksyncprefsdialog.h" #include "kpimprefs.h" #include <kmessagebox.h> #include <qdir.h> #include <qprogressbar.h> #include <qpopupmenu.h> #include <qpushbutton.h> #include <qradiobutton.h> #include <qbuttongroup.h> @@ -52,49 +52,49 @@ #include <klocale.h> #include <kglobal.h> #include <kconfig.h> #include <kfiledialog.h> KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) : QObject(), mParent(parent), mImplementation(implementation), mTargetApp(ta), mPrefs(prefs ),mSyncMenu(syncmenu) { mServerSocket = 0; bar = new QProgressBar ( 1, 0 ); bar->setCaption (""); int w = 300; if ( QApplication::desktop()->width() < 320 ) w = 220; int h = bar->sizeHint().height() ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); } KSyncManager::~KSyncManager() { - delete bar; + delete bar; } void KSyncManager::fillSyncMenu() { if ( mSyncMenu->count() ) mSyncMenu->clear(); mSyncMenu->insertItem( i18n("Configure..."), 0 ); mSyncMenu->insertSeparator(); if ( mServerSocket == 0 ) { mSyncMenu->insertItem( i18n("Enable Pi-Sync"), 2 ); } else { mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 ); } mSyncMenu->insertSeparator(); mSyncMenu->insertItem( i18n("Multiple sync"), 1 ); mSyncMenu->insertSeparator(); KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); config.setGroup("General"); QStringList prof = config.readListEntry("SyncProfileNames"); mLocalMachineName = config.readEntry("LocalMachineName","undefined"); if ( prof.count() < 2 ) { @@ -144,49 +144,49 @@ void KSyncManager::slotSyncMenu( int action ) // when we call it after the main event loop, it is ok // same behaviour when calling OM/Pi via QCOP for the first time QTimer::singleShot ( 1, this, SLOT ( confSync() ) ); //confSync(); return; } if ( action == 1 ) { multiSync( true ); return; } if ( action == 2 ) { enableQuick(); QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); return; } if ( action == 3 ) { delete mServerSocket; mServerSocket = 0; QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); return; } if (blockSave()) - return; + return; setBlockSave(true); mCurrentSyncProfile = action - 1000 ; mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ; mCurrentSyncName = mLocalMachineName ; KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); KSyncProfile* temp = new KSyncProfile (); temp->setName(mSyncProfileNames[mCurrentSyncProfile]); temp->readConfig(&config); mAskForPreferences = temp->getAskForPreferences(); mSyncAlgoPrefs = temp->getSyncPrefs(); mWriteBackFile = temp->getWriteBackFile(); mWriteBackExistingOnly = temp->getWriteBackExisting(); mWriteBackInFuture = 0; if ( temp->getWriteBackFuture() ) mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); mShowSyncSummary = temp->getShowSummaryAfterSync(); if ( action == 1000 ) { syncSharp(); } else if ( action == 1001 ) { syncLocalFile(); @@ -279,64 +279,64 @@ void KSyncManager::enableQuick() if ( ! ok ) { KMessageBox::information( 0, i18n("No valid port")); return; } //qDebug("port %d ", port); mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); mServerSocket->setFileName( defaultFileName() ); //qDebug("connected "); if ( !mServerSocket->ok() ) { KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); delete mServerSocket; mServerSocket = 0; return; } connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) ); connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) ); } void KSyncManager::syncLocalFile() { QString fn =mPrefs->mLastSyncedLocalFile; QString ext; - switch(mTargetApp) - { + switch(mTargetApp) + { case (KAPI): - ext = "(*.vcf)"; - break; + ext = "(*.vcf)"; + break; case (KOPI): - ext = "(*.ics/*.vcs)"; - break; + ext = "(*.ics/*.vcs)"; + break; case (PWMPI): - ext = "(*.pwm)"; - break; + ext = "(*.pwm)"; + break; default: - qDebug("KSyncManager::syncLocalFile: invalid apptype selected"); - break; + qDebug("KSyncManager::syncLocalFile: invalid apptype selected"); + break; - } + } fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent ); if ( fn == "" ) return; if ( syncWithFile( fn, false ) ) { qDebug("syncLocalFile() successful "); } } bool KSyncManager::syncWithFile( QString fn , bool quick ) { bool ret = false; QFileInfo info; info.setFile( fn ); QString mess; bool loadbup = true; if ( !info. exists() ) { mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) ); int result = QMessageBox::warning( mParent, i18n("Warning!"), mess ); return ret; } int result = 0; @@ -369,49 +369,49 @@ void KSyncManager::quickSyncLocalFile() if ( syncWithFile( mPrefs->mLastSyncedLocalFile, false ) ) { qDebug("quick syncLocalFile() successful "); } } void KSyncManager::multiSync( bool askforPrefs ) { if (blockSave()) return; setBlockSave(true); QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), question, i18n("Yes"), i18n("No"), 0, 0 ) != 0 ) { setBlockSave(false); mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); return; } mCurrentSyncDevice = i18n("Multiple profiles") ; mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs; if ( askforPrefs ) { edit_sync_options(); - mRingSyncAlgoPrefs = mSyncAlgoPrefs; + mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs; } mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") ); qApp->processEvents(); int num = ringSync() ; if ( num > 1 ) ringSync(); setBlockSave(false); if ( num ) emit save(); if ( num ) mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); else mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); return; } int KSyncManager::ringSync() { int syncedProfiles = 0; unsigned int i; QTime timer; KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); QStringList syncProfileNames = mSyncProfileNames; KSyncProfile* temp = new KSyncProfile (); @@ -499,54 +499,54 @@ int KSyncManager::ringSync() syncRemote( temp, false ); } } timer.start(); mParent->topLevelWidget()->setCaption(i18n("Multiple sync in progress ... please wait!") ); while ( timer.elapsed () < 2000 ) { qApp->processEvents(); #ifndef _WIN32_ sleep (1); #endif } } } delete temp; return syncedProfiles; } void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) { QString question; if ( ask ) { - question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n"; - if ( QMessageBox::information( mParent, i18n("Sync"), - question, - i18n("Yes"), i18n("No"), - 0, 0 ) != 0 ) - return; + question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n"; + if ( QMessageBox::information( mParent, i18n("Sync"), + question, + i18n("Yes"), i18n("No"), + 0, 0 ) != 0 ) + return; } QString preCommand; QString localTempFile; QString postCommand; switch(mTargetApp) { case (KAPI): preCommand = prof->getPreSyncCommandAB(); postCommand = prof->getPostSyncCommandAB(); localTempFile = prof->getLocalTempFileAB(); break; case (KOPI): preCommand = prof->getPreSyncCommand(); postCommand = prof->getPostSyncCommand(); localTempFile = prof->getLocalTempFile(); break; case (PWMPI): preCommand = prof->getPreSyncCommandPWM(); postCommand = prof->getPostSyncCommandPWM(); localTempFile = prof->getLocalTempFilePWM(); break; default: @@ -718,67 +718,67 @@ bool KSyncManager::syncExternalApplication(QString resource) { emit save(); if ( mAskForPreferences ) edit_sync_options(); qDebug("sync %s", resource.latin1()); bool syncOK = mImplementation->syncExternal(this, resource); return syncOK; } void KSyncManager::syncPhone() { syncExternalApplication("phone"); } void KSyncManager::showProgressBar(int percentage, QString caption, int total) { - if (!bar->isVisible()) - { - bar->setCaption (caption); - bar->setTotalSteps ( total ) ; + if (!bar->isVisible()) + { + bar->setCaption (caption); + bar->setTotalSteps ( total ) ; - bar->show(); - } + bar->show(); + } - bar->setProgress( percentage ); + bar->setProgress( percentage ); } void KSyncManager::hideProgressBar() { - bar->hide(); + bar->hide(); } bool KSyncManager::isProgressBarCanceled() { - return !bar->isVisible(); + return !bar->isVisible(); } QString KSyncManager::syncFileName() { QString fn = "tempfile"; switch(mTargetApp) { case (KAPI): fn = "tempsyncab.vcf"; break; case (KOPI): fn = "tempsynccal.ics"; break; case (PWMPI): fn = "tempsyncpw.pwm"; break; default: break; } #ifdef _WIN32_ return locateLocal( "tmp", fn ); #else return (QString( "/tmp/" )+ fn ); @@ -786,65 +786,65 @@ QString KSyncManager::syncFileName() } void KSyncManager::syncPi() { qApp->processEvents(); bool ok; Q_UINT16 port = mActiveSyncPort.toUInt(&ok); if ( ! ok ) { mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); return; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, port, mActiveSyncIP, this ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); mParent->topLevelWidget()->setCaption( i18n("Sending request for remote file ...") ); commandSocket->readFile( syncFileName() ); } void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) { qDebug("MainWindow::deleteCommandSocket %d", state); //enum { success, errorW, errorR, quiet }; if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) { - mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); + mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); delete s; - if ( state == KCommandSocket::errorR ) { - KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this ); - connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); - commandSocket->sendStop(); - } + if ( state == KCommandSocket::errorR ) { + KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this ); + connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); + commandSocket->sendStop(); + } return; } else if ( state == KCommandSocket::errorW ) { - mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); + mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); } else if ( state == KCommandSocket::successR ) { QTimer::singleShot( 1, this , SLOT ( readFileFromSocket())); } else if ( state == KCommandSocket::successW ) { - mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); } delete s; } void KSyncManager::readFileFromSocket() { QString fileName = syncFileName(); mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); if ( ! syncWithFile( fileName , true ) ) { mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); qDebug("Syncing failed "); return; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); if ( mWriteBackFile ) commandSocket->writeFile( fileName ); else { commandSocket->sendStop(); mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); } } @@ -1135,40 +1135,40 @@ void KCommandSocket::readFileFromSocket() mFileString = ""; mRetVal = errorR; qDebug("Error open temp calender file for writing: %s",fileName.latin1() ); deleteSocket(); return ; } // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); QTextStream ts ( &file ); ts.setEncoding( QTextStream::Latin1 ); ts << mFileString; file.close(); mFileString = ""; mRetVal = successR; mSocket->close(); // if state is not idle, deleteSocket(); is called via // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); if ( mSocket->state() == QSocket::Idle ) deleteSocket(); } void KCommandSocket::deleteSocket() { if ( mTimerSocket->isActive () ) { - mTimerSocket->stop(); - KMessageBox::information( 0, i18n("ERROR:\nConnection to remote host timed out!\nDid you forgot to enable\nsyncing on remote host? ")); - mRetVal = errorTO; - if ( mSocket ) { - mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) - deleteSocket(); - return; - } + mTimerSocket->stop(); + KMessageBox::information( 0, i18n("ERROR:\nConnection to remote host timed out!\nDid you forgot to enable\nsyncing on remote host? ")); + mRetVal = errorTO; + if ( mSocket ) { + mSocket->close(); + if ( mSocket->state() == QSocket::Idle ) + deleteSocket(); + return; + } } //qDebug("KCommandSocket::deleteSocket() %d", mRetVal ); if ( mSocket) delete mSocket; mSocket = 0; emit commandFinished( this, mRetVal ); } diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 7027894..1f7c7e7 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -1,226 +1,207 @@ /* - This file is part of KDE-Pim/Pi. - Copyright (c) 2004 Ulf Schenk + This file is part of KDE-Pim/Pi. + Copyright (c) 2004 Ulf Schenk - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. -$Id$ + $Id$ */ #ifndef _KSYNCMANAGER_H #define _KSYNCMANAGER_H #include <qobject.h> #include <qstring.h> #include <qsocket.h> #include <qdatetime.h> #include <qserversocket.h> #include <qtextstream.h> #include <qregexp.h> class QPopupMenu; class KSyncProfile; class KPimPrefs; class QWidget; class KSyncManager; class KSyncInterface; class QProgressBar; class KServerSocket : public QServerSocket { Q_OBJECT -public: + public: KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); void newConnection ( int socket ) ; void setFileName( QString fn ) {mFileName = fn;}; - -signals: + signals: void file_received( bool ); void request_file(); void saveFile(); void endConnect(); -private slots: + private slots: void discardClient(); void readClient(); void readBackFileFromSocket(); private : bool blockRC; void send_file(); void get_file(); void end_connect(); QDialog* mSyncActionDialog; QSocket* mSocket; QString mPassWord; QString mFileName; QTime piTime; QString piFileString; }; class KCommandSocket : public QObject { Q_OBJECT -public: + public: enum state { successR, errorR, successW, errorW, errorTO, quiet }; KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); void readFile( QString ); void writeFile( QString ); void sendStop(); - - -signals: + + signals: void commandFinished( KCommandSocket*, int ); -private slots: + private slots: void startReadFileFromSocket(); void readFileFromSocket(); void deleteSocket(); void writeFileToSocket(); private : QSocket* mSocket; QString mPassWord; Q_UINT16 mPort; QString mHost; QString mFileName; QTimer* mTimerSocket; int mRetVal; QTime mTime; QString mFileString; bool mFirst; }; class KSyncManager : public QObject { - Q_OBJECT + Q_OBJECT - public: + public: enum TargetApp { - KOPI = 0, - KAPI = 1, - PWMPI = 2 }; - + KOPI = 0, + KAPI = 1, + PWMPI = 2 }; KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); ~KSyncManager() ; void multiSync( bool askforPrefs ); bool blockSave() { return mBlockSaveFlag; } void setBlockSave(bool sa) { mBlockSaveFlag = sa; } void setDefaultFileName( QString s) { mDefFileName = s ;} QString defaultFileName() { return mDefFileName ;} QString syncFileName(); - void fillSyncMenu(); QString getCurrentSyncDevice() { return mCurrentSyncDevice; } QString getCurrentSyncName() { return mCurrentSyncName; } void showProgressBar(int percentage, QString caption = QString::null, int total=100); void hideProgressBar(); bool isProgressBarCanceled(); - // sync stuff + // sync stuff QString mLocalMachineName; QStringList mExternSyncProfiles; QStringList mSyncProfileNames; bool mAskForPreferences; bool mShowSyncSummary; - bool mShowSyncEvents; - bool mShowTodoInAgenda; bool mWriteBackExistingOnly; int mSyncAlgoPrefs; - int mRingSyncAlgoPrefs; bool mWriteBackFile; int mWriteBackInFuture; QString mPhoneDevice; QString mPhoneConnection; QString mPhoneModel; QString mPassWordPiSync; QString mActiveSyncPort; QString mActiveSyncIP ; signals: void save(); void request_file(); void getFile( bool ); - public slots: + public slots: void slotSyncMenu( int ); void deleteCommandSocket(KCommandSocket*s, int state); void readFileFromSocket(); + void fillSyncMenu(); private: - // LR ******************************* - // sync stuff! void syncPi(); KServerSocket * mServerSocket; void enableQuick(); KPimPrefs* mPrefs; QString mDefFileName; QString mCurrentSyncDevice; QString mCurrentSyncName; void quickSyncLocalFile(); - bool syncWithFile( QString fn , bool quick ); + bool syncWithFile( QString fn , bool quick ); void syncLocalFile(); void syncPhone(); void syncSharp(); bool syncExternalApplication(QString); int mCurrentSyncProfile ; void syncRemote( KSyncProfile* prof, bool ask = true); void edit_sync_options(); int ringSync(); QString getPassword( ); - private slots: + private slots: void confSync(); - // ********************* - private: bool mBlockSaveFlag; - - QWidget* mParent; KSyncInterface* mImplementation; TargetApp mTargetApp; QPopupMenu* mSyncMenu; - QProgressBar* bar; - - - - }; class KSyncInterface { - - public : virtual bool sync(KSyncManager* manager, QString filename, int mode) = 0; - virtual bool syncExternal(KSyncManager* manager, QString resource) - { - // empty implementation, because some syncable applications do not have an external(sharpdtm) syncmode, like pwmanager. - return false; - } + { + // empty implementation, because some syncable applications do not + // have an external(sharpdtm) syncmode, like pwmanager. + return false; + } }; #endif |