class RunCommand

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

 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:

eventloopthe event loop.
commandthe command to execute.
argumentsthe 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.
 ~RunCommand ()

~RunCommand

Destructor.

int  execute ()

execute

Execute the command.

Returns: XORP_OK on success, otherwise XORP_ERROR.

void  terminate ()

terminate

Terminate the command.

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.


Generated by: pavlin on possum.icir.org on Wed Apr 13 21:52:49 2005, using kdoc $.