summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.cpp
authorzautrix <zautrix>2004-10-04 21:21:00 (UTC)
committer zautrix <zautrix>2004-10-04 21:21:00 (UTC)
commitf53ef630b9299ceae666e64da8ce022813795ed6 (patch) (side-by-side diff)
tree26dc94a83f42c2174195817c505c34941246d2e3 /libkdepim/ksyncprofile.cpp
parentdfc6d084410456037bf6f26f741e7b938085de88 (diff)
downloadkdepimpi-f53ef630b9299ceae666e64da8ce022813795ed6.zip
kdepimpi-f53ef630b9299ceae666e64da8ce022813795ed6.tar.gz
kdepimpi-f53ef630b9299ceae666e64da8ce022813795ed6.tar.bz2
added option to sync config dialog
Diffstat (limited to 'libkdepim/ksyncprofile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index 2bf4e6c..76dfe00 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -40,12 +40,21 @@ KSyncProfile::~KSyncProfile()
}
KSyncProfile* KSyncProfile::clone()
{
KSyncProfile* myClone = new KSyncProfile();
+ myClone->setRemotePw(mRemotePw);
+ myClone->setRemoteIP(mRemoteIP);
+ myClone->setRemotePort(mRemotePort);
+ myClone->setRemotePwAB(mRemotePwAB);
+ myClone->setRemoteIPAB(mRemoteIPAB);
+ myClone->setRemotePortAB(mRemotePortAB);
+ myClone->setRemotePwPWM(mRemotePwPWM);
+ myClone->setRemoteIPPWM(mRemoteIPPWM);
+ myClone->setRemotePortPWM (mRemotePortPWM);
myClone->setPreSyncCommand( mPreSyncCommand );
myClone->setPostSyncCommand( mPostSyncCommand );
myClone->setLocalTempFile( mLocalTempFile);
myClone->setRemoteFileName( mRemoteFileName );
myClone->setPreSyncCommandAB( mPreSyncCommandAB );
myClone->setPostSyncCommandAB( mPostSyncCommandAB );
@@ -64,12 +73,13 @@ KSyncProfile* KSyncProfile::clone()
myClone->setIncludeInRingSync( mIncludeInRingSync );
myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM );
myClone->setSyncPrefs( mSyncPrefs);
myClone->setIsLocalFileSync( mIsLocalFileSync );
myClone->setIsPhoneSync( mIsPhoneSync );
+ myClone->setIsPiSync( mIsPiSync );
myClone->setWriteContactToSIM( mWriteContactToSIM );
myClone->setName( "noName" );
//myClone->setIdentifier( "noID" );
return myClone;
}
@@ -85,12 +95,25 @@ void KSyncProfile::setDefault()
mLocalTempFileAB = "/tmp/std.vcf";
mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device");
mLocalTempFilePWM = "/tmp/passwords.pwm";
mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm";
+
+ mRemotePw = "abc";
+ mRemoteIP = "192.168.0.99";
+ mRemotePort = "9197";
+
+ mRemotePwAB = "abc";
+ mRemoteIPAB = "192.168.0.99";
+ mRemotePortAB = "9198";
+
+ mRemotePwPWM = "abc";
+ mRemoteIPPWM = "192.168.0.99";
+ mRemotePortPWM = "9199";
+
mShowSummaryAfterSync = true;
mAskForPreferences = true;
mWriteBackExisting = false;
mWriteBackFuture = false;
mWriteBackFutureWeeks = 12;
mWriteBackFile = true;
@@ -98,12 +121,13 @@ void KSyncProfile::setDefault()
mIncludeInRingSyncAB = false;
mIncludeInRingSyncPWM = false;
mSyncPrefs = SYNC_PREF_ASK;
mIsLocalFileSync = true;
mName = "noName";
mIsPhoneSync = false;
+ mIsPiSync = false;
mWriteContactToSIM = false;
mPhoneDevice = "/dev/ircomm";
mPhoneConnection = "irda";
mPhoneModel = "6310i";
}
void KSyncProfile::readConfig(KConfig *config )
@@ -111,12 +135,23 @@ void KSyncProfile::readConfig(KConfig *config )
if (config)
{
config->setGroup( mName );
mName = config->readEntry( "Name", mName );
+
+ mRemotePw = config->readEntry( "RemotePw",mRemotePw );
+ mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP );
+ mRemotePort = config->readEntry( "RemotePort", mRemotePort );
+ mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB );
+ mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB );
+ mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB );
+ mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM );
+ mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM );
+ mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM );
+
mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand );
mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand );
mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile );
mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName );
mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB );
@@ -143,12 +178,13 @@ void KSyncProfile::readConfig(KConfig *config )
mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile );
mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM );
mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs );
mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks );
mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync );
mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync );
+ mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync );
}
else
{
setDefault();
}
}
@@ -159,12 +195,24 @@ void KSyncProfile::deleteConfig(KConfig *config )
}
void KSyncProfile::writeConfig( KConfig * config )
{
config->setGroup(mName);
+ config->writeEntry( "RemotePw", mRemotePw);
+ config->writeEntry( "RemoteIP", mRemoteIP);
+ config->writeEntry( "RemotePort", mRemotePort);
+
+ config->writeEntry( "RemotePwAB", mRemotePwAB);
+ config->writeEntry( "RemoteIPAB", mRemoteIPAB);
+ config->writeEntry( "RemotePortAB", mRemotePortAB);
+
+ config->writeEntry( "RemotePwPWM", mRemotePwPWM);
+ config->writeEntry( "RemoteIPPWM", mRemoteIPPWM);
+ config->writeEntry( "RemotePortPWM", mRemotePortPWM);
+
config->writeEntry( "Name", mName );
config->writeEntry( "PreSyncCommand",mPreSyncCommand );
config->writeEntry( "PostSyncCommand", mPostSyncCommand );
config->writeEntry( "LocalTempFile", mLocalTempFile );
config->writeEntry( "RemoteFileName", mRemoteFileName );
@@ -192,8 +240,9 @@ void KSyncProfile::writeConfig( KConfig * config )
config->writeEntry( "WriteBackFile",mWriteBackFile );
config->writeEntry( "WriteContactToSIM",mWriteContactToSIM );
config->writeEntry( "SyncPrefs", mSyncPrefs );
config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks);
config->writeEntry( "IsLocalFileSync", mIsLocalFileSync );
config->writeEntry( "IsPhoneSync", mIsPhoneSync );
+ config->writeEntry( "IsPiSync", mIsPiSync );
}