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

Y2RemoteComponent Class Reference

Interface to a component via remote login. More...

#include <Y2RemoteComponent.h>

Inheritance diagram for Y2RemoteComponent:

Y2Component List of all members.

Public Member Functions

 Y2RemoteComponent (bool is_server, string protocol, string loginname, string hostname, string password, string componentname)
string name () const
YCPValue evaluate (const YCPValue &command)
YCPValue doActualWork (const YCPList &arglist, Y2Component *user_interface)

Private Member Functions

void send (const YCPValue &v, bool eat_echo)
YCPValue receive ()
bool initTelnetSession (class ExternalProgram &)
string askPassword (bool &ok)
bool analyseURL (string)
bool connect ()

Private Attributes

const bool is_server
Y2Componentuser_interface
string protocol
string loginname
string password
string hostname
string componentname
RemoteProtocolrp
Parser parser
bool is_up

Detailed Description

Interface to a component via remote login.


Constructor & Destructor Documentation

Y2RemoteComponent::Y2RemoteComponent bool  is_server,
string  protocol,
string  loginname,
string  hostname,
string  password,
string  componentname
 

Creates a new remote component.


Member Function Documentation

bool Y2RemoteComponent::analyseURL string   )  [private]
 

string Y2RemoteComponent::askPassword bool &  ok  )  [private]
 

Ask the user for the password.

Parameters:
ok I set this value to false, if the user pressed 'cancel' otherwise I'll set it to true.
Returns:
the typed in password

bool Y2RemoteComponent::connect  )  [private]
 

YCPValue Y2RemoteComponent::doActualWork const YCPList arglist,
Y2Component user_interface
[virtual]
 

Here the client does its actual work.

Parameters:
arglist YCPList of client arguments.
user_interface Option display server (user interface)
Returns:
The result value (exit code) of the called client. The result code has not yet been sent to the display server. Destroy it after use.
This method is only defined, if the component is a client.

Reimplemented from Y2Component.

YCPValue Y2RemoteComponent::evaluate const YCPValue command  )  [virtual]
 

Starts the server, if it is not already started and does what a server is good for: Gets a command, evaluates (or executes) it and returns the result.

Parameters:
command The command to be executed. Any YCPValueRep can be executed. The execution is performed by some YCPInterpreter.
Returns:
the result. Destroy it after use with YCPElementRep::destroy.
This method is only defined, if the component is a server. Or a client which does support callbacks.

Reimplemented from Y2Component.

bool Y2RemoteComponent::initTelnetSession class ExternalProgram  )  [private]
 

Initiates a telnet session

string Y2RemoteComponent::name  )  const [virtual]
 

Returns the name of the module.

Implements Y2Component.

YCPValue Y2RemoteComponent::receive  )  [private]
 

Receive a YCP value from the remote component.

void Y2RemoteComponent::send const YCPValue v,
bool  eat_echo
[private]
 

Sends a YCP value to the remote component.


Member Data Documentation

string Y2RemoteComponent::componentname [private]
 

string Y2RemoteComponent::hostname [private]
 

const bool Y2RemoteComponent::is_server [private]
 

It this component a server or a client?

bool Y2RemoteComponent::is_up [private]
 

Is the remote connection up so that we can send callbacks there?

string Y2RemoteComponent::loginname [private]
 

Parser Y2RemoteComponent::parser [private]
 

The parser.

string Y2RemoteComponent::password [private]
 

string Y2RemoteComponent::protocol [private]
 

RemoteProtocol* Y2RemoteComponent::rp [private]
 

The remote protocol.

Y2Component* Y2RemoteComponent::user_interface [private]
 

Access to the user interface


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