ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libptytty/src/libptytty.h
Revision: 1.6
Committed: Sun Jan 22 03:49:41 2006 UTC (18 years, 4 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.5: +3 -1 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 root 1.6 static ptytty *create (); // create a new pty object
24    
25 root 1.4 static void drop_privileges ();
26 root 1.6 static void use_helper ();
27 root 1.4
28     static int send_fd (int socket, int fd);
29     static int recv_fd (int socket);
30    
31 root 1.1 protected:
32 root 1.4
33 root 1.1 ptytty ()
34     : pty(-1), tty(-1)
35     {
36     }
37     };
38    
39     #endif
40