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