sbProcess Class Reference

#include <sbProcess.h>

Inheritance diagram for sbProcess:
Collaboration diagram for sbProcess:

Public Member Functions

nsresult Run ()
nsresult Kill ()
virtual ~sbProcess ()
nsresult GetArgList (nsTArray< nsString > &aArgList)
nsresult SetArgList (const nsTArray< nsString > &aArgList)
nsresult GetStdinString (nsAString &aStdinString)
nsresult SetStdinString (const nsAString &aStdinString)
nsresult GetStdoutString (nsAString &aStdoutString)
nsresult GetPipeStdoutString (PRBool *aPipeStdoutString)
nsresult SetPipeStdoutString (PRBool aPipeStdoutString)
nsresult GetDoneMonitor (PRMonitor **aDoneMonitor)
nsresult SetDoneMonitor (PRMonitor *aDoneMonitor)
nsresult GetIsDone (PRBool *aIsDone)
nsresult GetDoneResult (nsresult *aDoneResult)
nsresult GetExitCode (PRInt32 *aExitCode)

Static Public Member Functions

static NS_DECL_ISUPPORTS nsresult New (sbProcess **aProcess)

Detailed Description

This class implements a Songbird process.

XXXeps TODO: Make this a full-blown component so JS can use it. XXXeps TODO: Add support for providing a done callback as well as a monitor This callback should be an sbI*Callback declared as a function interface so JS code can pass a JS function as a callback.

Definition at line 78 of file sbProcess.h.

Constructor & Destructor Documentation

sbProcess::~sbProcess ( )

Destroy a process object.

Definition at line 269 of file sbProcess.cpp.

Here is the call graph for this function:

Member Function Documentation

nsresult sbProcess::GetArgList ( nsTArray< nsString > &  aArgList)

The list of process command line arguments. The first argument in the list is the name of the process executable.

Definition at line 307 of file sbProcess.cpp.

nsresult sbProcess::GetDoneMonitor ( PRMonitor **  aDoneMonitor)

Monitor to apply to the Songbird process done flag. The monitor will be notified when the done condition changes.

Monitor that will be notified when the process is done.

Definition at line 435 of file sbProcess.cpp.

nsresult sbProcess::GetDoneResult ( nsresult *  aDoneResult)

Songbird process object end result when done. Only valid when done is true.

Process end result when done. Only valid when done is true.

Definition at line 493 of file sbProcess.cpp.

nsresult sbProcess::GetExitCode ( PRInt32 *  aExitCode)

Process exit code. Only valid if process is done with a successful result.

Definition at line 513 of file sbProcess.cpp.

nsresult sbProcess::GetIsDone ( PRBool *  aIsDone)

If true, the Songbird process is done. The Songbird process is done when either the underlying process has exited or after an internal error occurs. If the Songbird process finishes due to process exit, the done result will be NS_OK, and the process exit code will be valid. If an internal error occurs, it will be set in the done result and the process exit code will not be valid.

Definition at line 473 of file sbProcess.cpp.

nsresult sbProcess::GetPipeStdoutString ( PRBool *  aPipeStdoutString)

If true, the process stdout will be piped to the output string.

Definition at line 402 of file sbProcess.cpp.

nsresult sbProcess::GetStdinString ( nsAString &  aStdinString)

The string that will be piped to the process stdin.

Definition at line 346 of file sbProcess.cpp.

nsresult sbProcess::GetStdoutString ( nsAString &  aStdoutString)

The string that was piped from the process stdout.

Definition at line 381 of file sbProcess.cpp.

nsresult sbProcess::Kill ( )

Kill the process.

Definition at line 242 of file sbProcess.cpp.

Here is the caller graph for this function:

nsresult sbProcess::New ( sbProcess **  aProcess)

Create a new process object and return it in aProcess.

aProcessReturned created process object.

Definition at line 87 of file sbProcess.cpp.

Here is the caller graph for this function:

nsresult sbProcess::Run ( )

Start running the process.

Definition at line 112 of file sbProcess.cpp.

nsresult sbProcess::SetArgList ( const nsTArray< nsString > &  aArgList)

Definition at line 324 of file sbProcess.cpp.

nsresult sbProcess::SetDoneMonitor ( PRMonitor *  aDoneMonitor)

Definition at line 450 of file sbProcess.cpp.

nsresult sbProcess::SetPipeStdoutString ( PRBool  aPipeStdoutString)

Definition at line 417 of file sbProcess.cpp.

nsresult sbProcess::SetStdinString ( const nsAString &  aStdinString)

Definition at line 362 of file sbProcess.cpp.

The documentation for this class was generated from the following files: