author | jgf <jgf> | 2003-12-09 21:36:56 (UTC) |
---|---|---|
committer | jgf <jgf> | 2003-12-09 21:36:56 (UTC) |
commit | 6b45c1f8e0293914c1328f15a665d2ea0fba7b43 (patch) (unidiff) | |
tree | d87ef7d3147a52429849a6921e7a8f31fde89aa8 /noncore/net/mail/settings.cpp | |
parent | 0a1f6405780b18c9f3d953adcfd072de8fd4dc18 (diff) | |
download | opie-6b45c1f8e0293914c1328f15a665d2ea0fba7b43.zip opie-6b45c1f8e0293914c1328f15a665d2ea0fba7b43.tar.gz opie-6b45c1f8e0293914c1328f15a665d2ea0fba7b43.tar.bz2 |
POP3 support - first steps
Diffstat (limited to 'noncore/net/mail/settings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/settings.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/noncore/net/mail/settings.cpp b/noncore/net/mail/settings.cpp index 9632301..b580954 100644 --- a/noncore/net/mail/settings.cpp +++ b/noncore/net/mail/settings.cpp | |||
@@ -123,25 +123,24 @@ IMAPaccount::IMAPaccount( QString filename ) | |||
123 | accountName = "New IMAP Account"; | 123 | accountName = "New IMAP Account"; |
124 | ssl = false; | 124 | ssl = false; |
125 | type = "IMAP"; | 125 | type = "IMAP"; |
126 | port = IMAP_PORT; | 126 | port = IMAP_PORT; |
127 | } | 127 | } |
128 | 128 | ||
129 | QString IMAPaccount::getUniqueFileName() | 129 | QString IMAPaccount::getUniqueFileName() |
130 | { | 130 | { |
131 | int num = 0; | 131 | int num = 0; |
132 | QString unique; | 132 | QString unique; |
133 | 133 | ||
134 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); | 134 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); |
135 | QStringList::Iterator it; | ||
136 | 135 | ||
137 | QStringList imap = dir.entryList( "imap-*" ); | 136 | QStringList imap = dir.entryList( "imap-*" ); |
138 | do { | 137 | do { |
139 | unique.setNum( num++ ); | 138 | unique.setNum( num++ ); |
140 | } while ( imap.contains( "imap-" + unique ) > 0 ); | 139 | } while ( imap.contains( "imap-" + unique ) > 0 ); |
141 | 140 | ||
142 | return unique; | 141 | return unique; |
143 | } | 142 | } |
144 | 143 | ||
145 | void IMAPaccount::read() | 144 | void IMAPaccount::read() |
146 | { | 145 | { |
147 | Config *conf = new Config( getFileName(), Config::File ); | 146 | Config *conf = new Config( getFileName(), Config::File ); |
@@ -201,25 +200,24 @@ POP3account::POP3account( QString filename ) | |||
201 | accountName = "New POP3 Account"; | 200 | accountName = "New POP3 Account"; |
202 | ssl = false; | 201 | ssl = false; |
203 | type = "POP3"; | 202 | type = "POP3"; |
204 | port = POP3_PORT; | 203 | port = POP3_PORT; |
205 | } | 204 | } |
206 | 205 | ||
207 | QString POP3account::getUniqueFileName() | 206 | QString POP3account::getUniqueFileName() |
208 | { | 207 | { |
209 | int num = 0; | 208 | int num = 0; |
210 | QString unique; | 209 | QString unique; |
211 | 210 | ||
212 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); | 211 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); |
213 | QStringList::Iterator it; | ||
214 | 212 | ||
215 | QStringList imap = dir.entryList( "pop3-*" ); | 213 | QStringList imap = dir.entryList( "pop3-*" ); |
216 | do { | 214 | do { |
217 | unique.setNum( num++ ); | 215 | unique.setNum( num++ ); |
218 | } while ( imap.contains( "pop3-" + unique ) > 0 ); | 216 | } while ( imap.contains( "pop3-" + unique ) > 0 ); |
219 | 217 | ||
220 | return unique; | 218 | return unique; |
221 | } | 219 | } |
222 | 220 | ||
223 | void POP3account::read() | 221 | void POP3account::read() |
224 | { | 222 | { |
225 | Config *conf = new Config( getFileName(), Config::File ); | 223 | Config *conf = new Config( getFileName(), Config::File ); |
@@ -279,25 +277,24 @@ SMTPaccount::SMTPaccount( QString filename ) | |||
279 | useBCC = false; | 277 | useBCC = false; |
280 | useReply = false; | 278 | useReply = false; |
281 | type = "SMTP"; | 279 | type = "SMTP"; |
282 | port = SMTP_PORT; | 280 | port = SMTP_PORT; |
283 | } | 281 | } |
284 | 282 | ||
285 | QString SMTPaccount::getUniqueFileName() | 283 | QString SMTPaccount::getUniqueFileName() |
286 | { | 284 | { |
287 | int num = 0; | 285 | int num = 0; |
288 | QString unique; | 286 | QString unique; |
289 | 287 | ||
290 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); | 288 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); |
291 | QStringList::Iterator it; | ||
292 | 289 | ||
293 | QStringList imap = dir.entryList( "smtp-*" ); | 290 | QStringList imap = dir.entryList( "smtp-*" ); |
294 | do { | 291 | do { |
295 | unique.setNum( num++ ); | 292 | unique.setNum( num++ ); |
296 | } while ( imap.contains( "smtp-" + unique ) > 0 ); | 293 | } while ( imap.contains( "smtp-" + unique ) > 0 ); |
297 | 294 | ||
298 | return unique; | 295 | return unique; |
299 | } | 296 | } |
300 | 297 | ||
301 | void SMTPaccount::read() | 298 | void SMTPaccount::read() |
302 | { | 299 | { |
303 | Config *conf = new Config( getFileName(), Config::File ); | 300 | Config *conf = new Config( getFileName(), Config::File ); |
@@ -375,25 +372,24 @@ NNTPaccount::NNTPaccount( QString filename ) | |||
375 | ssl = false; | 372 | ssl = false; |
376 | login = false; | 373 | login = false; |
377 | type = "NNTP"; | 374 | type = "NNTP"; |
378 | port = NNTP_PORT; | 375 | port = NNTP_PORT; |
379 | } | 376 | } |
380 | 377 | ||
381 | QString NNTPaccount::getUniqueFileName() | 378 | QString NNTPaccount::getUniqueFileName() |
382 | { | 379 | { |
383 | int num = 0; | 380 | int num = 0; |
384 | QString unique; | 381 | QString unique; |
385 | 382 | ||
386 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); | 383 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); |
387 | QStringList::Iterator it; | ||
388 | 384 | ||
389 | QStringList imap = dir.entryList( "nntp-*" ); | 385 | QStringList imap = dir.entryList( "nntp-*" ); |
390 | do { | 386 | do { |
391 | unique.setNum( num++ ); | 387 | unique.setNum( num++ ); |
392 | } while ( imap.contains( "nntp-" + unique ) > 0 ); | 388 | } while ( imap.contains( "nntp-" + unique ) > 0 ); |
393 | 389 | ||
394 | return unique; | 390 | return unique; |
395 | } | 391 | } |
396 | 392 | ||
397 | void NNTPaccount::read() | 393 | void NNTPaccount::read() |
398 | { | 394 | { |
399 | Config *conf = new Config( getFileName(), Config::File ); | 395 | Config *conf = new Config( getFileName(), Config::File ); |