My Project
TerminalSession.h
1 #ifndef __Terminal_h__
2 #define __Terminal_h__
3 
4 #include "includes"
5 #include "TCPSession.h"
6 #include "TCPServer.h"
7 
8 namespace core {
9 
10  static const int FG_BLACK = 30;
11  static const int FG_RED = 31;
12  static const int FG_GREEN = 32;
13  static const int FG_YELLOW = 33;
14  static const int FG_BLUE = 34;
15  static const int FG_MAGENTA = 35;
16  static const int FG_CYAN = 36;
17  static const int FG_WHITE = 37;
18 
19  static const int BG_BLACK = 40;
20  static const int BG_RED = 41;
21  static const int BG_GREEN = 42;
22  static const int BG_YELLOW = 43;
23  static const int BG_BLUE = 44;
24  static const int BG_MAGENTA = 45;
25  static const int BG_CYAN = 46;
26  static const int BG_WHITE = 47;
27 
28  static const char esc = 0x1b;
29 
30  class TerminalSession : public TCPSession {
31 
32  public:
33  TerminalSession(EPoll &ePoll, TCPServer &server);
34  ~TerminalSession();
35 
36  int getLines();
37 
38  void clear();
39  void clearEOL();
40  void setCursorLocation(int x, int y);
41  void setColor(int color);
42  void setBackColor(int color);
43  void saveCursor();
44  void restoreCursor();
45  void NextLine(int lines);
46  void PreviousLine(int lines);
47  void scrollArea(int start, int end);
48 
49  };
50 
51 }
52 
53 #endif
Definition: EPoll.h:31
Definition: Command.cpp:3
Definition: TCPSession.h:21
Definition: TCPServer.h:24
Definition: TerminalSession.h:30