Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.h') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.h b/kmicromail/libmailwrapper/smtpwrapper.h new file mode 100644 index 0000000..6c5bbe8 --- a/dev/null +++ b/kmicromail/libmailwrapper/smtpwrapper.h | |||
@@ -0,0 +1,63 @@ | |||
1 | // -*- Mode: C++; -*- | ||
2 | #ifndef SMTPwrapper_H | ||
3 | #define SMTPwrapper_H | ||
4 | |||
5 | #include <qpe/applnk.h> | ||
6 | |||
7 | #include <qbitarray.h> | ||
8 | #include <qdatetime.h> | ||
9 | #include <libetpan/clist.h> | ||
10 | |||
11 | #include "settings.h" | ||
12 | #include "generatemail.h" | ||
13 | |||
14 | #include <opie2/osmartpointer.h> | ||
15 | |||
16 | class SMTPaccount; | ||
17 | class AbstractMail; | ||
18 | |||
19 | class SMTPwrapper : public Generatemail | ||
20 | { | ||
21 | Q_OBJECT | ||
22 | |||
23 | public: | ||
24 | SMTPwrapper(SMTPaccount * aSmtp); | ||
25 | virtual ~SMTPwrapper(); | ||
26 | void sendMail(const Opie::Core::OSmartPointer<Mail>& mail,bool later=false ); | ||
27 | bool flushOutbox(); | ||
28 | |||
29 | static progressMailSend*sendProgress; | ||
30 | |||
31 | signals: | ||
32 | void queuedMails( int ); | ||
33 | |||
34 | protected: | ||
35 | mailsmtp *m_smtp; | ||
36 | SMTPaccount * m_SmtpAccount; | ||
37 | |||
38 | void connect_server(); | ||
39 | void disc_server(); | ||
40 | int start_smtp_tls(); | ||
41 | |||
42 | |||
43 | void smtpSend( mailmime *mail,bool later); | ||
44 | |||
45 | static void storeMail(const char*mail, size_t length, const QString&box); | ||
46 | static QString mailsmtpError( int err ); | ||
47 | static void progress( size_t current, size_t maximum ); | ||
48 | |||
49 | int smtpSend(char*from,clist*rcpts,const char*data,size_t size); | ||
50 | |||
51 | void storeMail(mailmime*mail, const QString&box); | ||
52 | |||
53 | int sendQueuedMail(AbstractMail*wrap,const Opie::Core::OSmartPointer<RecMail>&which); | ||
54 | void storeFailedMail(const char*data,unsigned int size, const char*failuremessage); | ||
55 | |||
56 | int m_queuedMail; | ||
57 | |||
58 | protected slots: | ||
59 | void emitQCop( int queued ); | ||
60 | |||
61 | }; | ||
62 | |||
63 | #endif | ||