-rw-r--r-- | noncore/net/mail/libmailwrapper/generatemail.cpp | 30 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/generatemail.h | 6 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailwrapper.cpp | 4 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailwrapper.h | 4 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.h | 4 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/storemail.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/storemail.h | 2 |
8 files changed, 31 insertions, 23 deletions
diff --git a/noncore/net/mail/libmailwrapper/generatemail.cpp b/noncore/net/mail/libmailwrapper/generatemail.cpp index 48fa02e..4f7ec0c 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.cpp +++ b/noncore/net/mail/libmailwrapper/generatemail.cpp @@ -6,5 +6,5 @@ #include <qt.h> -const char* Generatemail::USER_AGENT="OpieMail v0.5"; +const char* Generatemail::USER_AGENT="OpieMail v0.6"; Generatemail::Generatemail() @@ -280,5 +280,5 @@ mailimf_mailbox *Generatemail::newMailbox(const QString&name, const QString&mail } -mailimf_fields *Generatemail::createImfFields(const Mail&mail ) +mailimf_fields *Generatemail::createImfFields(const Opie::osmart_pointer<Mail>&mail ) { mailimf_fields *fields = NULL; @@ -288,9 +288,9 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail ) mailimf_address_list *to=0, *cc=0, *bcc=0, *reply=0; clist*in_reply_to = 0; - char *subject = strdup( mail.getSubject().latin1() ); + char *subject = strdup( mail->getSubject().latin1() ); int err; int res = 1; - sender = newMailbox( mail.getName(), mail.getMail() ); + sender = newMailbox( mail->getName(), mail->getMail() ); if ( sender == NULL ) { res = 0; @@ -298,5 +298,5 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail ) if (res) { - fromBox = newMailbox( mail.getName(), mail.getMail() ); + fromBox = newMailbox( mail->getName(), mail->getMail() ); } if ( fromBox == NULL ) { @@ -318,15 +318,15 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail ) } - if (res) to = parseAddresses( mail.getTo() ); - if (res) cc = parseAddresses( mail.getCC() ); - if (res) bcc = parseAddresses( mail.getBCC() ); - if (res) reply = parseAddresses( mail.getReply() ); + if (res) to = parseAddresses( mail->getTo() ); + if (res) cc = parseAddresses( mail->getCC() ); + if (res) bcc = parseAddresses( mail->getBCC() ); + if (res) reply = parseAddresses( mail->getReply() ); - if (res && mail.Inreply().count()>0) { + if (res && mail->Inreply().count()>0) { in_reply_to = clist_new(); char*c_reply; unsigned int nsize = 0; - for (QStringList::ConstIterator it=mail.Inreply().begin(); - it != mail.Inreply().end();++it) { + for (QStringList::ConstIterator it=mail->Inreply().begin(); + it != mail->Inreply().end();++it) { if ((*it).isEmpty()) continue; @@ -400,5 +400,5 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail ) } -mailmime *Generatemail::createMimeMail(const Mail &mail ) { +mailmime *Generatemail::createMimeMail(const Opie::osmart_pointer<Mail> &mail ) { mailmime *message, *txtPart; mailimf_fields *fields; @@ -415,5 +415,5 @@ mailmime *Generatemail::createMimeMail(const Mail &mail ) { mailmime_set_imf_fields( message, fields ); - txtPart = buildTxtPart( mail.getMessage() ); + txtPart = buildTxtPart( mail->getMessage() ); if ( txtPart == NULL ) @@ -424,5 +424,5 @@ mailmime *Generatemail::createMimeMail(const Mail &mail ) { goto err_free_txtPart; - addFileParts( message, mail.getAttachments() ); + addFileParts( message, mail->getAttachments() ); return message; // Success :) diff --git a/noncore/net/mail/libmailwrapper/generatemail.h b/noncore/net/mail/libmailwrapper/generatemail.h index 8be5a2b..409a55e 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.h +++ b/noncore/net/mail/libmailwrapper/generatemail.h @@ -7,4 +7,6 @@ #include <libetpan/clist.h> +#include <opie2/osmart_pointer.h> + class Mail; class RecMail; @@ -35,6 +37,6 @@ protected: mailmime *buildTxtPart(const QString&str ); mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); - mailimf_fields *createImfFields(const Mail &mail ); - mailmime *createMimeMail(const Mail&mail ); + mailimf_fields *createImfFields(const Opie::osmart_pointer<Mail> &mail ); + mailmime *createMimeMail(const Opie::osmart_pointer<Mail>&mail ); clist *createRcptList( mailimf_fields *fields ); diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.cpp b/noncore/net/mail/libmailwrapper/mailwrapper.cpp index ebdbf4b..6bd98f6 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mailwrapper.cpp @@ -46,5 +46,7 @@ IMAPFolder::IMAPFolder(const QString&name,const QString&sep, bool select,bool no // Decode IMAP foldername nameDisplay = IMAPFolder::decodeFolderName( name ); + /* qDebug( "folder " + name + " - displayed as " + nameDisplay ); + */ prefix = aprefix; @@ -146,5 +148,5 @@ QString IMAPFolder::decodeFolderName( const QString &name ) Mail::Mail() - :name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") + :Opie::oref_count(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") { } diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.h b/noncore/net/mail/libmailwrapper/mailwrapper.h index 3a9f97b..c66572c 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.h +++ b/noncore/net/mail/libmailwrapper/mailwrapper.h @@ -9,4 +9,6 @@ #include "settings.h" +#include <opie2/osmart_pointer.h> + class Attachment { @@ -27,5 +29,5 @@ protected: }; -class Mail +class Mail:public Opie::oref_count { public: diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index a4e0beb..afc5618 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp @@ -313,5 +313,5 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) } -void SMTPwrapper::sendMail(const Mail&mail,bool later ) +void SMTPwrapper::sendMail(const Opie::osmart_pointer<Mail>&mail,bool later ) { mailmime * mimeMail; diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index 1796df7..08bde74 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h @@ -12,4 +12,6 @@ #include "generatemail.h" +#include <opie2/osmart_pointer.h> + class SMTPaccount; class AbstractMail; @@ -22,5 +24,5 @@ public: SMTPwrapper(SMTPaccount * aSmtp); virtual ~SMTPwrapper(); - void sendMail(const Mail& mail,bool later=false ); + void sendMail(const Opie::osmart_pointer<Mail>& mail,bool later=false ); bool flushOutbox(); diff --git a/noncore/net/mail/libmailwrapper/storemail.cpp b/noncore/net/mail/libmailwrapper/storemail.cpp index 53101f8..052e0f1 100644 --- a/noncore/net/mail/libmailwrapper/storemail.cpp +++ b/noncore/net/mail/libmailwrapper/storemail.cpp @@ -50,5 +50,5 @@ Storemail::~Storemail() } -int Storemail::storeMail(const Mail&mail) +int Storemail::storeMail(const Opie::osmart_pointer<Mail>&mail) { if (!wrapper) return 0; diff --git a/noncore/net/mail/libmailwrapper/storemail.h b/noncore/net/mail/libmailwrapper/storemail.h index 872c981..7d8ea3d 100644 --- a/noncore/net/mail/libmailwrapper/storemail.h +++ b/noncore/net/mail/libmailwrapper/storemail.h @@ -19,5 +19,5 @@ public: virtual ~Storemail(); - int storeMail(const Mail&mail); + int storeMail(const Opie::osmart_pointer<Mail>&mail); protected: |