Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mhwrapper.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index dfc00d8..df7f773 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp | |||
@@ -301,52 +301,52 @@ int MHwrapper::deleteAllMail(const Folder*tfolder) | |||
301 | } | 301 | } |
302 | 302 | ||
303 | int MHwrapper::deleteMbox(const Folder*tfolder) | 303 | int MHwrapper::deleteMbox(const Folder*tfolder) |
304 | { | 304 | { |
305 | init_storage(); | 305 | init_storage(); |
306 | if (!m_storage) { | 306 | if (!m_storage) { |
307 | return 0; | 307 | return 0; |
308 | } | 308 | } |
309 | if (!tfolder) return 0; | 309 | if (!tfolder) return 0; |
310 | if (tfolder->getName()=="/" || tfolder->getName().isEmpty()) return 0; | 310 | if (tfolder->getName()=="/" || tfolder->getName().isEmpty()) return 0; |
311 | 311 | ||
312 | int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); | 312 | int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); |
313 | 313 | ||
314 | if (r != MAIL_NO_ERROR) { | 314 | if (r != MAIL_NO_ERROR) { |
315 | qDebug("error deleting mail box"); | 315 | qDebug("error deleting mail box"); |
316 | return 0; | 316 | return 0; |
317 | } | 317 | } |
318 | QString cmd = "rm -rf "+tfolder->getName(); | 318 | QString cmd = "rm -rf "+tfolder->getName(); |
319 | QStringList command; | 319 | QStringList command; |
320 | command << "/bin/sh"; | 320 | command << "/bin/sh"; |
321 | command << "-c"; | 321 | command << "-c"; |
322 | command << cmd.latin1(); | 322 | command << cmd.latin1(); |
323 | OProcess *process = new OProcess(); | 323 | OProcess *process = new OProcess(); |
324 | 324 | ||
325 | connect(process, SIGNAL(processExited(OProcess *)), | 325 | connect(process, SIGNAL(processExited(OProcess*)), |
326 | this, SLOT( processEnded(OProcess *))); | 326 | this, SLOT( processEnded(OProcess*))); |
327 | connect(process, SIGNAL( receivedStderr(OProcess *, char *, int)), | 327 | connect(process, SIGNAL( receivedStderr(OProcess*,char*,int)), |
328 | this, SLOT( oprocessStderr(OProcess *, char *, int))); | 328 | this, SLOT( oprocessStderr(OProcess*,char*,int))); |
329 | 329 | ||
330 | *process << command; | 330 | *process << command; |
331 | removeMboxfailed = false; | 331 | removeMboxfailed = false; |
332 | if(!process->start(OProcess::Block, OProcess::All) ) { | 332 | if(!process->start(OProcess::Block, OProcess::All) ) { |
333 | qDebug("could not start process"); | 333 | qDebug("could not start process"); |
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | qDebug("mail box deleted"); | 336 | qDebug("mail box deleted"); |
337 | return 1; | 337 | return 1; |
338 | } | 338 | } |
339 | 339 | ||
340 | void MHwrapper::processEnded(OProcess *p) | 340 | void MHwrapper::processEnded(OProcess *p) |
341 | { | 341 | { |
342 | if (p) delete p; | 342 | if (p) delete p; |
343 | } | 343 | } |
344 | 344 | ||
345 | void MHwrapper::oprocessStderr(OProcess*, char *buffer, int ) | 345 | void MHwrapper::oprocessStderr(OProcess*, char *buffer, int ) |
346 | { | 346 | { |
347 | QString lineStr = buffer; | 347 | QString lineStr = buffer; |
348 | QMessageBox::warning( 0, tr("Error"), lineStr ,tr("Ok") ); | 348 | QMessageBox::warning( 0, tr("Error"), lineStr ,tr("Ok") ); |
349 | removeMboxfailed = true; | 349 | removeMboxfailed = true; |
350 | } | 350 | } |
351 | 351 | ||
352 | void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) | 352 | void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) |
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index a3c68ae..d75d52a 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -11,49 +11,49 @@ | |||
11 | #include <qpe/config.h> | 11 | #include <qpe/config.h> |
12 | #include <qpe/qcopenvelope_qws.h> | 12 | #include <qpe/qcopenvelope_qws.h> |
13 | 13 | ||
14 | #include <libetpan/libetpan.h> | 14 | #include <libetpan/libetpan.h> |
15 | 15 | ||
16 | #include "smtpwrapper.h" | 16 | #include "smtpwrapper.h" |
17 | #include "mailwrapper.h" | 17 | #include "mailwrapper.h" |
18 | #include "abstractmail.h" | 18 | #include "abstractmail.h" |
19 | #include "logindialog.h" | 19 | #include "logindialog.h" |
20 | #include "mailtypes.h" | 20 | #include "mailtypes.h" |
21 | #include "sendmailprogress.h" | 21 | #include "sendmailprogress.h" |
22 | 22 | ||
23 | const char* SMTPwrapper::USER_AGENT="OpieMail v0.4"; | 23 | const char* SMTPwrapper::USER_AGENT="OpieMail v0.4"; |
24 | 24 | ||
25 | progressMailSend*SMTPwrapper::sendProgress = 0; | 25 | progressMailSend*SMTPwrapper::sendProgress = 0; |
26 | 26 | ||
27 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | 27 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) |
28 | : QObject() | 28 | : QObject() |
29 | { | 29 | { |
30 | m_SmtpAccount = aSmtp; | 30 | m_SmtpAccount = aSmtp; |
31 | Config cfg( "mail" ); | 31 | Config cfg( "mail" ); |
32 | cfg.setGroup( "Status" ); | 32 | cfg.setGroup( "Status" ); |
33 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); | 33 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); |
34 | emit queuedMails( m_queuedMail ); | 34 | emit queuedMails( m_queuedMail ); |
35 | connect( this, SIGNAL( queuedMails( int ) ), this, SLOT( emitQCop( int ) ) ); | 35 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); |
36 | m_smtp = 0; | 36 | m_smtp = 0; |
37 | } | 37 | } |
38 | 38 | ||
39 | SMTPwrapper::~SMTPwrapper() | 39 | SMTPwrapper::~SMTPwrapper() |
40 | { | 40 | { |
41 | disc_server(); | 41 | disc_server(); |
42 | } | 42 | } |
43 | 43 | ||
44 | void SMTPwrapper::emitQCop( int queued ) { | 44 | void SMTPwrapper::emitQCop( int queued ) { |
45 | QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); | 45 | QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); |
46 | env << queued; | 46 | env << queued; |
47 | } | 47 | } |
48 | 48 | ||
49 | QString SMTPwrapper::mailsmtpError( int errnum ) { | 49 | QString SMTPwrapper::mailsmtpError( int errnum ) { |
50 | switch ( errnum ) { | 50 | switch ( errnum ) { |
51 | case MAILSMTP_NO_ERROR: | 51 | case MAILSMTP_NO_ERROR: |
52 | return tr( "No error" ); | 52 | return tr( "No error" ); |
53 | case MAILSMTP_ERROR_UNEXPECTED_CODE: | 53 | case MAILSMTP_ERROR_UNEXPECTED_CODE: |
54 | return tr( "Unexpected error code" ); | 54 | return tr( "Unexpected error code" ); |
55 | case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: | 55 | case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: |
56 | return tr( "Service not available" ); | 56 | return tr( "Service not available" ); |
57 | case MAILSMTP_ERROR_STREAM: | 57 | case MAILSMTP_ERROR_STREAM: |
58 | return tr( "Stream error" ); | 58 | return tr( "Stream error" ); |
59 | case MAILSMTP_ERROR_HOSTNAME: | 59 | case MAILSMTP_ERROR_HOSTNAME: |