summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.cpp
Unidiff
Diffstat (limited to 'libkdepim/ksyncprofile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index d6620c8..b0d3efc 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -49,192 +49,194 @@ KSyncProfile* KSyncProfile::clone()
49 myClone->setRemotePwAB(mRemotePwAB); 49 myClone->setRemotePwAB(mRemotePwAB);
50 myClone->setRemoteIPAB(mRemoteIPAB); 50 myClone->setRemoteIPAB(mRemoteIPAB);
51 myClone->setRemotePortAB(mRemotePortAB); 51 myClone->setRemotePortAB(mRemotePortAB);
52 myClone->setRemotePwPWM(mRemotePwPWM); 52 myClone->setRemotePwPWM(mRemotePwPWM);
53 myClone->setRemoteIPPWM(mRemoteIPPWM); 53 myClone->setRemoteIPPWM(mRemoteIPPWM);
54 myClone->setRemotePortPWM (mRemotePortPWM); 54 myClone->setRemotePortPWM (mRemotePortPWM);
55 myClone->setPreSyncCommand( mPreSyncCommand ); 55 myClone->setPreSyncCommand( mPreSyncCommand );
56 myClone->setPostSyncCommand( mPostSyncCommand ); 56 myClone->setPostSyncCommand( mPostSyncCommand );
57 myClone->setLocalTempFile( mLocalTempFile); 57 myClone->setLocalTempFile( mLocalTempFile);
58 myClone->setRemoteFileName( mRemoteFileName ); 58 myClone->setRemoteFileName( mRemoteFileName );
59 myClone->setPreSyncCommandAB( mPreSyncCommandAB ); 59 myClone->setPreSyncCommandAB( mPreSyncCommandAB );
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 ); 84 myClone->setFilterInCal ( mFilterInCal );
85 myClone->setFilterOutCal ( mFilterOutCal ); 85 myClone->setFilterOutCal ( mFilterOutCal );
86 myClone->setFilterInAB ( mFilterInAB ); 86 myClone->setFilterInAB ( mFilterInAB );
87 myClone->setFilterOutAB ( mFilterOutAB ); 87 myClone->setFilterOutAB ( mFilterOutAB );
88 //myClone->setIdentifier( "noID" ); 88 //myClone->setIdentifier( "noID" );
89 return myClone; 89 return myClone;
90} 90}
91 91
92 92
93void KSyncProfile::setDefault() 93void KSyncProfile::setDefault()
94{ 94{
95 mPreSyncCommand = i18n("command for downloading remote file to local device"); 95 mPreSyncCommand = i18n("command for downloading remote file to local device");
96 mPostSyncCommand = i18n("command for uploading local temp file to remote device"); 96 mPostSyncCommand = i18n("command for uploading local temp file to remote device");
97 mLocalTempFile = "/tmp/mycalendar.ics"; 97 mLocalTempFile = "/tmp/mycalendar.ics";
98 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; 98 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
99 mPreSyncCommandAB = i18n("command for downloading remote file to local device"); 99 mPreSyncCommandAB = i18n("command for downloading remote file to local device");
100 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); 100 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
101 mLocalTempFileAB = "/tmp/std.vcf"; 101 mLocalTempFileAB = "/tmp/std.vcf";
102 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; 102 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
103 mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); 103 mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
104 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); 104 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device");
105 mLocalTempFilePWM = "/tmp/passwords.pwm"; 105 mLocalTempFilePWM = "/tmp/passwords.pwm";
106 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; 106 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm";
107 107
108 mRemotePw = "abc"; 108 mRemotePw = "abc";
109 mRemoteIP = "192.168.0.99"; 109 mRemoteIP = "192.168.0.99";
110 mRemotePort = "9197"; 110 mRemotePort = "9197";
111 111
112 mRemotePwAB = "abc"; 112 mRemotePwAB = "abc";
113 mRemoteIPAB = "192.168.0.99"; 113 mRemoteIPAB = "192.168.0.99";
114 mRemotePortAB = "9198"; 114 mRemotePortAB = "9198";
115 115
116 mRemotePwPWM = "abc"; 116 mRemotePwPWM = "abc";
117 mRemoteIPPWM = "192.168.0.99"; 117 mRemoteIPPWM = "192.168.0.99";
118 mRemotePortPWM = "9199"; 118 mRemotePortPWM = "9199";
119 119
120 mShowSummaryAfterSync = true; 120 mShowSummaryAfterSync = true;
121 mAskForPreferences = true; 121 mAskForPreferences = true;
122 mWriteBackExisting = false; 122 mWriteBackExisting = false;
123 mWriteBackFuture = false; 123 mWriteBackFuture = false;
124 mWriteBackFutureWeeks = 12; 124 mWriteBackFutureWeeks = 12;
125 mWriteBackPastWeeks = 2; 125 mWriteBackPastWeeks = 2;
126 mWriteBackFile = true; 126 mWriteBackFile = true;
127 mIncludeInRingSync = false; 127 mIncludeInRingSync = false;
128 mIncludeInRingSyncAB = false; 128 mIncludeInRingSyncAB = false;
129 mIncludeInRingSyncPWM = false; 129 mIncludeInRingSyncPWM = false;
130 mSyncPrefs = SYNC_PREF_ASK; 130 mSyncPrefs = SYNC_PREF_ASK;
131 mIsLocalFileSync = true; 131 mIsLocalFileSync = true;
132 mName = "noName"; 132 mName = "noName";
133 mIsPhoneSync = false; 133 mIsPhoneSync = false;
134 mIsPiSync = false; 134 mIsPiSync = false;
135 mIsPiSyncSpec = false; 135 mIsPiSyncSpec = false;
136 mIsKapiFile = false; 136 mIsKapiFile = false;
137 mWriteContactToSIM = false; 137 mWriteContactToSIM = false;
138 mPhoneDevice = "/dev/ircomm"; 138 mPhoneDevice = "/dev/ircomm";
139 mPhoneConnection = "irda"; 139 mPhoneConnection = "irda";
140 mPhoneModel = "6310i"; 140 mPhoneModel = "6310i";
141 mFilterInCal = "no filter"; 141 mFilterInCal = "no filter";
142 mFilterOutCal = "no filter"; 142 mFilterOutCal = "no filter";
143 mFilterInAB = "no filter"; 143 mFilterInAB = "no filter";
144 mFilterOutAB = "no filter"; 144 mFilterOutAB = "no filter";
145 mResSpecKopi = "";
146 mResSpecKapi = "";
145} 147}
146void KSyncProfile::readConfig(KConfig *config ) 148void KSyncProfile::readConfig(KConfig *config )
147{ 149{
148 if (config) 150 if (config)
149 { 151 {
150 152
151 config->setGroup( mName ); 153 config->setGroup( mName );
152 154
153 mName = config->readEntry( "Name", mName ); 155 mName = config->readEntry( "Name", mName );
154 156
155 mRemotePw = config->readEntry( "RemotePw",mRemotePw ); 157 mRemotePw = config->readEntry( "RemotePw",mRemotePw );
156 mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP ); 158 mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP );
157 mRemotePort = config->readEntry( "RemotePort", mRemotePort ); 159 mRemotePort = config->readEntry( "RemotePort", mRemotePort );
158 mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB ); 160 mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB );
159 mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB ); 161 mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB );
160 mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB ); 162 mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB );
161 mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM ); 163 mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM );
162 mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM ); 164 mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM );
163 mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM ); 165 mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM );
164 166
165 mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); 167 mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand );
166 mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); 168 mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand );
167 mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); 169 mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile );
168 mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); 170 mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName );
169 171
170 mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); 172 mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB );
171 mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); 173 mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB );
172 mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); 174 mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB );
173 mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); 175 mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB );
174 176
175 mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); 177 mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
176 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); 178 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
177 mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM ); 179 mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM );
178 mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); 180 mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
179 181
180 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); 182 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice );
181 mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection ); 183 mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection );
182 mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); 184 mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel );
183 185
184 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); 186 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync );
185 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 187 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
186 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); 188 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
187 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 189 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
188 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); 190 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences );
189 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); 191 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting );
190 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); 192 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture );
191 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); 193 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile );
192 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); 194 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM );
193 mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); 195 mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs );
194 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); 196 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks );
195 mWriteBackPastWeeks = config->readNumEntry( "WriteBackPastWeeks", mWriteBackPastWeeks ); 197 mWriteBackPastWeeks = config->readNumEntry( "WriteBackPastWeeks", mWriteBackPastWeeks );
196 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); 198 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync );
197 mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); 199 mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync );
198 mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync ); 200 mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync );
199 mIsPiSyncSpec= config->readBoolEntry( "IsPiSyncSpec", mIsPiSyncSpec ); 201 mIsPiSyncSpec= config->readBoolEntry( "IsPiSyncSpec", mIsPiSyncSpec );
200 mIsKapiFile = config->readBoolEntry( "IsKapiFile", mIsKapiFile ); 202 mIsKapiFile = config->readBoolEntry( "IsKapiFile", mIsKapiFile );
201 203
202 mFilterInCal = config->readEntry( "FilterInCal", mFilterInCal ); 204 mFilterInCal = config->readEntry( "FilterInCal", mFilterInCal );
203 mFilterOutCal = config->readEntry( "FilterOutCal", mFilterOutCal ); 205 mFilterOutCal = config->readEntry( "FilterOutCal", mFilterOutCal );
204 mFilterInAB = config->readEntry( "FilterInAB", mFilterInAB ); 206 mFilterInAB = config->readEntry( "FilterInAB", mFilterInAB );
205 mFilterOutAB = config->readEntry( "FilterOutAB", mFilterOutAB ); 207 mFilterOutAB = config->readEntry( "FilterOutAB", mFilterOutAB );
206 mResSpecKopi = config->readEntry( "ResSpecKopi", mResSpecKopi ); 208 mResSpecKopi = config->readEntry( "ResSpecKopi", mResSpecKopi );
207 mResSpecKapi = config->readEntry( "ResSpecKapi", mResSpecKapi ); 209 mResSpecKapi = config->readEntry( "ResSpecKapi", mResSpecKapi );
208 210
209 } 211 }
210 else 212 else
211 { 213 {
212 setDefault(); 214 setDefault();
213 } 215 }
214} 216}
215 217
216void KSyncProfile::deleteConfig(KConfig *config ) 218void KSyncProfile::deleteConfig(KConfig *config )
217{ 219{
218 config->deleteGroup( mName ); 220 config->deleteGroup( mName );
219} 221}
220 222
221void KSyncProfile::writeConfig( KConfig * config ) 223void KSyncProfile::writeConfig( KConfig * config )
222{ 224{
223 config->setGroup(mName); 225 config->setGroup(mName);
224 226
225 config->writeEntry( "RemotePw", mRemotePw); 227 config->writeEntry( "RemotePw", mRemotePw);
226 config->writeEntry( "RemoteIP", mRemoteIP); 228 config->writeEntry( "RemoteIP", mRemoteIP);
227 config->writeEntry( "RemotePort", mRemotePort); 229 config->writeEntry( "RemotePort", mRemotePort);
228 230
229 config->writeEntry( "RemotePwAB", mRemotePwAB); 231 config->writeEntry( "RemotePwAB", mRemotePwAB);
230 config->writeEntry( "RemoteIPAB", mRemoteIPAB); 232 config->writeEntry( "RemoteIPAB", mRemoteIPAB);
231 config->writeEntry( "RemotePortAB", mRemotePortAB); 233 config->writeEntry( "RemotePortAB", mRemotePortAB);
232 234
233 config->writeEntry( "RemotePwPWM", mRemotePwPWM); 235 config->writeEntry( "RemotePwPWM", mRemotePwPWM);
234 config->writeEntry( "RemoteIPPWM", mRemoteIPPWM); 236 config->writeEntry( "RemoteIPPWM", mRemoteIPPWM);
235 config->writeEntry( "RemotePortPWM", mRemotePortPWM); 237 config->writeEntry( "RemotePortPWM", mRemotePortPWM);
236 238
237 config->writeEntry( "Name", mName ); 239 config->writeEntry( "Name", mName );
238 config->writeEntry( "PreSyncCommand",mPreSyncCommand ); 240 config->writeEntry( "PreSyncCommand",mPreSyncCommand );
239 config->writeEntry( "PostSyncCommand", mPostSyncCommand ); 241 config->writeEntry( "PostSyncCommand", mPostSyncCommand );
240 config->writeEntry( "LocalTempFile", mLocalTempFile ); 242 config->writeEntry( "LocalTempFile", mLocalTempFile );