/** * @file imapserver.h * @brief Declaration of the IMAPServer class. * @author Andreas Aardal Hanssen * @date 2002-2005 */ namespace Binc { class IMAPServer { public: IMAPServer(int argc, char *argv[]); ~IMAPServer(); int initialize(); int runStub(); int run(); enum class ServerStatus { OK, RequestError, RequestIgnore, // required for StartTLS, premature answer RequestRejected, ClientDisconnected, Timeout }; private: void prepareForNextRequest(); int argc; char **argv; bool stubMode; ServerStatus serverStatus; }; }