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

SuProtocol Class Reference

#include <SuProtocol.h>

Inheritance diagram for SuProtocol:

RemoteProtocol ExternalProgram ExternalDataSource List of all members.

Public Member Functions

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

Private Attributes

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

Constructor & Destructor Documentation

SuProtocol::SuProtocol bool  is_server,
std::string  loginname,
std::string  componentname
 

Create a su session

Parameters:
user_interface the user interface in case the user must be asked for the password
loginname the username for the login
componentname component to start on the remote machine


Member Function Documentation

RemoteProtocol::callStatus SuProtocol::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 SuProtocol::doesEcho  )  const [virtual]
 

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

Implements RemoteProtocol.


Member Data Documentation

bool SuProtocol::at_password_prompt [private]
 

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

std::string SuProtocol::componentname [private]
 

const bool SuProtocol::is_server [private]
 

std::string SuProtocol::loginname [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