BMAMail  1.0.0
E-Mail System
/home/bradarant/barant/BMAMail/IMAPService.h
Go to the documentation of this file.
1 #ifndef __IMAPService_h__
2 #define __IMAPService_h__
3 
4 #include "TCPServer.h"
5 #include "Exception.h"
6 #include "__IMAP_APPEND.h"
7 #include "__IMAP_AUTHENTICATE.h"
8 #include "__IMAP_CHECK.h"
9 #include "__IMAP_CLOSE.h"
10 #include "__IMAP_COPY.h"
11 #include "__IMAP_CREATE.h"
12 #include "__IMAP_DELETE.h"
13 #include "__IMAP_EXAMINE.h"
14 #include "__IMAP_EXPUNGE.h"
15 #include "__IMAP_FETCH.h"
16 #include "__IMAP_LIST.h"
17 #include "__IMAP_LOGIN.h"
18 #include "__IMAP_LSUB.h"
19 #include "__IMAP_RENAME.h"
20 #include "__IMAP_SEARCH.h"
21 #include "__IMAP_SELECT.h"
22 #include "__IMAP_STARTTLS.h"
23 #include "__IMAP_STATUS.h"
24 #include "__IMAP_STORE.h"
25 #include "__IMAP_SUBSCRIBE.h"
26 #include "__IMAP_UID.h"
27 #include "__IMAP_UNSUBSCRIBE.h"
28 
29 namespace mail {
30 
31  class IMAPService : public core::TCPServer {
32 
33  public:
34  IMAPService(core::EPoll &epoll, std::string hostName, std::string mailPath, core::IPAddress ipAddress)
35  : TCPServer(epoll, ipAddress), mailFileSystem(mailPath), hostName(hostName) {
36  commands.add(_imap_append, "APPEND");
37  commands.add(_imap_authenticate, "AUTHENTCATE");
38  commands.add(_imap_check, "CHECK");
39  commands.add(_imap_close, "CLOSE");
40  commands.add(_imap_copy, "COPY");
41  commands.add(_imap_create, "CREATE");
42  commands.add(_imap_delete, "DELETE");
43  commands.add(_imap_examine, "EXAAMINE");
44  commands.add(_imap_expunge, "EXPUNGE");
45  commands.add(_imap_fetch, "FETCH");
46  commands.add(_imap_list, "LIST");
47  commands.add(_imap_login, "LOGIN");
48  commands.add(_imap_lsub, "LSUB");
49  commands.add(_imap_rename, "RENAME");
50  commands.add(_imap_search, "SEARCH");
51  commands.add(_imap_select, "SELECT");
52  commands.add(_imap_starttls, "STARTTLS");
53  commands.add(_imap_status, "STATUS");
54  commands.add(_imap_store, "STORE");
55  commands.add(_imap_subscribe, "SUBSCRIBE");
56  commands.add(_imap_uid, "UID");
57  commands.add(_imap_unsubscribe, "UNSUBSCRIBE");
58  }
59 
61  std::string hostName;
62 
63  private:
64  __IMAP_APPEND _imap_append;
65  __IMAP_AUTHENTICATE _imap_authenticate;
66  __IMAP_CHECK _imap_check;
67  __IMAP_CLOSE _imap_close;
68  __IMAP_COPY _imap_copy;
69  __IMAP_CREATE _imap_create;
70  __IMAP_DELETE _imap_delete;
71  __IMAP_EXAMINE _imap_examine;
72  __IMAP_EXPUNGE _imap_expunge;
73  __IMAP_FETCH _imap_fetch;
74  __IMAP_LIST _imap_list;
75  __IMAP_LOGIN _imap_login;
76  __IMAP_LSUB _imap_lsub;
77  __IMAP_RENAME _imap_rename;
78  __IMAP_SEARCH _imap_search;
79  __IMAP_SELECT _imap_select;
80  __IMAP_STARTTLS _imap_starttls;
81  __IMAP_STATUS _imap_status;
82  __IMAP_STORE _imap_store;
83  __IMAP_SUBSCRIBE _imap_subscribe;
84  __IMAP_UID _imap_uid;
85  __IMAP_UNSUBSCRIBE _imap_unsubscribe;
86 
87  };
88 
89 }
90 
91 #endif
Definition: __IMAP_LSUB.h:9
Definition: MailFileSystem.h:10
Definition: __IMAP_STARTTLS.h:9
Definition: __IMAP_EXAMINE.h:9
Definition: __IMAP_CHECK.h:9
Definition: __IMAP_LOGIN.h:9
Definition: __IMAP_APPEND.h:9
Definition: __IMAP_EXPUNGE.h:9
Definition: __IMAP_APPEND.h:7
std::string hostName
Definition: IMAPService.h:61
Definition: __IMAP_STORE.h:9
Definition: __IMAP_COPY.h:9
Definition: __IMAP_AUTHENTICATE.h:9
Definition: __IMAP_UID.h:9
IMAPService(core::EPoll &epoll, std::string hostName, std::string mailPath, core::IPAddress ipAddress)
Definition: IMAPService.h:34
Definition: __IMAP_SEARCH.h:9
Definition: __IMAP_FETCH.h:9
Definition: __IMAP_LIST.h:9
Definition: __IMAP_CLOSE.h:9
Definition: __IMAP_SELECT.h:9
Definition: IMAPService.h:31
Definition: __IMAP_STATUS.h:9
Definition: __IMAP_RENAME.h:9
Definition: __IMAP_DELETE.h:9
Definition: __IMAP_CREATE.h:9
Definition: __IMAP_UNSUBSCRIBE.h:9
MailFileSystem mailFileSystem
Definition: IMAPService.h:60
Definition: __IMAP_SUBSCRIBE.h:9