Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

RshProtocol Class Reference

#include <RshProtocol.h>

Inheritance diagram for RshProtocol:

RemoteProtocol ExternalProgram ExternalDataSource List of all members.

Public Member Functions

 RshProtocol (bool is_server, std::string loginname, std::string hostname, std::string componentname, std::string shell)
callStatus callComponent (std::string password="", bool passwd_supplied=false)
bool doesEcho () const

Private Attributes

const bool is_server
std::string used_shell
std::string loginname
std::string componentname
bool at_password_prompt

Constructor & Destructor Documentation

RshProtocol::RshProtocol bool  is_server,
std::string  loginname,
std::string  hostname,
std::string  componentname,
std::string  shell
 

Create an *sh session

Parameters:
user_interface the user interface in case the user must be asked for the password
loginname the username for the login
hostname the host to log into
componentname component to start on the remote machine
shell the shell used to go to the remote machine (rsh or such like)


Member Function Documentation

RemoteProtocol::callStatus RshProtocol::callComponent std::string  password = "",
bool  passwd_supplied = false
[virtual]
 

Tries to do the handshake, this is supply password, enter loginname and answer other interactive questions. Also starts the Y2 component on the other machine.

Parameters:
password A password for the login.
bool passwd_supplied This flag determines whether the password given should be used.
Returns:
RP_OK, if the remote component is now running, RP_PASSWD, if the protocol needs a login password (provide a password and try again) or RP_ERROR, if an unrecoverable error occured.

Implements RemoteProtocol.

bool RshProtocol::doesEcho  )  const [virtual]
 

Returns true, if output is output appears at input again.

Implements RemoteProtocol.


Member Data Documentation

bool RshProtocol::at_password_prompt [private]
 

Set to true, if *sh just asked for the password and we haven't answered yet.

std::string RshProtocol::componentname [private]
 

const bool RshProtocol::is_server [private]
 

std::string RshProtocol::loginname [private]
 

std::string RshProtocol::used_shell [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 18:15:24 2007 for yast2-core by doxygen 1.3.6