00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _UXTERMINAL_HPP_
00019 #define _UXTERMINAL_HPP_
00020
00021 #include <termios.h>
00022
00023 namespace Ux {
00024
00025
00026
00027
00028 class Termios : public termios, public Base {
00029
00030 public:
00031 speed_t cfgetispeed(void);
00032 speed_t cfgetospeed(void);
00033 void cfsetispeed(speed_t speed);
00034 void cfsetospeed(speed_t speed);
00035 };
00036
00037
00038
00039
00040 class Terminal : public File {
00041
00042 public:
00043 Terminal(int f = -1, const char *p = NULL, ssize_t s = -1)
00044 : File(f, p, s)
00045 { }
00046 Terminal(const char *p, ssize_t s = -1)
00047 : File(-1, p, s)
00048 { }
00049 bool isatty(void);
00050 static char * ctermid(char *buf = NULL);
00051 void tcdrain(void);
00052 void tcflow(int action);
00053 void tcflush(int queue);
00054 void tcgetattr(Termios& t);
00055 pid_t tcgetpgrp(void);
00056 pid_t tcgetsid(void);
00057 void tcsendbreak(int duration);
00058 void tcsetattr(int actions, const Termios& t);
00059 void tcsetpgrp(pid_t pgid);
00060 void ttyname(char *buf, size_t bufsize);
00061 };
00062
00063 }
00064
00065 #endif // _UXTERMINAL_HPP_