author | harlekin <harlekin> | 2004-01-03 20:49:34 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-01-03 20:49:34 (UTC) |
commit | 02b7e56d865847ce8f4a35b7075f7b3bb7b0de76 (patch) (unidiff) | |
tree | f8e0272523f9080ef2dee6901545febf854b2122 /noncore/net/mail/smtpwrapper.h | |
parent | a89470252ffae1670e12ef5d81db08d0e27af265 (diff) | |
download | opie-02b7e56d865847ce8f4a35b7075f7b3bb7b0de76.zip opie-02b7e56d865847ce8f4a35b7075f7b3bb7b0de76.tar.gz opie-02b7e56d865847ce8f4a35b7075f7b3bb7b0de76.tar.bz2 |
communicate outgoing mails status to the QPE/Pim channel ( to which the todayplugin listens for example)
Diffstat (limited to 'noncore/net/mail/smtpwrapper.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/smtpwrapper.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/noncore/net/mail/smtpwrapper.h b/noncore/net/mail/smtpwrapper.h index 0535983..05becf2 100644 --- a/noncore/net/mail/smtpwrapper.h +++ b/noncore/net/mail/smtpwrapper.h | |||
@@ -10,52 +10,62 @@ | |||
10 | #include "settings.h" | 10 | #include "settings.h" |
11 | 11 | ||
12 | class Mail; | 12 | class Mail; |
13 | class MBOXwrapper; | 13 | class MBOXwrapper; |
14 | class RecMail; | 14 | class RecMail; |
15 | class Attachment; | 15 | class Attachment; |
16 | struct mailimf_fields; | 16 | struct mailimf_fields; |
17 | struct mailimf_field; | 17 | struct mailimf_field; |
18 | struct mailimf_mailbox; | 18 | struct mailimf_mailbox; |
19 | struct mailmime; | 19 | struct mailmime; |
20 | struct mailimf_address_list; | 20 | struct mailimf_address_list; |
21 | class progressMailSend; | 21 | class progressMailSend; |
22 | 22 | ||
23 | class SMTPwrapper : public QObject | 23 | class SMTPwrapper : public QObject |
24 | { | 24 | { |
25 | Q_OBJECT | 25 | Q_OBJECT |
26 | 26 | ||
27 | public: | 27 | public: |
28 | SMTPwrapper( Settings *s ); | 28 | SMTPwrapper( Settings *s ); |
29 | virtual ~SMTPwrapper(){} | 29 | virtual ~SMTPwrapper(){} |
30 | void sendMail(const Mail& mail,SMTPaccount*smtp,bool later=false ); | 30 | void sendMail(const Mail& mail,SMTPaccount*smtp,bool later=false ); |
31 | bool flushOutbox(SMTPaccount*smtp); | 31 | bool flushOutbox(SMTPaccount*smtp); |
32 | 32 | ||
33 | static progressMailSend*sendProgress; | 33 | static progressMailSend*sendProgress; |
34 | |||
35 | signals: | ||
36 | void queuedMails( int ); | ||
37 | |||
34 | protected: | 38 | protected: |
35 | mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); | 39 | mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); |
36 | mailimf_fields *createImfFields(const Mail &mail ); | 40 | mailimf_fields *createImfFields(const Mail &mail ); |
37 | mailmime *createMimeMail(const Mail&mail ); | 41 | mailmime *createMimeMail(const Mail&mail ); |
38 | 42 | ||
39 | mailimf_address_list *parseAddresses(const QString&addr ); | 43 | mailimf_address_list *parseAddresses(const QString&addr ); |
40 | void addFileParts( mailmime *message,const QList<Attachment>&files ); | 44 | void addFileParts( mailmime *message,const QList<Attachment>&files ); |
41 | mailmime *buildTxtPart(const QString&str ); | 45 | mailmime *buildTxtPart(const QString&str ); |
42 | mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); | 46 | mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); |
43 | void smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ); | 47 | void smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ); |
44 | clist *createRcptList( mailimf_fields *fields ); | 48 | clist *createRcptList( mailimf_fields *fields ); |
45 | 49 | ||
46 | static void storeMail(char*mail, size_t length, const QString&box); | 50 | static void storeMail(char*mail, size_t length, const QString&box); |
47 | static QString mailsmtpError( int err ); | 51 | static QString mailsmtpError( int err ); |
48 | static void progress( size_t current, size_t maximum ); | 52 | static void progress( size_t current, size_t maximum ); |
49 | static void addRcpts( clist *list, mailimf_address_list *addr_list ); | 53 | static void addRcpts( clist *list, mailimf_address_list *addr_list ); |
50 | static char *getFrom( mailmime *mail ); | 54 | static char *getFrom( mailmime *mail ); |
51 | static char *getFrom( mailimf_field *ffrom); | 55 | static char *getFrom( mailimf_field *ffrom); |
52 | static mailimf_field *getField( mailimf_fields *fields, int type ); | 56 | static mailimf_field *getField( mailimf_fields *fields, int type ); |
53 | int smtpSend(char*from,clist*rcpts,char*data,size_t size, SMTPaccount *smtp ); | 57 | int smtpSend(char*from,clist*rcpts,char*data,size_t size, SMTPaccount *smtp ); |
54 | 58 | ||
55 | void storeMail(mailmime*mail, const QString&box); | 59 | void storeMail(mailmime*mail, const QString&box); |
56 | Settings *settings; | 60 | Settings *settings; |
57 | 61 | ||
58 | int sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which); | 62 | int sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which); |
63 | |||
64 | int m_queuedMail; | ||
65 | |||
66 | protected slots: | ||
67 | void emitQCop( int queued ); | ||
68 | |||
59 | }; | 69 | }; |
60 | 70 | ||
61 | #endif | 71 | #endif |