summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-11-28 05:53:55 (UTC)
committer zautrix <zautrix>2005-11-28 05:53:55 (UTC)
commit29c3ed5181b8a33aac73eec90956819b71641048 (patch) (side-by-side diff)
tree8733a18a337b28545ccda5e178cab1b1977314d5
parentc09ac6c4c77ee1ed50cd9d86a6798eebdede3991 (diff)
downloadkdepimpi-29c3ed5181b8a33aac73eec90956819b71641048.zip
kdepimpi-29c3ed5181b8a33aac73eec90956819b71641048.tar.gz
kdepimpi-29c3ed5181b8a33aac73eec90956819b71641048.tar.bz2
sync
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp4
-rw-r--r--pwmanager/pwmanager/pwm.h2
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp2
-rw-r--r--pwmanager/pwmanager/pwmdoc.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index e12dc49..8373850 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -1544,53 +1544,53 @@ void PwM::createAboutData_slot()
#else
"PDA-Edition\n"
"for: Zaurus 5500 / 7x0 / 8x0\n"
#endif
"(c) 2004 Ulf Schenk\n"
"(c) 2004 Lutz Rogowski\n"
"(c) 1997-2004, The KDE PIM Team\n"
"(c) Michael Buesch - main programming\nand current maintainer\nmbuesch@freenet.de\n"
"Matt Scifo - mscifo@o1.com\n"
"Elias Probst - elias.probst@gmx.de\n"
"George Staikos - staikos@kde.org\n"
"Matthew Palmer - mjp16@uow.edu.au\n"
"Olivier Sessink - gpasman@nl.linux.org\n"
"The libgcrypt developers -\nBlowfish and SHA1 algorithms\nftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/\n"
"Troy Engel - tengel@sonic.net\n"
"Wickey - wickey@gmx.at\n"
"Ian MacGregor - original documentation author.\n"
);
}
//this are the overwritten callbackmethods from the syncinterface
-bool PwM::sync(KSyncManager* manager, QString filename, int mode)
+bool PwM::sync(KSyncManager* manager, QString filename, int mode,QString resource)
{
PWM_ASSERT(curDoc());
- bool ret = curDoc()->sync(manager, filename, mode);
+ bool ret = curDoc()->sync(manager, filename, mode,resource);
qDebug("PwM::sync save now: ret=%i", ret);
if (ret == true) {
//US BUG: what can we call here to update the view of the current doc?
//mViewManager->refreshView();
//US curDoc()->sync sets the dirtyFlag in case the sync was successfull.
save();
}
return ret;
}
void PwM::removeSyncInfo( QString syncProfile)
{
qDebug("PWM:removeSyncInfo for profile %s ", syncProfile.latin1());
curDoc()->removeSyncInfo( syncProfile );
//US curDoc()->removeSyncInfo sets the dirtyFlag.
}
#endif
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index 2d1b854..c4bbb4e 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -258,43 +258,43 @@ protected:
/** "chipcard" popup-menu */
KPopupMenu *chipcardPopup;
#endif // CONFIG_KEYCARD
/** "view" popup-menu */
KPopupMenu *viewPopup;
/** "options" popup-menu */
KPopupMenu *optionsPopup;
/** "help" popup-menu */
KPopupMenu *helpPopup;
/** "export" popup-menu */
KPopupMenu *exportPopup;
/** "import" popup-menu */
KPopupMenu *importPopup;
/** force quit this window? */
bool forceQuit;
/** force minimize this window to the tray */
bool forceMinimizeToTray;
private:
#ifdef PWM_EMBEDDED
//this are the overwritten callbackmethods from the syncinterface
- virtual bool sync(KSyncManager* manager, QString filename, int mode);
+ virtual bool sync(KSyncManager* manager, QString filename, int mode,QString resource);
virtual void removeSyncInfo( QString syncProfile);
// LR *******************************
// sync stuff!
QPopupMenu *syncPopup;
KSyncManager* syncManager;
#endif
};
#endif
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index 1f3c58b..b58d7e2 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -3423,49 +3423,49 @@ void PwMDoc::removeSyncInfo( QString syncProfile)
unsigned int count, i;
if ( syncProfile.isEmpty() ) {
count = numSyncDataEntries();
for (i = count; count > 0; count-- ) {
res = delSyncDataEntry(i-1, false);
if (res == false) {
qDebug("PwMDoc::removeSyncInfo: could not remove syncprofile");
}
}
} else {
found = findSyncData(syncProfile, &count);
if (found == true)
{
res = delSyncDataEntry(count, false);
if (res == false) {
qDebug("PwMDoc::removeSyncInfo: could not remove %s", syncProfile.latin1());
}
}
}
}
//this are the overwritten callbackmethods from the syncinterface
-bool PwMDoc::sync(KSyncManager* manager, QString filename, int mode)
+bool PwMDoc::sync(KSyncManager* manager, QString filename, int mode, QString resource)
{
QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
//1) unlock local file first if necessary (ask for password)
if (this->isDeepLocked()) {
PwMerror ret = this->deepLock(false);
if (ret != e_success)
return false;
}
//2) construct and open a new doc on the stack(automatic cleanup of remote file).
PwMDoc syncTarget(this, "synctarget");
PwMDoc* pSyncTarget = &syncTarget;
PwMerror err = pSyncTarget->openDoc(&filename, 1 /*== open with all entries locked*/);
if (err == e_alreadyOpen) {
PwMDocList::listItem li;
if (getOpenDocList()->find(filename.latin1(), &li))
pSyncTarget = li.doc;
else {
qDebug("PwmDoc::sync: sync failed. Error %i while opening file %s",err, filename.latin1());
return false;
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index 45dd729..144831f 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -775,49 +775,49 @@ QFile *f);
void setCurrentPw(const QString &pw)
{
currentPw = pw;
setDocStatFlag(DOC_STAT_DISK_DIRTY);
}
/** make a backup-copy of the given file */
bool backupFile(const QString &filePath);
/** copy a file from src to dst */
bool copyFile(const QString &src, const QString &dst);
public:
#ifdef PWM_EMBEDDED
//US ENH: this is the magic function that syncronizes the local doc with the remote doc.
PwMerror syncronize(KSyncManager* manager, PwMDoc* syncLocal, PwMDoc* syncRemote, int mode );
//takePwMDataItem returns the following values
// 0 equal
// 1 take local
// 2 take remote
// 3 cancel
int takePwMDataItem( PwMDataItem* local, PwMDataItem* remote, QDateTime lastSync, int mode , bool full );
//the following methods are the overwritten callbackmethods from the syncinterface
- virtual bool sync(KSyncManager* manager, QString filename, int mode);
+ virtual bool sync(KSyncManager* manager, QString filename, int mode, QString resource);
virtual void removeSyncInfo( QString syncProfile);
#endif
//US ENH: helpermethods to return a whole category entry
/** returns a pointer to the categoryitem */
PwMCategoryItem* getCategoryEntry(unsigned int index)
{ return &(dti.dta[index]); }
private:
//US ENH: helpermethods to access the sync data for a certain syncname.
// It returns the syncdatas index
bool findSyncData(const QString &syncname, unsigned int *index);
/** add new syncdataentry */
PwMerror addSyncDataEntry(PwMSyncItem *d, bool dontFlagDirty = false);
/** returns a pointer to the syncdata */
PwMSyncItem* getSyncDataEntry(unsigned int index)
{ return &(dti.syncDta[index]); }
/** delete entry */
bool delSyncDataEntry(unsigned int index, bool dontFlagDirty = false);
/** returns number of categories */