27#ifndef ASYNC_PTY_INCLUDED
28#define ASYNC_PTY_INCLUDED
38#include <sigc++/sigc++.h>
124class Pty :
public sigc::trackable
130 Pty(
const std::string &slave_link=
"");
175 ssize_t
write(
const void *buf,
size_t count);
181 bool isOpen(
void)
const {
return master >= 0; }
193 static const int POLLHUP_CHECK_INTERVAL = 100;
195 std::string slave_link;
201 Pty& operator=(
const Pty&);
203 void charactersReceived(
void);
204 short pollMaster(
void);
205 void checkIfSlaveEndOpen(
void);
Contains a single shot or periodic timer that emits a signal on timeout.
A class for watching file descriptors.
A wrapper class for using a PTY.
bool isOpen(void) const
Check if the PTY is open or not.
void close(void)
Close the PTY if it's open.
bool open(void)
Open the PTY.
ssize_t write(const void *buf, size_t count)
Write data to the PTY.
bool reopen(void)
Reopen the PTY.
Pty(const std::string &slave_link="")
Default constructor.
sigc::signal< void, const void *, size_t > dataReceived
Signal that is emitted when data has been received.
A class that produces timer events.
Namespace for the asynchronous programming classes.