ssh.h
/* vi: ts=8 sts=4 sw=4
*
* $Id: ssh.h 433124 2005-07-09 19:01:03Z adridg $
*
* This file is part of the KDE project, module kdesu.
* Copyright (C) 2000 Geert Jansen <jansen@kde.org>
*
* This is free software; you can use this library under the GNU Library
* General Public License, version 2. See the file "COPYING.LIB" for the
* exact licensing terms.
*/
#ifndef __SSH_h_Included__
#define __SSH_h_Included__
#include <qcstring.h>
#include "stub.h"
#include <kdelibs_export.h>
class KDESU_EXPORT SshProcess: public StubProcess
{
public:
SshProcess(const QCString &host=0, const QCString &user=0, const QCString &command=0);
~SshProcess();
enum Errors { SshNotFound=1, SshNeedsPassword, SshIncorrectPassword };
void setHost(const QCString &host) { m_Host = host; }
void setStub(const QCString &stub);
int checkNeedPassword();
int checkInstall(const char *password);
int exec(const char *password, int check=0);
QCString prompt() { return m_Prompt; }
QCString error() { return m_Error; }
protected:
virtual QCString display();
virtual QCString displayAuth();
virtual QCString dcopServer();
private:
QCString dcopForward();
int ConverseSsh(const char *password, int check);
int m_dcopPort;
int m_dcopSrv;
QCString m_Prompt;
QCString m_Host;
QCString m_Error;
QCString m_Stub;
protected:
virtual void virtual_hook( int id, void* data );
private:
class SshProcessPrivate;
SshProcessPrivate *d;
};
#endif
StubProcess
Chat with kdesu_stub.
Definition: stub.h:32
StubProcess::dcopServer
virtual QCString dcopServer()
See display.
Definition: stub.h:110
PtyProcess::exec
int exec(const QCString &command, const QCStringList &args)
Forks off and execute a command.
Definition: process.cpp:324
SshProcess::setHost
void setHost(const QCString &host)
Sets the target host.
Definition: ssh.h:37
SshProcess
Executes a remote command, using ssh.
Definition: ssh.h:26
StubProcess::display
virtual QCString display()
This virtual function can be overloaded when special behavior is desired.
Definition: stub.h:100

KDE Home | KDE Accessibility Home | Description of Access Keys