summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.cpp
authorzautrix <zautrix>2005-01-14 21:17:00 (UTC)
committer zautrix <zautrix>2005-01-14 21:17:00 (UTC)
commitee9df90c4898f4ed624be2d4e94918fcc80060e9 (patch) (unidiff)
treed15e5e2e7fd4120d09fdda2ab4331ade67082e84 /libkdepim/ksyncprofile.cpp
parent620f8de219ee34c209960f02c8296c0568dd5d8b (diff)
downloadkdepimpi-ee9df90c4898f4ed624be2d4e94918fcc80060e9.zip
kdepimpi-ee9df90c4898f4ed624be2d4e94918fcc80060e9.tar.gz
kdepimpi-ee9df90c4898f4ed624be2d4e94918fcc80060e9.tar.bz2
sync settings
Diffstat (limited to 'libkdepim/ksyncprofile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index 9f404cb..0d72fc9 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -60,48 +60,52 @@ KSyncProfile* KSyncProfile::clone()
60 myClone->setPostSyncCommandAB( mPostSyncCommandAB ); 60 myClone->setPostSyncCommandAB( mPostSyncCommandAB );
61 myClone->setLocalTempFileAB( mLocalTempFileAB); 61 myClone->setLocalTempFileAB( mLocalTempFileAB);
62 myClone->setRemoteFileNameAB( mRemoteFileNameAB ); 62 myClone->setRemoteFileNameAB( mRemoteFileNameAB );
63 myClone->setPreSyncCommandPWM( mPreSyncCommandPWM ); 63 myClone->setPreSyncCommandPWM( mPreSyncCommandPWM );
64 myClone->setPostSyncCommandPWM( mPostSyncCommandPWM ); 64 myClone->setPostSyncCommandPWM( mPostSyncCommandPWM );
65 myClone->setLocalTempFilePWM( mLocalTempFilePWM); 65 myClone->setLocalTempFilePWM( mLocalTempFilePWM);
66 myClone->setRemoteFileNamePWM( mRemoteFileNamePWM ); 66 myClone->setRemoteFileNamePWM( mRemoteFileNamePWM );
67 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); 67 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
68 myClone->setAskForPreferences( mAskForPreferences); 68 myClone->setAskForPreferences( mAskForPreferences);
69 myClone->setWriteBackExisting(mWriteBackExisting ); 69 myClone->setWriteBackExisting(mWriteBackExisting );
70 myClone->setWriteBackFile( mWriteBackFile); 70 myClone->setWriteBackFile( mWriteBackFile);
71 myClone->setWriteBackFuture( mWriteBackFuture ); 71 myClone->setWriteBackFuture( mWriteBackFuture );
72 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); 72 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks );
73 myClone->setWriteBackPastWeeks( mWriteBackPastWeeks ); 73 myClone->setWriteBackPastWeeks( mWriteBackPastWeeks );
74 myClone->setIncludeInRingSync( mIncludeInRingSync ); 74 myClone->setIncludeInRingSync( mIncludeInRingSync );
75 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); 75 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
76 myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM ); 76 myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM );
77 myClone->setSyncPrefs( mSyncPrefs); 77 myClone->setSyncPrefs( mSyncPrefs);
78 myClone->setIsLocalFileSync( mIsLocalFileSync ); 78 myClone->setIsLocalFileSync( mIsLocalFileSync );
79 myClone->setIsPhoneSync( mIsPhoneSync ); 79 myClone->setIsPhoneSync( mIsPhoneSync );
80 myClone->setIsKapiFile( mIsKapiFile ); 80 myClone->setIsKapiFile( mIsKapiFile );
81 myClone->setIsPiSync( mIsPiSync ); 81 myClone->setIsPiSync( mIsPiSync );
82 myClone->setWriteContactToSIM( mWriteContactToSIM ); 82 myClone->setWriteContactToSIM( mWriteContactToSIM );
83 myClone->setName( "noName" ); 83 myClone->setName( "noName" );
84 myClone->setFilterInCal ( mFilterInCal );
85 myClone->setFilterOutCal ( mFilterOutCal );
86 myClone->setFilterInAB ( mFilterInAB );
87 myClone->setFilterOutAB ( mFilterOutAB );
84 //myClone->setIdentifier( "noID" ); 88 //myClone->setIdentifier( "noID" );
85 return myClone; 89 return myClone;
86} 90}
87 91
88 92
89void KSyncProfile::setDefault() 93void KSyncProfile::setDefault()
90{ 94{
91 mPreSyncCommand = i18n("command for downloading remote file to local device"); 95 mPreSyncCommand = i18n("command for downloading remote file to local device");
92 mPostSyncCommand = i18n("command for uploading local temp file to remote device"); 96 mPostSyncCommand = i18n("command for uploading local temp file to remote device");
93 mLocalTempFile = "/tmp/mycalendar.ics"; 97 mLocalTempFile = "/tmp/mycalendar.ics";
94 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; 98 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
95 mPreSyncCommandAB = i18n("command for downloading remote file to local device"); 99 mPreSyncCommandAB = i18n("command for downloading remote file to local device");
96 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); 100 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
97 mLocalTempFileAB = "/tmp/std.vcf"; 101 mLocalTempFileAB = "/tmp/std.vcf";
98 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; 102 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
99 mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); 103 mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
100 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); 104 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device");
101 mLocalTempFilePWM = "/tmp/passwords.pwm"; 105 mLocalTempFilePWM = "/tmp/passwords.pwm";
102 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; 106 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm";
103 107
104 mRemotePw = "abc"; 108 mRemotePw = "abc";
105 mRemoteIP = "192.168.0.99"; 109 mRemoteIP = "192.168.0.99";
106 mRemotePort = "9197"; 110 mRemotePort = "9197";
107 111
@@ -112,48 +116,52 @@ void KSyncProfile::setDefault()
112 mRemotePwPWM = "abc"; 116 mRemotePwPWM = "abc";
113 mRemoteIPPWM = "192.168.0.99"; 117 mRemoteIPPWM = "192.168.0.99";
114 mRemotePortPWM = "9199"; 118 mRemotePortPWM = "9199";
115 119
116 mShowSummaryAfterSync = true; 120 mShowSummaryAfterSync = true;
117 mAskForPreferences = true; 121 mAskForPreferences = true;
118 mWriteBackExisting = false; 122 mWriteBackExisting = false;
119 mWriteBackFuture = false; 123 mWriteBackFuture = false;
120 mWriteBackFutureWeeks = 12; 124 mWriteBackFutureWeeks = 12;
121 mWriteBackPastWeeks = 2; 125 mWriteBackPastWeeks = 2;
122 mWriteBackFile = true; 126 mWriteBackFile = true;
123 mIncludeInRingSync = false; 127 mIncludeInRingSync = false;
124 mIncludeInRingSyncAB = false; 128 mIncludeInRingSyncAB = false;
125 mIncludeInRingSyncPWM = false; 129 mIncludeInRingSyncPWM = false;
126 mSyncPrefs = SYNC_PREF_ASK; 130 mSyncPrefs = SYNC_PREF_ASK;
127 mIsLocalFileSync = true; 131 mIsLocalFileSync = true;
128 mName = "noName"; 132 mName = "noName";
129 mIsPhoneSync = false; 133 mIsPhoneSync = false;
130 mIsPiSync = false; 134 mIsPiSync = false;
131 mIsKapiFile = false; 135 mIsKapiFile = false;
132 mWriteContactToSIM = false; 136 mWriteContactToSIM = false;
133 mPhoneDevice = "/dev/ircomm"; 137 mPhoneDevice = "/dev/ircomm";
134 mPhoneConnection = "irda"; 138 mPhoneConnection = "irda";
135 mPhoneModel = "6310i"; 139 mPhoneModel = "6310i";
140 mFilterInCal = "no filter";
141 mFilterOutCal = "no filter";
142 mFilterInAB = "no filter";
143 mFilterOutAB = "no filter";
136} 144}
137void KSyncProfile::readConfig(KConfig *config ) 145void KSyncProfile::readConfig(KConfig *config )
138{ 146{
139 if (config) 147 if (config)
140 { 148 {
141 149
142 config->setGroup( mName ); 150 config->setGroup( mName );
143 151
144 mName = config->readEntry( "Name", mName ); 152 mName = config->readEntry( "Name", mName );
145 153
146 mRemotePw = config->readEntry( "RemotePw",mRemotePw ); 154 mRemotePw = config->readEntry( "RemotePw",mRemotePw );
147 mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP ); 155 mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP );
148 mRemotePort = config->readEntry( "RemotePort", mRemotePort ); 156 mRemotePort = config->readEntry( "RemotePort", mRemotePort );
149 mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB ); 157 mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB );
150 mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB ); 158 mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB );
151 mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB ); 159 mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB );
152 mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM ); 160 mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM );
153 mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM ); 161 mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM );
154 mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM ); 162 mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM );
155 163
156 mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); 164 mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand );
157 mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); 165 mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand );
158 mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); 166 mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile );
159 mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); 167 mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName );
@@ -167,48 +175,54 @@ void KSyncProfile::readConfig(KConfig *config )
167 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); 175 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
168 mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM ); 176 mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM );
169 mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); 177 mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
170 178
171 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); 179 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice );
172 mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection ); 180 mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection );
173 mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); 181 mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel );
174 182
175 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); 183 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync );
176 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 184 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
177 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); 185 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
178 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 186 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
179 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); 187 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences );
180 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); 188 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting );
181 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); 189 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture );
182 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); 190 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile );
183 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); 191 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM );
184 mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); 192 mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs );
185 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); 193 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks );
186 mWriteBackPastWeeks = config->readNumEntry( "WriteBackPastWeeks", mWriteBackPastWeeks ); 194 mWriteBackPastWeeks = config->readNumEntry( "WriteBackPastWeeks", mWriteBackPastWeeks );
187 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); 195 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync );
188 mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); 196 mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync );
189 mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync ); 197 mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync );
190 mIsKapiFile = config->readBoolEntry( "IsKapiFile", mIsKapiFile ); 198 mIsKapiFile = config->readBoolEntry( "IsKapiFile", mIsKapiFile );
199
200 mFilterInCal = config->readEntry( "FilterInCal", mFilterInCal );
201 mFilterOutCal = config->readEntry( "FilterOutCal", mFilterOutCal );
202 mFilterInAB = config->readEntry( "FilterInAB", mFilterInAB );
203 mFilterOutAB = config->readEntry( "FilterOutAB", mFilterOutAB );
204
191 } 205 }
192 else 206 else
193 { 207 {
194 setDefault(); 208 setDefault();
195 } 209 }
196} 210}
197 211
198void KSyncProfile::deleteConfig(KConfig *config ) 212void KSyncProfile::deleteConfig(KConfig *config )
199{ 213{
200 config->deleteGroup( mName ); 214 config->deleteGroup( mName );
201} 215}
202 216
203void KSyncProfile::writeConfig( KConfig * config ) 217void KSyncProfile::writeConfig( KConfig * config )
204{ 218{
205 config->setGroup(mName); 219 config->setGroup(mName);
206 220
207 config->writeEntry( "RemotePw", mRemotePw); 221 config->writeEntry( "RemotePw", mRemotePw);
208 config->writeEntry( "RemoteIP", mRemoteIP); 222 config->writeEntry( "RemoteIP", mRemoteIP);
209 config->writeEntry( "RemotePort", mRemotePort); 223 config->writeEntry( "RemotePort", mRemotePort);
210 224
211 config->writeEntry( "RemotePwAB", mRemotePwAB); 225 config->writeEntry( "RemotePwAB", mRemotePwAB);
212 config->writeEntry( "RemoteIPAB", mRemoteIPAB); 226 config->writeEntry( "RemoteIPAB", mRemoteIPAB);
213 config->writeEntry( "RemotePortAB", mRemotePortAB); 227 config->writeEntry( "RemotePortAB", mRemotePortAB);
214 228
@@ -231,26 +245,31 @@ void KSyncProfile::writeConfig( KConfig * config )
231 config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); 245 config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
232 config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM ); 246 config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM );
233 config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); 247 config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
234 248
235 config->writeEntry( "PhoneDevice", mPhoneDevice ); 249 config->writeEntry( "PhoneDevice", mPhoneDevice );
236 config->writeEntry( "PhoneConnection", mPhoneConnection ); 250 config->writeEntry( "PhoneConnection", mPhoneConnection );
237 config->writeEntry( "PhoneModel", mPhoneModel ); 251 config->writeEntry( "PhoneModel", mPhoneModel );
238 252
239 config->writeEntry( "IncludeInRingSync",mIncludeInRingSync ); 253 config->writeEntry( "IncludeInRingSync",mIncludeInRingSync );
240 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 254 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
241 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); 255 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
242 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 256 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
243 config->writeEntry( "AskForPreferences",mAskForPreferences ); 257 config->writeEntry( "AskForPreferences",mAskForPreferences );
244 config->writeEntry( "WriteBackExisting",mWriteBackExisting ); 258 config->writeEntry( "WriteBackExisting",mWriteBackExisting );
245 config->writeEntry( "WriteBackFuture",mWriteBackFuture ); 259 config->writeEntry( "WriteBackFuture",mWriteBackFuture );
246 config->writeEntry( "WriteBackFile",mWriteBackFile ); 260 config->writeEntry( "WriteBackFile",mWriteBackFile );
247 config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); 261 config->writeEntry( "WriteContactToSIM",mWriteContactToSIM );
248 config->writeEntry( "SyncPrefs", mSyncPrefs ); 262 config->writeEntry( "SyncPrefs", mSyncPrefs );
249 config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); 263 config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks);
250 config->writeEntry( "WriteBackPastWeeks", mWriteBackPastWeeks); 264 config->writeEntry( "WriteBackPastWeeks", mWriteBackPastWeeks);
251 config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); 265 config->writeEntry( "IsLocalFileSync", mIsLocalFileSync );
252 config->writeEntry( "IsPhoneSync", mIsPhoneSync ); 266 config->writeEntry( "IsPhoneSync", mIsPhoneSync );
253 config->writeEntry( "IsPiSync", mIsPiSync ); 267 config->writeEntry( "IsPiSync", mIsPiSync );
254 config->writeEntry( "IsKapiFile", mIsKapiFile ); 268 config->writeEntry( "IsKapiFile", mIsKapiFile );
269 config->writeEntry( "FilterInCal", mFilterInCal );
270 config->writeEntry( "FilterOutCal", mFilterOutCal );
271 config->writeEntry( "FilterInAB", mFilterInAB );
272 config->writeEntry( "FilterOutAB", mFilterOutAB );
273
255} 274}
256 275