yast2-core
Public Member Functions | Private Attributes | List of all members
StdioSCRAgent Class Reference

#include <StdioSCRAgent.h>

Inheritance diagram for StdioSCRAgent:
SCRAgent

Public Member Functions

 StdioSCRAgent (Y2Component *handler)
 
 ~StdioSCRAgent ()
 
virtual YCPValue Read (const YCPPath &path, const YCPValue &arg=YCPNull(), const YCPValue &opt=YCPNull())
 
virtual YCPBoolean Write (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull())
 
virtual YCPList Dir (const YCPPath &path)
 
virtual YCPValue Execute (const YCPPath &path, const YCPValue &value=YCPNull(), const YCPValue &arg=YCPNull())
 
virtual YCPMap Error (const YCPPath &path)
 
virtual YCPBoolean RegisterAgent (const YCPPath &path, const YCPValue &value)
 
virtual YCPBoolean UnregisterAgent (const YCPPath &path)
 
YCPValue otherCommand (const YCPTerm &term)
 
- Public Member Functions inherited from SCRAgent
 SCRAgent ()
 
virtual ~SCRAgent ()
 
virtual YCPBoolean UnregisterAllAgents ()
 
virtual YCPBoolean UnmountAgent (const YCPPath &)
 
virtual YCPBoolean RegisterNewAgents ()
 
void setAsCurrentSCR ()
 

Private Attributes

Y2Componentm_handler
 

Additional Inherited Members

- Static Public Member Functions inherited from SCRAgent
static YCPValue readconf (const char *filename)
 
static SCRAgentinstance ()
 
- Public Attributes inherited from SCRAgent
SCRAgentmainscragent
 

Detailed Description

This agent is a proxy, which transforms a direct builtin call into Y2Component::evaluate () call.

Constructor & Destructor Documentation

StdioSCRAgent::StdioSCRAgent ( Y2Component handler)
inline
StdioSCRAgent::~StdioSCRAgent ( )
inline

Member Function Documentation

YCPList StdioSCRAgent::Dir ( const YCPPath path)
virtual

Get a list of all subtrees.

Implements SCRAgent.

References YCPTerm::add(), Y2Component::evaluate(), YCPElement::isNull(), m_handler, y2debug, and ycp2error.

YCPMap StdioSCRAgent::Error ( const YCPPath path)
virtual

Get a detailed error description if a previous command failed

Reimplemented from SCRAgent.

References YCPTerm::add(), Y2Component::evaluate(), YCPElement::isNull(), m_handler, y2debug, and ycp2error.

YCPValue StdioSCRAgent::Execute ( const YCPPath path,
const YCPValue value = YCPNull (),
const YCPValue arg = YCPNull () 
)
virtual

Executes a command.

Reimplemented from SCRAgent.

References YCPTerm::add(), Y2Component::evaluate(), YCPElement::isNull(), m_handler, and y2debug.

YCPValue StdioSCRAgent::otherCommand ( const YCPTerm term)
virtual

Handle the commands 'UnregisterAllAgents', 'MountAgent', 'MountAllAgents', 'UnmountAgent' and 'UnmountAllAgents'.

Reimplemented from SCRAgent.

References m_handler, and y2error.

YCPValue StdioSCRAgent::Read ( const YCPPath path,
const YCPValue arg = YCPNull (),
const YCPValue opt = YCPNull () 
)
virtual

Reads data. Destroy the result after use.

Parameters
pathSpecifies what part of the subtree should be read. The path is specified relatively to Root()!

Implements SCRAgent.

References YCPTerm::add(), Y2Component::evaluate(), YCPElement::isNull(), m_handler, and y2debug.

YCPBoolean StdioSCRAgent::RegisterAgent ( const YCPPath path,
const YCPValue value 
)
virtual

Register an agent

Reimplemented from SCRAgent.

References YCPTerm::add(), Y2Component::evaluate(), YCPElement::isNull(), m_handler, y2debug, and ycp2error.

YCPBoolean StdioSCRAgent::UnregisterAgent ( const YCPPath path)
virtual

Unregister an agent

Reimplemented from SCRAgent.

References YCPTerm::add(), Y2Component::evaluate(), YCPElement::isNull(), m_handler, y2debug, and ycp2error.

YCPBoolean StdioSCRAgent::Write ( const YCPPath path,
const YCPValue value,
const YCPValue arg = YCPNull () 
)
virtual

Writes data. Destroy the result after use.

Implements SCRAgent.

References YCPTerm::add(), Y2Component::evaluate(), YCPElement::isNull(), m_handler, y2debug, and ycp2error.

Member Data Documentation

Y2Component* StdioSCRAgent::m_handler
private

The documentation for this class was generated from the following files:

Generated on a sunny day for yast2-core by doxygen 1.8.5