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

tdesu

Public Types | Public Member Functions | Protected Member Functions | List of all members
SshProcess Class Reference

#include <ssh.h>

Inheritance diagram for SshProcess:
StubProcess PtyProcess

Public Types

enum  Errors { SshNotFound =1 , SshNeedsPassword , SshIncorrectPassword }
 
- Public Types inherited from StubProcess
enum  Scheduler { SchedNormal , SchedRealtime }
 
- Public Types inherited from PtyProcess
enum  checkPidStatus { Error =-1 , NotExited =-2 , Killed =-3 }
 

Public Member Functions

 SshProcess (const TQCString &host=0, const TQCString &user=0, const TQCString &command=0)
 
void setHost (const TQCString &host)
 
void setStub (const TQCString &stub)
 
int checkNeedPassword ()
 
int checkInstall (const char *password)
 
int exec (const char *password, int check=0)
 
TQCString prompt ()
 
TQCString error ()
 
- Public Member Functions inherited from StubProcess
void setDcopTransport (const TQCString &dcopTransport)
 
void setCommand (const TQCString &command)
 
void setUser (const TQCString &user)
 
void setXOnly (bool xonly)
 
void setDCOPForwarding (bool dcopForwarding)
 
void setPriority (int prio)
 
void setScheduler (int sched)
 
- Public Member Functions inherited from PtyProcess
int exec (const TQCString &command, const QCStringList &args)
 
TQCString readLine (bool block=true)
 
TQCString readAll (bool block=true)
 
void writeLine (const TQCString &line, bool addNewline=true)
 
void unreadLine (const TQCString &line, bool addNewline=true)
 
void setExitString (const TQCString &exit)
 
int waitForChild ()
 
int WaitSlave ()
 
int enableLocalEcho (bool enable=true)
 
void setTerminal (bool terminal)
 
void setErase (bool erase)
 
void setEnvironment (const QCStringList &env)
 
int fd ()
 
int pid ()
 

Protected Member Functions

virtual TQCString display ()
 
virtual TQCString displayAuth ()
 
virtual TQCString dcopServer ()
 
virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from StubProcess
int ConverseStub (int check)
 
void notifyTaskbar (const TQString &suffix)
 
virtual TQCString display ()
 
virtual TQCString dcopServer ()
 
virtual TQCString dcopAuth ()
 
virtual TQCString iceAuth ()
 
virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from PtyProcess
const QCStringList & environment () const
 
virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Static Public Member Functions inherited from PtyProcess
static int waitMS (int fd, int ms)
 
static bool checkPid (pid_t pid)
 
static int checkPidExited (pid_t pid)
 
- Protected Attributes inherited from StubProcess
bool m_bXOnly
 
bool m_bDCOPForwarding
 
int m_Priority
 
int m_Scheduler
 
TQCString m_dcopTransport
 
TQCString m_Command
 
TQCString m_User
 
KCookie * m_pCookie
 
- Protected Attributes inherited from PtyProcess
bool m_bErase
 
bool m_bTerminal
 
int m_Pid
 
int m_Fd
 
TQCString m_Command
 
TQCString m_Exit
 

Detailed Description

Executes a remote command, using ssh.

Definition at line 26 of file ssh.h.

Member Enumeration Documentation

◆ Errors

enum SshProcess::Errors

Definition at line 32 of file ssh.h.

Constructor & Destructor Documentation

◆ SshProcess()

SshProcess::SshProcess ( const TQCString &  host = 0,
const TQCString &  user = 0,
const TQCString &  command = 0 
)

Definition at line 42 of file ssh.cpp.

◆ ~SshProcess()

SshProcess::~SshProcess ( )

Definition at line 52 of file ssh.cpp.

Member Function Documentation

◆ checkInstall()

int SshProcess::checkInstall ( const char *  password)

Checks if the stub is installed and if the password is correct.

Returns
Zero if everything is correct, nonzero otherwise.

Definition at line 63 of file ssh.cpp.

◆ checkNeedPassword()

int SshProcess::checkNeedPassword ( )

Checks if the current user@host needs a password.

Returns
The prompt for the password if a password is required. A null string otherwise.
Todo:
The return doc is so obviously wrong that the C code needs to be checked.

Definition at line 69 of file ssh.cpp.

◆ dcopServer()

TQCString SshProcess::dcopServer ( )
protectedvirtual

See display.

Reimplemented from StubProcess.

Definition at line 273 of file ssh.cpp.

◆ display()

TQCString SshProcess::display ( )
protectedvirtual

This virtual function can be overloaded when special behavior is desired.

By default, it returns the value returned by KCookie.

Reimplemented from StubProcess.

Definition at line 260 of file ssh.cpp.

◆ displayAuth()

TQCString SshProcess::displayAuth ( )
protectedvirtual

Definition at line 266 of file ssh.cpp.

◆ error()

TQCString SshProcess::error ( )
inline

Definition at line 65 of file ssh.h.

◆ exec()

int SshProcess::exec ( const char *  password,
int  check = 0 
)

Executes the command.

Definition at line 75 of file ssh.cpp.

◆ prompt()

TQCString SshProcess::prompt ( )
inline

Definition at line 64 of file ssh.h.

◆ setHost()

void SshProcess::setHost ( const TQCString &  host)
inline

Sets the target host.

Definition at line 37 of file ssh.h.

◆ setStub()

void SshProcess::setStub ( const TQCString &  stub)

Sets the localtion of the remote stub.

Definition at line 57 of file ssh.cpp.

◆ virtual_hook()

void SshProcess::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Reimplemented from StubProcess.

Definition at line 278 of file ssh.cpp.


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

tdesu

Skip menu "tdesu"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdesu

Skip menu "tdesu"
  • 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 tdesu by doxygen 1.9.4
This website is maintained by Timothy Pearson.