class RunCommand

A class for running an external command. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

typedef XorpCallback2<void, RunCommand*, const string&>::RefPtr OutputCallback

OutputCallback

typedef XorpCallback3<void, RunCommand*, bool, const string&>::RefPtr DoneCallback

DoneCallback

typedef XorpCallback2<void, RunCommand*, int>::RefPtr StoppedCallback

StoppedCallback

 RunCommand (EventLoop& eventloop, const string& command, const list<string>& argument_list, RunCommand::OutputCallback stdout_cb, RunCommand::OutputCallback stderr_cb, RunCommand::DoneCallback done_cb, bool redirect_stderr_to_stdout, int task_priority = XorpTask::PRIORITY_DEFAULT)

RunCommand

Constructor for a given command and its list with arguments.

Parameters:

eventloopthe event loop.
commandthe command to execute.
argument_listthe list with the arguments for the command to execute.
stdout_cbthe callback to call when there is data on the standard output.
stderr_cbthe callback to call when there is data on the standard error.
done_cbthe callback to call when the command is completed.
redirect_stderr_to_stdoutif true redirect the stderr to stdout.
task_prioritythe priority to read stdout and stderr.
void  set_stopped_cb (StoppedCallback cb)

set_stopped_cb

Set the callback to dispatch when the program is stopped.

Parameters:

cbthe callback's value.

Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:10:36 2009, using kdoc 2.0a54+XORP.