• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEsu

KDESu::SshProcess

KDESu::SshProcess Class Reference

Executes a remote command, using ssh. More...

#include <kdesu/ssh.h>

Inheritance diagram for KDESu::SshProcess:

Inheritance graph
[legend]

List of all members.


Public Types

enum  Errors { SshNotFound = 1, SshNeedsPassword, SshIncorrectPassword }

Public Member Functions

int checkInstall (const char *password)
int checkNeedPassword ()
QByteArray error () const
int exec (const char *password, int check=0)
QByteArray prompt () const
void setHost (const QByteArray &host)
void setStub (const QByteArray &stub)
 SshProcess (const QByteArray &host=QByteArray(), const QByteArray &user=QByteArray(), const QByteArray &command=QByteArray())
 ~SshProcess ()

Protected Member Functions

virtual QByteArray display ()
virtual QByteArray displayAuth ()
virtual void virtual_hook (int id, void *data)

Detailed Description

Executes a remote command, using ssh.

Definition at line 24 of file ssh.h.


Member Enumeration Documentation

enum KDESu::SshProcess::Errors

Enumerator:
SshNotFound 
SshNeedsPassword 
SshIncorrectPassword 

Definition at line 32 of file ssh.h.


Constructor & Destructor Documentation

KDESu::SshProcess::SshProcess ( const QByteArray &  host = QByteArray(),
const QByteArray &  user = QByteArray(),
const QByteArray &  command = QByteArray() 
) [explicit]

Definition at line 55 of file ssh.cpp.

KDESu::SshProcess::~SshProcess (  ) 

Definition at line 64 of file ssh.cpp.


Member Function Documentation

int KDESu::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 81 of file ssh.cpp.

int KDESu::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 87 of file ssh.cpp.

QByteArray KDESu::SshProcess::display (  )  [protected, virtual]

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

By default, it returns the value returned by KCookie.

Reimplemented from KDESu::StubProcess.

Definition at line 245 of file ssh.cpp.

QByteArray KDESu::SshProcess::displayAuth (  )  [protected, virtual]

See display.

Reimplemented from KDESu::StubProcess.

Definition at line 251 of file ssh.cpp.

QByteArray KDESu::SshProcess::error (  )  const

Definition at line 158 of file ssh.cpp.

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

Executes the command.

Definition at line 93 of file ssh.cpp.

QByteArray KDESu::SshProcess::prompt (  )  const

Definition at line 153 of file ssh.cpp.

void KDESu::SshProcess::setHost ( const QByteArray &  host  ) 

Sets the target host.

Definition at line 69 of file ssh.cpp.

void KDESu::SshProcess::setStub ( const QByteArray &  stub  ) 

Sets the localtion of the remote stub.

Definition at line 75 of file ssh.cpp.

void KDESu::SshProcess::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Standard hack to add virtual methods in a BC way.

Unused.

Reimplemented from KDESu::StubProcess.

Definition at line 256 of file ssh.cpp.


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

KDEsu

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal