From eb3b446a6734867d93a6b1b4ae75a75e45a581b0 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 22 Jan 2006 09:57:48 +0000 Subject: [PATCH] *** empty log message *** --- src/libptytty.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/libptytty.h diff --git a/src/libptytty.h b/src/libptytty.h new file mode 100644 index 00000000..b7f6c1c4 --- /dev/null +++ b/src/libptytty.h @@ -0,0 +1,40 @@ +// This file is part of libptytty. Do not make local modifications. +// http://software.schmorp.de/pkg/libptytty + +#ifndef LIBPTYTTY_H_ /* public libptytty header file */ +#define LIBPTYTTY_H_ + +struct ptytty { + int pty; // pty file descriptor; connected to rxvt + int tty; // tty file descriptor; connected to child + + virtual ~ptytty () + { + } + + virtual bool get () = 0; + virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0; + + void close_tty (); + bool make_controlling_tty (); + void set_utf8_mode (bool on); + + static void init (); + static ptytty *create (); // create a new pty object + + static void drop_privileges (); + static void use_helper (); + + static int send_fd (int socket, int fd); + static int recv_fd (int socket); + +protected: + + ptytty () + : pty(-1), tty(-1) + { + } +}; + +#endif + -- 2.34.1