|
| ||||||||||||||||
| typedef XorpCallback2<void, RunCommand*, const string&>::RefPtr OutputCallback | OutputCallback |
| typedef XorpCallback3<void, RunCommand*, bool, const string&>::RefPtr DoneCallback | DoneCallback |
| RunCommand (EventLoop& eventloop,
const string& command,
const string& arguments,
RunCommand::OutputCallback stdout_cb,
RunCommand::OutputCallback stderr_cb,
RunCommand::DoneCallback done_cb)
| RunCommand |
Constructor for a given command and its arguments.
Parameters:
| eventloop | the event loop. |
| command | the command to execute. |
| arguments | the arguments for the command to execute. |
| stdout_cb | the callback to call when there is data on the standard output. |
| stderr_cb | the callback to call when there is data on the standard error. |
| done_cb | the callback to call when the command is completed. |
| ~RunCommand ()
| ~RunCommand |
| int execute ()
| execute |
Execute the command.
Returns: XORP_OK on success, otherwise XORP_ERROR.
| void terminate ()
| terminate |
| const string& command ()
| command |
[const]
Get the name of the command to execute.
Returns: a string with the name of the command to execute.
| const string& arguments ()
| arguments |
[const]
Get the arguments of the command to execute.
Returns: a string with the arguments of the command to execute.