ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libptytty/src/libptytty.h
Revision: 1.4
Committed: Sun Jan 22 00:51:22 2006 UTC (20 years, 7 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.3: +8 -3 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.3 #ifndef LIBPTYTTY_H_ /* public libptytty header file */
2     #define LIBPTYTTY_H_
3 root 1.1
4     struct ptytty {
5     int pty; // pty file descriptor; connected to rxvt
6     int tty; // tty file descriptor; connected to child
7    
8     virtual ~ptytty ()
9     {
10     }
11    
12     virtual bool get () = 0;
13     virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0;
14    
15     void close_tty ();
16     bool make_controlling_tty ();
17     void set_utf8_mode (bool on);
18    
19 root 1.4 static void init ();
20     static void drop_privileges ();
21     static ptytty *create (); // create a new pty object
22    
23     static int send_fd (int socket, int fd);
24     static int recv_fd (int socket);
25    
26 root 1.1 protected:
27 root 1.4
28 root 1.1 ptytty ()
29     : pty(-1), tty(-1)
30     {
31     }
32     };
33    
34     #endif
35