author | alwin <alwin> | 2004-03-10 22:44:44 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-10 22:44:44 (UTC) |
commit | 9454ac48a53f3b49e03288311b71436ccacd2d04 (patch) (unidiff) | |
tree | e05d40f575c87431d84c5ac374ff8ce656e6a419 /noncore/net/mail/libmailwrapper | |
parent | a72855867dedd2b4c16f703fa104b5c6175ce484 (diff) | |
download | opie-9454ac48a53f3b49e03288311b71436ccacd2d04.zip opie-9454ac48a53f3b49e03288311b71436ccacd2d04.tar.gz opie-9454ac48a53f3b49e03288311b71436ccacd2d04.tar.bz2 |
some bugfixes
When edit a mail to send and cancel is pressed the mail can stored in a draft
folder and later edit again. This moment we will not store attachments into
drafts.
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 23 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 10 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/libmailwrapper.pro | 6 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/storemail.cpp | 90 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/storemail.h | 29 |
7 files changed, 161 insertions, 6 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 9960f88..d71d35c 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -22,24 +22,42 @@ AbstractMail* AbstractMail::getWrapper(POP3account *a) | |||
22 | } | 22 | } |
23 | 23 | ||
24 | AbstractMail* AbstractMail::getWrapper(NNTPaccount *a) | 24 | AbstractMail* AbstractMail::getWrapper(NNTPaccount *a) |
25 | { | 25 | { |
26 | return new NNTPwrapper(a); | 26 | return new NNTPwrapper(a); |
27 | } | 27 | } |
28 | 28 | ||
29 | AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name) | 29 | AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name) |
30 | { | 30 | { |
31 | return new MHwrapper(a,name); | 31 | return new MHwrapper(a,name); |
32 | } | 32 | } |
33 | 33 | ||
34 | AbstractMail* AbstractMail::getWrapper(Account*a) | ||
35 | { | ||
36 | if (!a) return 0; | ||
37 | switch (a->getType()) { | ||
38 | case MAILLIB::A_IMAP: | ||
39 | return new IMAPwrapper((IMAPaccount*)a); | ||
40 | break; | ||
41 | case MAILLIB::A_POP3: | ||
42 | return new POP3wrapper((POP3account*)a); | ||
43 | break; | ||
44 | case MAILLIB::A_NNTP: | ||
45 | return new NNTPwrapper((NNTPaccount*)a); | ||
46 | break; | ||
47 | default: | ||
48 | return 0; | ||
49 | } | ||
50 | } | ||
51 | |||
34 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) | 52 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) |
35 | { | 53 | { |
36 | qDebug("Decode string start"); | 54 | qDebug("Decode string start"); |
37 | char*result_text; | 55 | char*result_text; |
38 | size_t index = 0; | 56 | size_t index = 0; |
39 | /* reset for recursive use! */ | 57 | /* reset for recursive use! */ |
40 | size_t target_length = 0; | 58 | size_t target_length = 0; |
41 | result_text = 0; | 59 | result_text = 0; |
42 | int mimetype = MAILMIME_MECHANISM_7BIT; | 60 | int mimetype = MAILMIME_MECHANISM_7BIT; |
43 | if (enc.lower()=="quoted-printable") { | 61 | if (enc.lower()=="quoted-printable") { |
44 | mimetype = MAILMIME_MECHANISM_QUOTED_PRINTABLE; | 62 | mimetype = MAILMIME_MECHANISM_QUOTED_PRINTABLE; |
45 | } else if (enc.lower()=="base64") { | 63 | } else if (enc.lower()=="base64") { |
@@ -96,24 +114,29 @@ QString AbstractMail::gen_attachment_id() | |||
96 | int AbstractMail::createMbox(const QString&,const Folder*,const QString& delemiter,bool) | 114 | int AbstractMail::createMbox(const QString&,const Folder*,const QString& delemiter,bool) |
97 | { | 115 | { |
98 | return 0; | 116 | return 0; |
99 | } | 117 | } |
100 | 118 | ||
101 | QString AbstractMail::defaultLocalfolder() | 119 | QString AbstractMail::defaultLocalfolder() |
102 | { | 120 | { |
103 | QString f = getenv( "HOME" ); | 121 | QString f = getenv( "HOME" ); |
104 | f += "/Applications/opiemail/localmail"; | 122 | f += "/Applications/opiemail/localmail"; |
105 | return f; | 123 | return f; |
106 | } | 124 | } |
107 | 125 | ||
126 | QString AbstractMail::draftFolder() | ||
127 | { | ||
128 | return QString("Drafts"); | ||
129 | } | ||
130 | |||
108 | /* temporary - will be removed when implemented in all classes */ | 131 | /* temporary - will be removed when implemented in all classes */ |
109 | void AbstractMail::deleteMails(const QString &,QList<RecMail> &) | 132 | void AbstractMail::deleteMails(const QString &,QList<RecMail> &) |
110 | { | 133 | { |
111 | } | 134 | } |
112 | 135 | ||
113 | void AbstractMail::mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | 136 | void AbstractMail::mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) |
114 | { | 137 | { |
115 | QList<RecMail> t; | 138 | QList<RecMail> t; |
116 | listMessages(fromFolder->getName(),t); | 139 | listMessages(fromFolder->getName(),t); |
117 | encodedString*st = 0; | 140 | encodedString*st = 0; |
118 | while (t.count()>0) { | 141 | while (t.count()>0) { |
119 | RecMail*r = t.at(0); | 142 | RecMail*r = t.at(0); |
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index 442ebfe..d377452 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -31,38 +31,40 @@ public: | |||
31 | virtual encodedString* fetchRawBody(const RecMail&mail)=0; | 31 | virtual encodedString* fetchRawBody(const RecMail&mail)=0; |
32 | 32 | ||
33 | virtual void deleteMail(const RecMail&mail)=0; | 33 | virtual void deleteMail(const RecMail&mail)=0; |
34 | virtual void answeredMail(const RecMail&mail)=0; | 34 | virtual void answeredMail(const RecMail&mail)=0; |
35 | virtual int deleteAllMail(const Folder*)=0; | 35 | virtual int deleteAllMail(const Folder*)=0; |
36 | virtual void deleteMails(const QString & FolderName,QList<RecMail> &target); | 36 | virtual void deleteMails(const QString & FolderName,QList<RecMail> &target); |
37 | virtual int deleteMbox(const Folder*)=0; | 37 | virtual int deleteMbox(const Folder*)=0; |
38 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; | 38 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; |
39 | 39 | ||
40 | virtual void mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 40 | virtual void mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
41 | virtual void mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 41 | virtual void mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
42 | 42 | ||
43 | virtual void cleanMimeCache(){}; | 43 | virtual void cleanMimeCache(){}; |
44 | /* mail box methods */ | 44 | /* mail box methods */ |
45 | /* parameter is the box to create. | 45 | /* parameter is the box to create. |
46 | * if the implementing subclass has prefixes, | 46 | * if the implementing subclass has prefixes, |
47 | * them has to be appended automatic. | 47 | * them has to be appended automatic. |
48 | */ | 48 | */ |
49 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); | 49 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); |
50 | virtual void logout()=0; | 50 | virtual void logout()=0; |
51 | 51 | ||
52 | static AbstractMail* getWrapper(IMAPaccount *a); | 52 | static AbstractMail* getWrapper(IMAPaccount *a); |
53 | static AbstractMail* getWrapper(POP3account *a); | 53 | static AbstractMail* getWrapper(POP3account *a); |
54 | static AbstractMail* getWrapper(NNTPaccount *a); | 54 | static AbstractMail* getWrapper(NNTPaccount *a); |
55 | /* mbox only! */ | 55 | /* mbox only! */ |
56 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); | 56 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); |
57 | static AbstractMail* getWrapper(Account*a); | ||
57 | 58 | ||
58 | static QString defaultLocalfolder(); | 59 | static QString defaultLocalfolder(); |
59 | 60 | static QString draftFolder(); | |
61 | |||
60 | virtual MAILLIB::ATYPE getType()const=0; | 62 | virtual MAILLIB::ATYPE getType()const=0; |
61 | virtual const QString&getName()const=0; | 63 | virtual const QString&getName()const=0; |
62 | 64 | ||
63 | protected: | 65 | protected: |
64 | static encodedString*decode_String(const encodedString*text,const QString&enc); | 66 | static encodedString*decode_String(const encodedString*text,const QString&enc); |
65 | static QString convert_String(const char*text); | 67 | static QString convert_String(const char*text); |
66 | static QString gen_attachment_id(); | 68 | static QString gen_attachment_id(); |
67 | }; | 69 | }; |
68 | #endif | 70 | #endif |
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index 137a6ef..ffa049f 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp | |||
@@ -441,27 +441,35 @@ void Genericwrapper::parseList(QList<RecMail> &target,mailsession*session,const | |||
441 | if (single_fields.fld_cc) | 441 | if (single_fields.fld_cc) |
442 | mail->setCC( parseAddressList( single_fields.fld_cc->cc_addr_list ) ); | 442 | mail->setCC( parseAddressList( single_fields.fld_cc->cc_addr_list ) ); |
443 | if (single_fields.fld_bcc) | 443 | if (single_fields.fld_bcc) |
444 | mail->setBcc( parseAddressList( single_fields.fld_bcc->bcc_addr_list ) ); | 444 | mail->setBcc( parseAddressList( single_fields.fld_bcc->bcc_addr_list ) ); |
445 | if (single_fields.fld_orig_date) | 445 | if (single_fields.fld_orig_date) |
446 | mail->setDate( parseDateTime( single_fields.fld_orig_date->dt_date_time ) ); | 446 | mail->setDate( parseDateTime( single_fields.fld_orig_date->dt_date_time ) ); |
447 | // crashes when accessing pop3 account? | 447 | // crashes when accessing pop3 account? |
448 | if (single_fields.fld_message_id->mid_value) { | 448 | if (single_fields.fld_message_id->mid_value) { |
449 | mail->setMsgid(QString(single_fields.fld_message_id->mid_value)); | 449 | mail->setMsgid(QString(single_fields.fld_message_id->mid_value)); |
450 | qDebug("Msgid == %s",mail->Msgid().latin1()); | 450 | qDebug("Msgid == %s",mail->Msgid().latin1()); |
451 | } | 451 | } |
452 | 452 | ||
453 | if (single_fields.fld_reply_to) { | ||
454 | QStringList t = parseAddressList(single_fields.fld_reply_to->rt_addr_list); | ||
455 | if (t.count()>0) { | ||
456 | mail->setReplyto(t[0]); | ||
457 | } | ||
458 | } | ||
459 | #if 0 | ||
453 | refs = single_fields.fld_references; | 460 | refs = single_fields.fld_references; |
454 | if (refs && refs->mid_list && clist_count(refs->mid_list)) { | 461 | if (refs && refs->mid_list && clist_count(refs->mid_list)) { |
455 | char * text = (char*)refs->mid_list->first->data; | 462 | char * text = (char*)refs->mid_list->first->data; |
456 | mail->setReplyto(QString(text)); | 463 | mail->setReplyto(QString(text)); |
457 | } | 464 | } |
465 | #endif | ||
458 | if (single_fields.fld_in_reply_to && single_fields.fld_in_reply_to->mid_list && | 466 | if (single_fields.fld_in_reply_to && single_fields.fld_in_reply_to->mid_list && |
459 | clist_count(single_fields.fld_in_reply_to->mid_list)) { | 467 | clist_count(single_fields.fld_in_reply_to->mid_list)) { |
460 | mail->setInreply(parseInreplies(single_fields.fld_in_reply_to)); | 468 | mail->setInreply(parseInreplies(single_fields.fld_in_reply_to)); |
461 | } | 469 | } |
462 | target.append(mail); | 470 | target.append(mail); |
463 | } | 471 | } |
464 | if (env_list) { | 472 | if (env_list) { |
465 | mailmessage_list_free(env_list); | 473 | mailmessage_list_free(env_list); |
466 | } | 474 | } |
467 | } | 475 | } |
diff --git a/noncore/net/mail/libmailwrapper/libmailwrapper.pro b/noncore/net/mail/libmailwrapper/libmailwrapper.pro index cb1e573..d28079e 100644 --- a/noncore/net/mail/libmailwrapper/libmailwrapper.pro +++ b/noncore/net/mail/libmailwrapper/libmailwrapper.pro | |||
@@ -6,41 +6,43 @@ HEADERS = mailwrapper.h \ | |||
6 | mailtypes.h \ | 6 | mailtypes.h \ |
7 | pop3wrapper.h \ | 7 | pop3wrapper.h \ |
8 | abstractmail.h \ | 8 | abstractmail.h \ |
9 | smtpwrapper.h \ | 9 | smtpwrapper.h \ |
10 | genericwrapper.h \ | 10 | genericwrapper.h \ |
11 | mboxwrapper.h \ | 11 | mboxwrapper.h \ |
12 | settings.h \ | 12 | settings.h \ |
13 | logindialog.h \ | 13 | logindialog.h \ |
14 | sendmailprogress.h \ | 14 | sendmailprogress.h \ |
15 | statusmail.h \ | 15 | statusmail.h \ |
16 | mhwrapper.h \ | 16 | mhwrapper.h \ |
17 | nntpwrapper.h \ | 17 | nntpwrapper.h \ |
18 | generatemail.h | 18 | generatemail.h \ |
19 | storemail.h | ||
19 | 20 | ||
20 | SOURCES = imapwrapper.cpp \ | 21 | SOURCES = imapwrapper.cpp \ |
21 | mailwrapper.cpp \ | 22 | mailwrapper.cpp \ |
22 | mailtypes.cpp \ | 23 | mailtypes.cpp \ |
23 | pop3wrapper.cpp \ | 24 | pop3wrapper.cpp \ |
24 | abstractmail.cpp \ | 25 | abstractmail.cpp \ |
25 | smtpwrapper.cpp \ | 26 | smtpwrapper.cpp \ |
26 | genericwrapper.cpp \ | 27 | genericwrapper.cpp \ |
27 | mboxwrapper.cpp \ | 28 | mboxwrapper.cpp \ |
28 | settings.cpp \ | 29 | settings.cpp \ |
29 | logindialog.cpp \ | 30 | logindialog.cpp \ |
30 | sendmailprogress.cpp \ | 31 | sendmailprogress.cpp \ |
31 | statusmail.cpp \ | 32 | statusmail.cpp \ |
32 | mhwrapper.cpp \ | 33 | mhwrapper.cpp \ |
33 | nntpwrapper.cpp \ | 34 | nntpwrapper.cpp \ |
34 | generatemail.cpp | 35 | generatemail.cpp \ |
36 | storemail.cpp | ||
35 | 37 | ||
36 | INTERFACES = logindialogui.ui \ | 38 | INTERFACES = logindialogui.ui \ |
37 | sendmailprogressui.ui | 39 | sendmailprogressui.ui |
38 | 40 | ||
39 | 41 | ||
40 | INCLUDEPATH += $(OPIEDIR)/include | 42 | INCLUDEPATH += $(OPIEDIR)/include |
41 | 43 | ||
42 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) | 44 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) |
43 | contains( CONFTEST, y ){ | 45 | contains( CONFTEST, y ){ |
44 | LIBS += -lqpe -letpan -lssl -lcrypto -liconv | 46 | LIBS += -lqpe -letpan -lssl -lcrypto -liconv |
45 | }else{ | 47 | }else{ |
46 | LIBS += -lqpe -letpan -lssl -lcrypto | 48 | LIBS += -lqpe -letpan -lssl -lcrypto |
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index e4646d9..49b3caa 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp | |||
@@ -27,24 +27,25 @@ void RecMail::copy_old(const RecMail&old) | |||
27 | mbox = old.mbox; | 27 | mbox = old.mbox; |
28 | msg_id = old.msg_id; | 28 | msg_id = old.msg_id; |
29 | msg_size = old.msg_size; | 29 | msg_size = old.msg_size; |
30 | msg_number = old.msg_number; | 30 | msg_number = old.msg_number; |
31 | from = old.from; | 31 | from = old.from; |
32 | msg_flags = old.msg_flags; | 32 | msg_flags = old.msg_flags; |
33 | to = old.to; | 33 | to = old.to; |
34 | cc = old.cc; | 34 | cc = old.cc; |
35 | bcc = old.bcc; | 35 | bcc = old.bcc; |
36 | wrapper = old.wrapper; | 36 | wrapper = old.wrapper; |
37 | in_reply_to = old.in_reply_to; | 37 | in_reply_to = old.in_reply_to; |
38 | references = old.references; | 38 | references = old.references; |
39 | replyto = old.replyto; | ||
39 | } | 40 | } |
40 | 41 | ||
41 | void RecMail::init() | 42 | void RecMail::init() |
42 | { | 43 | { |
43 | to.clear(); | 44 | to.clear(); |
44 | cc.clear(); | 45 | cc.clear(); |
45 | bcc.clear(); | 46 | bcc.clear(); |
46 | in_reply_to.clear(); | 47 | in_reply_to.clear(); |
47 | references.clear(); | 48 | references.clear(); |
48 | wrapper = 0; | 49 | wrapper = 0; |
49 | } | 50 | } |
50 | 51 | ||
diff --git a/noncore/net/mail/libmailwrapper/storemail.cpp b/noncore/net/mail/libmailwrapper/storemail.cpp new file mode 100644 index 0000000..53101f8 --- a/dev/null +++ b/noncore/net/mail/libmailwrapper/storemail.cpp | |||
@@ -0,0 +1,90 @@ | |||
1 | #include "storemail.h" | ||
2 | #include "mailwrapper.h" | ||
3 | #include "settings.h" | ||
4 | #include "abstractmail.h" | ||
5 | |||
6 | #include <libetpan/libetpan.h> | ||
7 | |||
8 | #include <qstring.h> | ||
9 | |||
10 | #include <stdlib.h> | ||
11 | |||
12 | Storemail::Storemail(Account*aAccount,const QString&aFolder) | ||
13 | : Generatemail() | ||
14 | { | ||
15 | wrapper = 0; | ||
16 | m_Account = aAccount; | ||
17 | m_tfolder = aFolder; | ||
18 | wrapper = AbstractMail::getWrapper(m_Account); | ||
19 | if (wrapper) { | ||
20 | wrapper->createMbox(m_tfolder); | ||
21 | } | ||
22 | } | ||
23 | |||
24 | Storemail::Storemail(const QString&dir,const QString&aFolder) | ||
25 | : Generatemail() | ||
26 | { | ||
27 | wrapper = 0; | ||
28 | m_Account = 0; | ||
29 | m_tfolder = aFolder; | ||
30 | wrapper = AbstractMail::getWrapper(dir); | ||
31 | if (wrapper) { | ||
32 | wrapper->createMbox(m_tfolder); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | Storemail::Storemail(const QString&aFolder) | ||
37 | : Generatemail() | ||
38 | { | ||
39 | wrapper = 0; | ||
40 | m_Account = 0; | ||
41 | m_tfolder = aFolder; | ||
42 | wrapper = AbstractMail::getWrapper(AbstractMail::defaultLocalfolder()); | ||
43 | if (wrapper) { | ||
44 | wrapper->createMbox(m_tfolder); | ||
45 | } | ||
46 | } | ||
47 | |||
48 | Storemail::~Storemail() | ||
49 | { | ||
50 | } | ||
51 | |||
52 | int Storemail::storeMail(const Mail&mail) | ||
53 | { | ||
54 | if (!wrapper) return 0; | ||
55 | int ret = 1; | ||
56 | |||
57 | mailmime * mimeMail = 0; | ||
58 | mimeMail = createMimeMail(mail ); | ||
59 | if ( mimeMail == NULL ) { | ||
60 | qDebug( "storeMail: error creating mime mail" ); | ||
61 | return 0; | ||
62 | } | ||
63 | char *data; | ||
64 | size_t size; | ||
65 | data = 0; | ||
66 | |||
67 | mailmessage * msg = 0; | ||
68 | msg = mime_message_init(mimeMail); | ||
69 | mime_message_set_tmpdir(msg,getenv( "HOME" )); | ||
70 | int r = mailmessage_fetch(msg,&data,&size); | ||
71 | mime_message_detach_mime(msg); | ||
72 | mailmessage_free(msg); | ||
73 | msg = 0; | ||
74 | if (r != MAIL_NO_ERROR || !data) { | ||
75 | qDebug("Error fetching mime..."); | ||
76 | ret = 0; | ||
77 | } | ||
78 | |||
79 | if (ret) { | ||
80 | wrapper->storeMessage(data,size,m_tfolder); | ||
81 | } | ||
82 | |||
83 | if (data) { | ||
84 | free(data); | ||
85 | } | ||
86 | if (mimeMail) { | ||
87 | mailmime_free( mimeMail ); | ||
88 | } | ||
89 | return ret; | ||
90 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/storemail.h b/noncore/net/mail/libmailwrapper/storemail.h new file mode 100644 index 0000000..872c981 --- a/dev/null +++ b/noncore/net/mail/libmailwrapper/storemail.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef __STORE_MAIL_H | ||
2 | #define __STORE_MAIL_H | ||
3 | |||
4 | #include <qpe/applnk.h> | ||
5 | |||
6 | #include "generatemail.h" | ||
7 | |||
8 | class Account; | ||
9 | class Mail; | ||
10 | class AbstractMail; | ||
11 | |||
12 | class Storemail : public Generatemail | ||
13 | { | ||
14 | Q_OBJECT | ||
15 | public: | ||
16 | Storemail(Account*aAccount,const QString&aFolder); | ||
17 | Storemail(const QString&dir,const QString&aFolder); | ||
18 | Storemail(const QString&aFolder); | ||
19 | virtual ~Storemail(); | ||
20 | |||
21 | int storeMail(const Mail&mail); | ||
22 | |||
23 | protected: | ||
24 | Account* m_Account; | ||
25 | QString m_tfolder; | ||
26 | AbstractMail*wrapper; | ||
27 | }; | ||
28 | |||
29 | #endif | ||