Diffstat (limited to 'noncore/net/mailit/smtpclient.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/smtpclient.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/net/mailit/smtpclient.h b/noncore/net/mailit/smtpclient.h index 45c0703..554ba3f 100644 --- a/noncore/net/mailit/smtpclient.h +++ b/noncore/net/mailit/smtpclient.h | |||
@@ -26,50 +26,51 @@ | |||
26 | #include <qobject.h> | 26 | #include <qobject.h> |
27 | #include <qtextstream.h> | 27 | #include <qtextstream.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | #include <qlist.h> | 29 | #include <qlist.h> |
30 | 30 | ||
31 | struct RawEmail | 31 | struct RawEmail |
32 | { | 32 | { |
33 | QString from; | 33 | QString from; |
34 | QString subject; | 34 | QString subject; |
35 | QStringList to; | 35 | QStringList to; |
36 | QString body; | 36 | QString body; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | class SmtpClient: public QObject | 39 | class SmtpClient: public QObject |
40 | { | 40 | { |
41 | Q_OBJECT | 41 | Q_OBJECT |
42 | 42 | ||
43 | public: | 43 | public: |
44 | SmtpClient(); | 44 | SmtpClient(); |
45 | ~SmtpClient(); | 45 | ~SmtpClient(); |
46 | void newConnection(const QString &target, int port); | 46 | void newConnection(const QString &target, int port); |
47 | void addMail(const QString &from, const QString &subject, const QStringList &to, const QString &body); | 47 | void addMail(const QString &from, const QString &subject, const QStringList &to, const QString &body); |
48 | 48 | ||
49 | signals: | 49 | signals: |
50 | void errorOccurred(int); | 50 | void errorOccurred(int, const QString & LR ); |
51 | void updateStatus(const QString &); | 51 | void updateStatus(const QString &); |
52 | void mailSent(); | 52 | void mailSent(); |
53 | 53 | ||
54 | public slots: | 54 | public slots: |
55 | void errorHandling(int); | 55 | void errorHandling(int); |
56 | void errorHandlingWithMsg(int, const QString & LastResponse ); | ||
56 | 57 | ||
57 | protected slots: | 58 | protected slots: |
58 | void connectionEstablished(); | 59 | void connectionEstablished(); |
59 | void incomingData(); | 60 | void incomingData(); |
60 | 61 | ||
61 | private: | 62 | private: |
62 | QSocket *socket; | 63 | QSocket *socket; |
63 | QTextStream *stream; | 64 | QTextStream *stream; |
64 | enum transferStatus | 65 | enum transferStatus |
65 | { | 66 | { |
66 | Init, From, Recv, MRcv, Data, Body, Quit, Done | 67 | Init, From, Recv, MRcv, Data, Body, Quit, Done |
67 | }; | 68 | }; |
68 | int status; | 69 | int status; |
69 | QList<RawEmail> mailList; | 70 | QList<RawEmail> mailList; |
70 | RawEmail *mailPtr; | 71 | RawEmail *mailPtr; |
71 | bool sending; | 72 | bool sending; |
72 | QStringList::Iterator it; | 73 | QStringList::Iterator it; |
73 | }; | 74 | }; |
74 | 75 | ||
75 | #endif | 76 | #endif |