|
yast2-core
|
SCR Agent for testing. More...
#include <DummyAgent.h>
Public Member Functions | |
| DummyAgent () | |
| YCPValue | Read (const YCPPath &path, const YCPValue &arg=YCPNull(), const YCPValue &opt=YCPNull()) |
| YCPBoolean | Write (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull()) |
| YCPValue | Execute (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull()) |
| YCPList | Dir (const YCPPath &path) |
| YCPValue | otherCommand (const YCPTerm &term) |
Public Member Functions inherited from SCRAgent | |
| SCRAgent () | |
| virtual | ~SCRAgent () |
| virtual YCPMap | Error (const YCPPath &) |
| virtual YCPBoolean | RegisterAgent (const YCPPath &path, const YCPValue &) |
| virtual YCPBoolean | UnregisterAgent (const YCPPath &path) |
| virtual YCPBoolean | UnregisterAllAgents () |
| virtual YCPBoolean | UnmountAgent (const YCPPath &) |
| virtual YCPBoolean | RegisterNewAgents () |
| virtual const char * | root () const |
| void | setAsCurrentSCR () |
| string | targetPath (const string &path) const |
Private Member Functions | |
| YCPValue | checkPath (const YCPPath &path, const YCPMap &map, const YCPValue &defaultVal) |
Private Attributes | |
| YCPList | readList |
| YCPList | writeList |
| YCPList | execList |
| YCPValue | defaultValue |
| YCPMap | defaultMap |
| int | readCalls |
| int | writeCalls |
| int | execCalls |
Additional Inherited Members | |
Static Public Member Functions inherited from SCRAgent | |
| static YCPValue | readconf (const char *filename) |
| static SCRAgent * | instance () |
Public Attributes inherited from SCRAgent | |
| SCRAgent * | mainscragent |
SCR Agent for testing.
| DummyAgent::DummyAgent | ( | ) |
Constructor
|
private |
Check if the given path is valid and return the correct value
References YCPElement::isNull(), YCPMap::value(), y2debug, and y2warning.
Get a list of all subtrees.
Dummy 'Dir' function
Implements SCRAgent.
References YCPList::add(), checkPath(), defaultValue, DUMMY_LOG_STRING, YCPList::isEmpty(), YCPElement::isNull(), readCalls, readList, YCPList::value(), and ycpdebug.
|
virtual |
Execute a program. Destroy the result after use.
Dummy 'Execute' function
Reimplemented from SCRAgent.
References checkPath(), defaultMap, DUMMY_LOG_STRING, execCalls, execList, YCPList::isEmpty(), YCPElement::isNull(), YCPList::size(), YCPList::value(), and ycpdebug.
Evaluates the DataMap() command
Parse options and prepare internal structures
Reimplemented from SCRAgent.
References YCPList::add(), defaultValue, execList, YCPTerm::name(), readList, YCPTerm::size(), YCPTerm::value(), writeList, and y2error.
|
virtual |
Reads data. Destroy the result after use.
| path | Specifies what part of the subtree should be read. The path is specified relatively to Root()! |
Dummy 'Read' function
Implements SCRAgent.
References checkPath(), defaultMap, defaultValue, DUMMY_LOG_STRING, YCPList::isEmpty(), YCPElement::isNull(), readCalls, readList, YCPList::size(), YCPList::value(), and ycpdebug.
|
virtual |
Writes data. Destroy the result after use.
Dummy 'Write' function
Implements SCRAgent.
References checkPath(), defaultMap, DUMMY_LOG_STRING, YCPList::isEmpty(), YCPElement::isNull(), YCPList::size(), YCPList::value(), writeCalls, writeList, and ycpdebug.
|
private |
default value if path has no match in dataMap
Referenced by Dir(), otherCommand(), and Read().
|
private |
Referenced by Execute().
|
private |
Referenced by Execute(), and otherCommand().
|
private |
|
private |
data map from agent initialization
Referenced by Dir(), otherCommand(), and Read().
|
private |
Referenced by Write().
|
private |
Referenced by otherCommand(), and Write().
1.8.6