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

File Contents

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