summaryrefslogtreecommitdiff
path: root/noncore/net
authoralwin <alwin>2004-03-12 11:22:24 (UTC)
committer alwin <alwin>2004-03-12 11:22:24 (UTC)
commita1ddbd219fcee196172f3fd684afac467e5f2469 (patch) (unidiff)
tree7f9206c519ceeff108a24e526bcad978977fa7a4 /noncore/net
parentc71234bda29bd83de34ce04c766f2be641ed86be (diff)
downloadopie-a1ddbd219fcee196172f3fd684afac467e5f2469.zip
opie-a1ddbd219fcee196172f3fd684afac467e5f2469.tar.gz
opie-a1ddbd219fcee196172f3fd684afac467e5f2469.tar.bz2
start usage of smart-pointers
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/generatemail.cpp30
-rw-r--r--noncore/net/mail/libmailwrapper/generatemail.h6
-rw-r--r--noncore/net/mail/libmailwrapper/mailwrapper.cpp4
-rw-r--r--noncore/net/mail/libmailwrapper/mailwrapper.h4
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.cpp2
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.h4
-rw-r--r--noncore/net/mail/libmailwrapper/storemail.cpp2
-rw-r--r--noncore/net/mail/libmailwrapper/storemail.h2
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
@@ -7,3 +7,3 @@
7 7
8const char* Generatemail::USER_AGENT="OpieMail v0.5"; 8const char* Generatemail::USER_AGENT="OpieMail v0.6";
9 9
@@ -281,3 +281,3 @@ mailimf_mailbox *Generatemail::newMailbox(const QString&name, const QString&mail
281 281
282mailimf_fields *Generatemail::createImfFields(const Mail&mail ) 282mailimf_fields *Generatemail::createImfFields(const Opie::osmart_pointer<Mail>&mail )
283{ 283{
@@ -289,3 +289,3 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail )
289 clist*in_reply_to = 0; 289 clist*in_reply_to = 0;
290 char *subject = strdup( mail.getSubject().latin1() ); 290 char *subject = strdup( mail->getSubject().latin1() );
291 int err; 291 int err;
@@ -293,3 +293,3 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail )
293 293
294 sender = newMailbox( mail.getName(), mail.getMail() ); 294 sender = newMailbox( mail->getName(), mail->getMail() );
295 if ( sender == NULL ) { 295 if ( sender == NULL ) {
@@ -299,3 +299,3 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail )
299 if (res) { 299 if (res) {
300 fromBox = newMailbox( mail.getName(), mail.getMail() ); 300 fromBox = newMailbox( mail->getName(), mail->getMail() );
301 } 301 }
@@ -319,8 +319,8 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail )
319 319
320 if (res) to = parseAddresses( mail.getTo() ); 320 if (res) to = parseAddresses( mail->getTo() );
321 if (res) cc = parseAddresses( mail.getCC() ); 321 if (res) cc = parseAddresses( mail->getCC() );
322 if (res) bcc = parseAddresses( mail.getBCC() ); 322 if (res) bcc = parseAddresses( mail->getBCC() );
323 if (res) reply = parseAddresses( mail.getReply() ); 323 if (res) reply = parseAddresses( mail->getReply() );
324 324
325 if (res && mail.Inreply().count()>0) { 325 if (res && mail->Inreply().count()>0) {
326 in_reply_to = clist_new(); 326 in_reply_to = clist_new();
@@ -328,4 +328,4 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail )
328 unsigned int nsize = 0; 328 unsigned int nsize = 0;
329 for (QStringList::ConstIterator it=mail.Inreply().begin(); 329 for (QStringList::ConstIterator it=mail->Inreply().begin();
330 it != mail.Inreply().end();++it) { 330 it != mail->Inreply().end();++it) {
331 if ((*it).isEmpty()) 331 if ((*it).isEmpty())
@@ -401,3 +401,3 @@ mailimf_fields *Generatemail::createImfFields(const Mail&mail )
401 401
402mailmime *Generatemail::createMimeMail(const Mail &mail ) { 402mailmime *Generatemail::createMimeMail(const Opie::osmart_pointer<Mail> &mail ) {
403 mailmime *message, *txtPart; 403 mailmime *message, *txtPart;
@@ -416,3 +416,3 @@ mailmime *Generatemail::createMimeMail(const Mail &mail ) {
416 416
417 txtPart = buildTxtPart( mail.getMessage() ); 417 txtPart = buildTxtPart( mail->getMessage() );
418 418
@@ -425,3 +425,3 @@ mailmime *Generatemail::createMimeMail(const Mail &mail ) {
425 425
426 addFileParts( message, mail.getAttachments() ); 426 addFileParts( message, mail->getAttachments() );
427 427
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
@@ -8,2 +8,4 @@
8 8
9#include <opie2/osmart_pointer.h>
10
9class Mail; 11class Mail;
@@ -36,4 +38,4 @@ protected:
36 mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); 38 mailimf_mailbox *newMailbox(const QString&name,const QString&mail );
37 mailimf_fields *createImfFields(const Mail &mail ); 39 mailimf_fields *createImfFields(const Opie::osmart_pointer<Mail> &mail );
38 mailmime *createMimeMail(const Mail&mail ); 40 mailmime *createMimeMail(const Opie::osmart_pointer<Mail>&mail );
39 clist *createRcptList( mailimf_fields *fields ); 41 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
@@ -47,3 +47,5 @@ IMAPFolder::IMAPFolder(const QString&name,const QString&sep, bool select,bool no
47 nameDisplay = IMAPFolder::decodeFolderName( name ); 47 nameDisplay = IMAPFolder::decodeFolderName( name );
48 /*
48 qDebug( "folder " + name + " - displayed as " + nameDisplay ); 49 qDebug( "folder " + name + " - displayed as " + nameDisplay );
50 */
49 prefix = aprefix; 51 prefix = aprefix;
@@ -147,3 +149,3 @@ QString IMAPFolder::decodeFolderName( const QString &name )
147Mail::Mail() 149Mail::Mail()
148 :name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") 150 :Opie::oref_count(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("")
149{ 151{
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
@@ -10,2 +10,4 @@
10 10
11#include <opie2/osmart_pointer.h>
12
11class Attachment 13class Attachment
@@ -28,3 +30,3 @@ protected:
28 30
29class Mail 31class Mail:public Opie::oref_count
30{ 32{
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
@@ -314,3 +314,3 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
314 314
315void SMTPwrapper::sendMail(const Mail&mail,bool later ) 315void SMTPwrapper::sendMail(const Opie::osmart_pointer<Mail>&mail,bool later )
316{ 316{
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
@@ -13,2 +13,4 @@
13 13
14#include <opie2/osmart_pointer.h>
15
14class SMTPaccount; 16class SMTPaccount;
@@ -23,3 +25,3 @@ public:
23 virtual ~SMTPwrapper(); 25 virtual ~SMTPwrapper();
24 void sendMail(const Mail& mail,bool later=false ); 26 void sendMail(const Opie::osmart_pointer<Mail>& mail,bool later=false );
25 bool flushOutbox(); 27 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
@@ -51,3 +51,3 @@ Storemail::~Storemail()
51 51
52int Storemail::storeMail(const Mail&mail) 52int Storemail::storeMail(const Opie::osmart_pointer<Mail>&mail)
53{ 53{
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
@@ -20,3 +20,3 @@ public:
20 20
21 int storeMail(const Mail&mail); 21 int storeMail(const Opie::osmart_pointer<Mail>&mail);
22 22