Diffstat (limited to 'noncore/unsupported/mail2/libmail/imaphandler.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/libmail/imaphandler.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/noncore/unsupported/mail2/libmail/imaphandler.h b/noncore/unsupported/mail2/libmail/imaphandler.h new file mode 100644 index 0000000..8cb42db --- a/dev/null +++ b/noncore/unsupported/mail2/libmail/imaphandler.h | |||
@@ -0,0 +1,86 @@ | |||
1 | #ifndef IMAPHANDLER_H | ||
2 | #define IMAPHANDLER_H | ||
3 | |||
4 | #include <qobject.h> | ||
5 | |||
6 | #include "configfile.h" | ||
7 | |||
8 | class IMAPBase; | ||
9 | class IMAPResponse; | ||
10 | |||
11 | class IMAPHandler : public QObject | ||
12 | { | ||
13 | Q_OBJECT | ||
14 | |||
15 | public: | ||
16 | IMAPHandler(const Account &account); | ||
17 | |||
18 | QString iCapability(); | ||
19 | QString iNoop(); | ||
20 | QString iLogout(); | ||
21 | |||
22 | QString iAuthenticate(const QString &mechanism); | ||
23 | QString iLogin(const QString &user, const QString &pass); | ||
24 | |||
25 | QString iSelect(const QString &mailbox); | ||
26 | QString iExamine(const QString &mailbox); | ||
27 | QString iCreate(const QString &mailbox); | ||
28 | QString iDelete(const QString &mailbox); | ||
29 | QString iRename(const QString &mailbox, const QString &newMailbox); | ||
30 | |||
31 | QString iSubscribe(const QString &mailbox); | ||
32 | QString iUnsubscribe(const QString &mailbox); | ||
33 | |||
34 | QString iList(const QString &reference, const QString &mailbox); | ||
35 | QString iLsub(const QString &reference, const QString &mailbox); | ||
36 | |||
37 | QString iStatus(const QString &mailbox, const QString &items); | ||
38 | |||
39 | QString iAppend(const QString &mailbox, const QString &literal, const QString &flags = 0, const QString &datetime = 0); | ||
40 | |||
41 | QString iCheck(); | ||
42 | QString iClose(); | ||
43 | QString iExpunge(); | ||
44 | |||
45 | QString iSearch(const QString &search, const QString &charset = 0); | ||
46 | |||
47 | QString iFetch(const QString &message, const QString &items); | ||
48 | |||
49 | QString iStore(const QString &message, const QString &items); | ||
50 | QString iCopy(const QString &message, const QString &mailbox); | ||
51 | |||
52 | QString iUid(const QString &command, const QString &arguments); | ||
53 | |||
54 | QString iX(const QString &commandAtom, const QString &arguments); | ||
55 | |||
56 | signals: | ||
57 | void gotResponse(IMAPResponse &response); | ||
58 | |||
59 | void IMAPLookingUpHost(); | ||
60 | void IMAPHostFound(); | ||
61 | void IMAPConnected(); | ||
62 | void IMAPDisconnected(); | ||
63 | void IMAPError(int err); | ||
64 | |||
65 | protected: | ||
66 | void doLogin(); | ||
67 | QString escape(const QString &in); | ||
68 | QString tag(bool count = true); | ||
69 | |||
70 | protected slots: | ||
71 | void slotDataReceived(const QString &data); | ||
72 | void slotLookingUpHost(); | ||
73 | void slotHostFound(); | ||
74 | void slotConnected(); | ||
75 | void slotDisconnected(); | ||
76 | void slotError(int err); | ||
77 | |||
78 | private: | ||
79 | Account _account; | ||
80 | IMAPBase *_ibase; | ||
81 | unsigned int _tag; | ||
82 | bool _loggingin, _loggedin; | ||
83 | |||
84 | }; | ||
85 | |||
86 | #endif | ||