#include <WFMSubAgent.h>
Public Member Functions | |
WFMSubAgent (const string &, int) | |
~WFMSubAgent () | |
bool | start () |
bool | start_and_check (bool, int *) |
string | get_name () const |
int | get_handle () const |
Y2Component * | comp () |
SCRAgent * | agent () |
Private Member Functions | |
WFMSubAgent (const WFMSubAgent &) | |
void | operator= (const WFMSubAgent &) |
Private Attributes | |
const string | my_name |
const int | my_handle |
Y2Component * | my_comp |
SCRAgent * | my_agent |
WFMSubAgent::WFMSubAgent | ( | const string & | name, | |
int | handle | |||
) |
Constructor for a subagent. Takes the name and handle as arguments.
WFMSubAgent::~WFMSubAgent | ( | ) |
Destructor for a subagent. Terminates the Y2Component if necessary.
References my_agent, my_comp, my_handle, my_name, Y2Component::result(), and y2milestone.
WFMSubAgent::WFMSubAgent | ( | const WFMSubAgent & | ) | [private] |
SCRAgent* WFMSubAgent::agent | ( | ) | [inline] |
Returns the SCRAgent of the subagent. This does not call start (). Is 0 if start () was not called or failed or the Y2Component does not support the getSCRAgent () function.
References Y2Component::getSCRAgent(), my_agent, and my_comp.
Referenced by Y2WFMComponent::createDefaultSCR(), Y2WFMComponent::Execute(), Y2WFMComponent::Read(), and Y2WFMComponent::Write().
Y2Component* WFMSubAgent::comp | ( | ) | [inline] |
Returns the Y2Component of the subagent. This does not call start (). Is 0 if start () was not called or failed.
References my_comp.
int WFMSubAgent::get_handle | ( | ) | const [inline] |
string WFMSubAgent::get_name | ( | ) | const [inline] |
Returns the name of the subagent.
References my_name.
void WFMSubAgent::operator= | ( | const WFMSubAgent & | ) | [private] |
bool WFMSubAgent::start | ( | ) |
Starts the subagent. Returns true on success otherwise false.
References Y2ComponentBroker::createServer(), my_agent, my_comp, my_handle, my_name, y2debug, and ycp2error.
Referenced by Y2WFMComponent::createDefaultSCR(), Y2WFMComponent::Execute(), Y2WFMComponent::Read(), start_and_check(), and Y2WFMComponent::Write().
bool WFMSubAgent::start_and_check | ( | bool | check_version, | |
int * | error | |||
) |
Starts the subagent and evaluates one term to ensure that the component is created (mainly for remote components). Can also check for the correct SuSE Version. Returns true on success otherwise false and sets the error number.
References Y2Component::evaluate(), YCPElement::isNull(), my_comp, start(), and y2debug.
Referenced by Y2WFMComponent::SCROpen().
SCRAgent* WFMSubAgent::my_agent [private] |
The agent if component does not provide one
Referenced by agent(), start(), and ~WFMSubAgent().
Y2Component* WFMSubAgent::my_comp [private] |
The component.
Referenced by agent(), comp(), start(), start_and_check(), and ~WFMSubAgent().
const int WFMSubAgent::my_handle [private] |
The handle.
Referenced by get_handle(), start(), and ~WFMSubAgent().
const string WFMSubAgent::my_name [private] |
The name.
Referenced by get_name(), start(), and ~WFMSubAgent().