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