diff options
| author | Sam Varshavchik | 2013-08-19 16:39:41 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2013-08-25 14:43:51 -0400 |
| commit | 9c45d9ad13fdf439d44d7443ae75da15ea0223ed (patch) | |
| tree | 7a81a04cb51efb078ee350859a64be2ebc6b8813 /libmail/pop3maildrop.H | |
| parent | a9520698b770168d1f33d6301463bb70a19655ec (diff) | |
| download | courier-libs-9c45d9ad13fdf439d44d7443ae75da15ea0223ed.tar.bz2 | |
Initial checkin
Imported from subversion report, converted to git. Updated all paths in
scripts and makefiles, reflecting the new directory hierarchy.
Diffstat (limited to 'libmail/pop3maildrop.H')
| -rw-r--r-- | libmail/pop3maildrop.H | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libmail/pop3maildrop.H b/libmail/pop3maildrop.H new file mode 100644 index 0000000..bbb56cb --- /dev/null +++ b/libmail/pop3maildrop.H @@ -0,0 +1,61 @@ +/* +** Copyright 2003-2008, Double Precision Inc. +** +** See COPYING for distribution information. +*/ +#ifndef libmail_pop3maildrop_H +#define libmail_pop3maildrop_H + +#include "libmail_config.h" +#include "mail.H" +#include "maildir.H" + +//////////////////////////////////////////////////////////////////////// +// +// A POP3 maildrop is subclassed from mail::maildir, so that it looks like +// a maildir. It maintains a private mail::pop3 object that is used to +// feed grab mail from a pop3 maildrop, and copy it to the local maildir. +// + +LIBMAIL_START + +class pop3maildrop : private callback::disconnect, + // Swallow disconnect events from maildir + + public mail::maildir { + + class pop3acct; // Custom POP3 subclass + + pop3acct *myPop3Acct; + + class checkNewMailHelper; +public: + + friend class CheckNewMailHelper; + + pop3maildrop(mail::callback::disconnect &disconnect_callback, + mail::loginCallback *loginCallbackFunc, + mail::callback &callback, + std::string pathArg, + std::string pop3url, + std::string pop3pass, + std::vector<std::string> &certificates); + ~pop3maildrop(); + + // Hook into POP3: + void logout(callback &callback); + void checkNewMail(callback &callback); + + bool hasCapability(std::string capability); + std::string getCapability(std::string capability); +private: + // Inherited from callback::disconnect: + + void disconnected(const char *errmsg); + void servererror(const char *errmsg); + +}; + +LIBMAIL_END + +#endif |
