Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index 41e9a8c..c0dcc11 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h | |||
@@ -1,55 +1,63 @@ | |||
1 | #ifndef SMTPwrapper_H | 1 | #ifndef SMTPwrapper_H |
2 | #define SMTPwrapper_H | 2 | #define SMTPwrapper_H |
3 | 3 | ||
4 | #include <qpe/applnk.h> | 4 | #include <qpe/applnk.h> |
5 | 5 | ||
6 | #include <qbitarray.h> | 6 | #include <qbitarray.h> |
7 | #include <qdatetime.h> | 7 | #include <qdatetime.h> |
8 | #include <libetpan/clist.h> | 8 | #include <libetpan/clist.h> |
9 | 9 | ||
10 | #include "settings.h" | 10 | #include "settings.h" |
11 | 11 | ||
12 | class Mail; | 12 | class Mail; |
13 | class MBOXwrapper; | ||
14 | class RecMail; | ||
13 | class Attachment; | 15 | class Attachment; |
14 | struct mailimf_fields; | 16 | struct mailimf_fields; |
15 | struct mailimf_field; | 17 | struct mailimf_field; |
16 | struct mailimf_mailbox; | 18 | struct mailimf_mailbox; |
17 | struct mailmime; | 19 | struct mailmime; |
18 | struct mailimf_address_list; | 20 | struct mailimf_address_list; |
19 | 21 | ||
20 | class SMTPwrapper : public QObject | 22 | class SMTPwrapper : public QObject |
21 | { | 23 | { |
22 | Q_OBJECT | 24 | Q_OBJECT |
23 | 25 | ||
24 | public: | 26 | public: |
25 | SMTPwrapper( Settings *s ); | 27 | SMTPwrapper( Settings *s ); |
26 | virtual ~SMTPwrapper(){} | 28 | virtual ~SMTPwrapper(){} |
27 | void sendMail(const Mail& mail,bool later=false ); | 29 | void sendMail(const Mail& mail,bool later=false ); |
30 | void flushOutbox(SMTPaccount*smtp); | ||
28 | 31 | ||
29 | protected: | 32 | protected: |
30 | mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); | 33 | mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); |
31 | mailimf_fields *createImfFields(const Mail &mail ); | 34 | mailimf_fields *createImfFields(const Mail &mail ); |
32 | mailmime *createMimeMail(const Mail&mail ); | 35 | mailmime *createMimeMail(const Mail&mail ); |
33 | 36 | ||
34 | mailimf_address_list *parseAddresses(const QString&addr ); | 37 | mailimf_address_list *parseAddresses(const QString&addr ); |
35 | void addFileParts( mailmime *message,const QList<Attachment>&files ); | 38 | void addFileParts( mailmime *message,const QList<Attachment>&files ); |
36 | mailmime *buildTxtPart(const QString&str ); | 39 | mailmime *buildTxtPart(const QString&str ); |
37 | mailmime *buildFilePart(const QString&filename,const QString&mimetype ); | 40 | mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); |
38 | void smtpSend( mailmime *mail,bool later ); | 41 | void smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ); |
39 | mailimf_field *getField( mailimf_fields *fields, int type ); | ||
40 | clist *createRcptList( mailimf_fields *fields ); | 42 | clist *createRcptList( mailimf_fields *fields ); |
41 | char *getFrom( mailmime *mail ); | ||
42 | SMTPaccount *getAccount(const QString&from ); | 43 | SMTPaccount *getAccount(const QString&from ); |
43 | void writeToFile(const QString&file, mailmime *mail ); | 44 | void writeToFile(const QString&file, mailmime *mail ); |
44 | void readFromFile(const QString&file, char **data, size_t *size ); | 45 | void readFromFile(const QString&file, char **data, size_t *size ); |
45 | void storeMail(char*mail, size_t length, const QString&box); | ||
46 | 46 | ||
47 | static void storeMail(char*mail, size_t length, const QString&box); | ||
47 | static QString mailsmtpError( int err ); | 48 | static QString mailsmtpError( int err ); |
48 | static QString getTmpFile(); | 49 | static QString getTmpFile(); |
49 | static void progress( size_t current, size_t maximum ); | 50 | static void progress( size_t current, size_t maximum ); |
50 | static void addRcpts( clist *list, mailimf_address_list *addr_list ); | 51 | static void addRcpts( clist *list, mailimf_address_list *addr_list ); |
52 | static char *getFrom( mailmime *mail ); | ||
53 | static char *getFrom( mailimf_field *ffrom); | ||
54 | static mailimf_field *getField( mailimf_fields *fields, int type ); | ||
55 | static int smtpSend(char*from,clist*rcpts,char*data,size_t size, SMTPaccount *smtp ); | ||
56 | |||
51 | void storeMail(mailmime*mail, const QString&box); | 57 | void storeMail(mailmime*mail, const QString&box); |
52 | Settings *settings; | 58 | Settings *settings; |
59 | |||
60 | int sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which); | ||
53 | }; | 61 | }; |
54 | 62 | ||
55 | #endif | 63 | #endif |