#include <Y2StdioComponent.h>
Inheritance diagram for Y2StdioComponent:
Public Member Functions | |
Y2StdioComponent (bool is_server, bool to_stderr, bool in_batchmode=false) | |
~Y2StdioComponent () | |
string | name () const |
YCPValue | evaluate (const YCPValue &command) |
void | result (const YCPValue &result) |
void | setServerOptions (int argc, char **argv) |
YCPValue | doActualWork (const YCPList &arglist, Y2Component *user_interface) |
Private Member Functions | |
void | send (const YCPValue &v) const |
YCPValue | receive () |
Private Attributes | |
const bool | is_server |
bool | to_stderr |
bool | batchmode |
Parser | parser |
|
Creates a new cat/stdio component.
|
|
Cleans up |
|
Here the client does its actual work.
Reimplemented from Y2Component. |
|
Defined only for the "cat" component: Prints a command to stdout and waits for the answer on stdin. Reimplemented from Y2Component. |
|
Returns "cat", if this is a server, or "stdio" if it's a module. Implements Y2Component. |
|
Reads one YCP value from stdin. Return 0 if no one could be read. |
|
Defined only for the "cat" component: Prints result(..result..) on stdout. Reimplemented from Y2Component. |
|
Sends a YCP value to stdout. |
|
Sets the commandline options of the server. Server options for the cat server are simply ignored. This method is only defined, if the component is a server. Reimplemented from Y2Component. |
|
If true, we're running in batchmode (i.e testsuite) As a client (called via doActualWork()) nothing changes As a server (called via evaluate()) no input is read |
|
It this component a server or a client? |
|
Parser used to parse stdin |
|
If true, this is the 'stderr' component, which reads from stdin, but writes to stderr. |