#ifndef __SMTPCommand_h__
# define __SMTPCommand_h__

# include "Command.h"
# include "SMTPSession.h"

#define CRLF "\r\n"

namespace mail {

   class SMTPServer;
   
   class SMTPCommand : public core::Command {
      
    public:
      
      virtual int processCommand(coreutils::ZString &request, core::TCPSession &session) override {
	 return processCommand(request, (SMTPSession &)session, (SMTPServer &)session.server);
      }

      virtual int processCommand(coreutils::ZString &request, SMTPSession &session, SMTPServer &server) {
	 return 0;
      }

      void grabInput(SMTPSession &session) {
	 session.server.commands.grabInput(session, *this);	 
      }

      void clearGrab(SMTPSession &session) {
	 session.server.commands.clearGrab(session);	 
      }
      
   };
   
}

#endif
