• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions | Protected Member Functions | List of all members
KPty Class Reference

#include <kpty.h>

Public Member Functions

 KPty ()
 
 ~KPty ()
 
bool open ()
 
bool setPty (int pty_master)
 
void close ()
 
void setCTty ()
 
void login (const char *user=0, const char *remotehost=0)
 
void logout ()
 
void setWinSize (int lines, int columns)
 
void setXonXoff (bool useXonXoff)
 
void setUtf8Mode (bool useUtf8)
 
const char * ttyName () const
 
int masterFd () const
 
int slaveFd () const
 

Protected Member Functions

bool _attachPty (int pty_master)
 

Detailed Description

Provides a high level representation of a pseudo tty pair, including utmp support.

...

Since
3.2

Definition at line 40 of file kpty.h.

Constructor & Destructor Documentation

◆ KPty()

KPty::KPty ( )

Constructor.

Definition at line 189 of file kpty.cpp.

◆ ~KPty()

KPty::~KPty ( )

Destructor:

If the pty is still open, it will be closed. Note, however, that an utmp registration is not undone.

Definition at line 194 of file kpty.cpp.

Member Function Documentation

◆ _attachPty()

bool KPty::_attachPty ( int  pty_master)
protected

Definition at line 211 of file kpty.cpp.

◆ close()

void KPty::close ( )

Close the pty master/slave pair.

Definition at line 414 of file kpty.cpp.

◆ login()

void KPty::login ( const char *  user = 0,
const char *  remotehost = 0 
)

Creates an utmp entry for the tty.

This function must be called after calling setCTty and making this pty the stdin.

Parameters
userthe user to be logged on
remotehostthe host from which the login is coming. This is not the local host. For remote logins it should be the hostname of the client. For local logins from inside an X session it should be the name of the X display. Otherwise it should be empty.

Definition at line 461 of file kpty.cpp.

◆ logout()

void KPty::logout ( )

Removes the utmp entry for this tty.

Definition at line 506 of file kpty.cpp.

◆ masterFd()

int KPty::masterFd ( ) const
Returns
the file descriptor of the master pty

This function should be called only while the pty is open.

Definition at line 583 of file kpty.cpp.

◆ open()

bool KPty::open ( )

Create a pty master/slave pair.

Returns
true if a pty pair was successfully opened

Definition at line 312 of file kpty.cpp.

◆ setCTty()

void KPty::setCTty ( )

Creates a new session and process group and makes this pty the controlling tty.

Definition at line 436 of file kpty.cpp.

◆ setPty()

bool KPty::setPty ( int  pty_master)

Attach a existing pty master.

Returns
true if the pty was successfully added

Definition at line 200 of file kpty.cpp.

◆ setUtf8Mode()

void KPty::setUtf8Mode ( bool  useUtf8)

Set the pty in utf8 mode on systems that support it.

See the man page of "stty iutf8" for more info.

Since
3.4

Definition at line 556 of file kpty.cpp.

◆ setWinSize()

void KPty::setWinSize ( int  lines,
int  columns 
)

Change the logical (screen) size of the pty.

The default is 24 lines by 80 columns.

Parameters
linesthe number of rows
columnsthe number of columns

Definition at line 528 of file kpty.cpp.

◆ setXonXoff()

void KPty::setXonXoff ( bool  useXonXoff)

Set whether the pty should honor Xon/Xoff flow control.

Xon/Xoff flow control is off by default.

Parameters
useXonXofftrue if Xon/Xoff flow control should be used.

Definition at line 536 of file kpty.cpp.

◆ slaveFd()

int KPty::slaveFd ( ) const
Returns
the file descriptor of the slave pty

This function should be called only while the pty is open.

Definition at line 588 of file kpty.cpp.

◆ ttyName()

const char * KPty::ttyName ( ) const
Returns
the name of the slave pty device.

This function should be called only while the pty is open.

Definition at line 578 of file kpty.cpp.


The documentation for this class was generated from the following files:
  • kpty.h
  • kpty.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.