"Fossies" - the Fresh Open Source Software Archive

Member "postal-0.76/smtpserver.h" (24 Sep 2006, 972 Bytes) of package /linux/privat/postal-0.76.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "smtpserver.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef SMTP_SERVER_H
    2 #define SMTP_SERVER_H
    3 
    4 #include "logit.h"
    5 #include "tcp.h"
    6 #include "results.h"
    7 
    8 using namespace std;
    9 
   10 class UserList;
   11 
   12 class smtp_server : public tcp
   13 {
   14 public:
   15   smtp_server(short port, UserList &ul, int maxMsgSize
   16             , int processes, Logit *log, Logit *debug
   17 #ifdef USE_SSL
   18     , bool use_ssl
   19 #endif
   20     );
   21   smtp_server(int threadNum, const smtp_server *parent);
   22 
   23   virtual ~smtp_server();
   24 
   25   virtual int disconnect();
   26 
   27   int doAllWork();
   28 
   29 private:
   30   virtual int action(PVOID);
   31   virtual Thread *newThread(int threadNum);
   32 
   33   int pollRead();
   34   virtual int WriteWork(PVOID buf, int size, int timeout);
   35 
   36   virtual ERROR_TYPE readCommandResp(bool) { return readCommandResp(); }
   37   ERROR_TYPE readCommandResp();
   38   void error();
   39   virtual void sentData(int bytes);
   40   virtual void receivedData(int);
   41 
   42   static int m_processes;
   43   static int m_max_conn;
   44   UserList &m_ul;
   45   results *m_res;
   46   int m_maxMsgSize;
   47   static int m_nextThread;
   48 };
   49 
   50 #endif