BMA Server Framework
/home/bradarant/barant/ServerCore/ConsoleSession.h
1 #ifndef __ConsoleSession_h__
2 #define __ConsoleSession_h__
3 
4 #include "TerminalSession.h"
5 #include "Session.h"
6 #include "Service.h"
7 #include "CommandList.h"
8 
9 namespace core {
10 
18 
20 
21  public:
22  ConsoleSession(EPoll &ePoll, Service &service);
23  ~ConsoleSession();
24 
25  void writeLog(std::string data);
26 
27  protected:
28  void protocol(std::string data) override;
29 
30  private:
31  enum Status {WELCOME, LOGIN, WAIT_USER_PROFILE, PASSWORD, WAIT_PASSWORD, PROMPT, INPUT, PROCESS, DONE};
32  Status status = WELCOME;
33  void doCommand(std::string request);
34  std::string command;
35 
36  };
37 
38 }
39 
40 #endif
Definition: EPoll.h:31
Definition: Command.cpp:4
Definition: ConsoleSession.h:19
Definition: Service.h:20
void protocol(std::string data) override
Definition: ConsoleSession.cpp:12
Definition: TerminalSession.h:30