#include <console.hpp>
Public Member Functions | |
Console (TerminalsConfig &terminals, unsigned int terminalNum=0) | |
Launches the console on the current terminal. More... | |
~Console () | |
void | execute () |
Private Types | |
enum | ConsoleQuitReason : int { ConsoleQuitReason::NONE = 0, ConsoleQuitReason::USER = 1, ConsoleQuitReason::HUP = 2, ConsoleQuitReason::ERR = 3 } |
enum | ConsoleChange : int { ConsoleChange::NEXT = 0, ConsoleChange::PREV = 1 } |
Private Member Functions | |
void | setupTTY () |
void | restoreTTY () |
void | resizePTY () |
void | onPTY (int fd, cargo::ipc::epoll::Events events) |
void | onStdInput (int fd, cargo::ipc::epoll::Events events) |
void | onStdOutput (int fd, cargo::ipc::epoll::Events events) |
void | checkForError (cargo::ipc::epoll::Events events) |
bool | handleSpecial (char key) |
void | consoleChange (ConsoleChange direction) |
int | getCurrentFD () const |
virtual void | revert () |
Private Attributes | |
TerminalsConfig & | mTerminals |
int | mTerminalNum |
bool | mServiceMode |
ConsoleQuitReason | mQuitReason |
cargo::ipc::epoll::EventPoll | mEventPoll |
utils::SignalFD | mSignalFD |
std::vector< std::pair< int, struct::sigaction > > | mSignalStates |
struct termios | mTTYState |
char | appToTerm [IO_BUFFER_SIZE] |
int | appToTermOffset |
char | termToApp [IO_BUFFER_SIZE] |
int | termToAppOffset |
Static Private Attributes | |
static const int | IO_BUFFER_SIZE = 1024 |
|
strongprivate |
|
strongprivate |
lxcpp::Console::Console | ( | TerminalsConfig & | terminals, |
unsigned int | terminalNum = 0 |
||
) |
Launches the console on the current terminal.
terminals | container's terminals config |
terminalNum | initial terminal to attach to |
lxcpp::Console::~Console | ( | ) |
|
private |
|
private |
|
virtual |
Implements lxcpp::Command.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlinevirtualinherited |
Reimplemented in lxcpp::ProvisionLink, lxcpp::ProvisionMount, lxcpp::ProvisionFile, and lxcpp::Provisions.
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |