mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 480427: Remove nsIProcess2 from trunk. r=bsmedberg
This commit is contained in:
parent
7dcbe3a3ca
commit
a6ed3ddf12
@ -133,7 +133,7 @@ function test_notify_blocking()
|
||||
var file = get_test_program("TestQuickReturn");
|
||||
|
||||
var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
.createInstance(Components.interfaces.nsIProcess2);
|
||||
.createInstance(Components.interfaces.nsIProcess);
|
||||
process.init(file);
|
||||
|
||||
process.runAsync([], 0, {
|
||||
@ -152,7 +152,7 @@ function test_notify_nonblocking()
|
||||
var file = get_test_program("TestArguments");
|
||||
|
||||
var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
.createInstance(Components.interfaces.nsIProcess2);
|
||||
.createInstance(Components.interfaces.nsIProcess);
|
||||
process.init(file);
|
||||
|
||||
process.runAsync(["mozilla"], 1, {
|
||||
@ -171,7 +171,7 @@ function test_notify_killed()
|
||||
var file = get_test_program("TestBlockingProcess");
|
||||
|
||||
var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
.createInstance(Components.interfaces.nsIProcess2);
|
||||
.createInstance(Components.interfaces.nsIProcess);
|
||||
process.init(file);
|
||||
|
||||
process.runAsync([], 0, {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
interface nsIObserver;
|
||||
|
||||
[scriptable, uuid(d573f1f3-fcdd-4dbe-980b-4ba79e6718dc)]
|
||||
[scriptable, uuid(3c09efde-5f49-42b8-8520-57be02a5f84e)]
|
||||
interface nsIProcess : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -13,11 +13,6 @@ interface nsIProcess : nsISupports
|
||||
*/
|
||||
void init(in nsIFile executable);
|
||||
|
||||
/**
|
||||
* Not implemented. Will be removed in a future version of this interface.
|
||||
*/
|
||||
void initWithPid(in unsigned long pid);
|
||||
|
||||
/**
|
||||
* Kills the running process. After exiting the process will either have
|
||||
* been killed or a failure will have been returned.
|
||||
@ -35,42 +30,6 @@ interface nsIProcess : nsISupports
|
||||
void run(in boolean blocking, [array, size_is(count)] in string args,
|
||||
in unsigned long count);
|
||||
|
||||
/**
|
||||
* Not implemented. Will be removed in a future version of this interface.
|
||||
*/
|
||||
readonly attribute nsIFile location;
|
||||
|
||||
/**
|
||||
* The process identifier of the currently running process. This will only
|
||||
* be available after the process has started and may not be available on
|
||||
* some platforms.
|
||||
*/
|
||||
readonly attribute unsigned long pid;
|
||||
|
||||
/**
|
||||
* Not implemented. Will be removed in a future version of this interface.
|
||||
*/
|
||||
readonly attribute string processName;
|
||||
/**
|
||||
* Not implemented. Will be removed in a future version of this interface.
|
||||
*/
|
||||
readonly attribute unsigned long processSignature;
|
||||
|
||||
/**
|
||||
* The exit value of the process. This is only valid after the process has
|
||||
* exited.
|
||||
*/
|
||||
readonly attribute long exitValue;
|
||||
|
||||
/**
|
||||
* Returns whether the process is currently running or not.
|
||||
*/
|
||||
readonly attribute boolean isRunning;
|
||||
};
|
||||
|
||||
[scriptable, uuid(7d362c71-308e-4724-b1eb-8451fe133026)]
|
||||
interface nsIProcess2 : nsIProcess
|
||||
{
|
||||
/**
|
||||
* Executes the file this object was initialized with optionally calling
|
||||
* an observer after the process has finished running.
|
||||
@ -85,6 +44,24 @@ interface nsIProcess2 : nsIProcess
|
||||
*/
|
||||
void runAsync([array, size_is(count)] in string args, in unsigned long count,
|
||||
[optional] in nsIObserver observer, [optional] in boolean holdWeak);
|
||||
|
||||
/**
|
||||
* The process identifier of the currently running process. This will only
|
||||
* be available after the process has started and may not be available on
|
||||
* some platforms.
|
||||
*/
|
||||
readonly attribute unsigned long pid;
|
||||
|
||||
/**
|
||||
* The exit value of the process. This is only valid after the process has
|
||||
* exited.
|
||||
*/
|
||||
readonly attribute long exitValue;
|
||||
|
||||
/**
|
||||
* Returns whether the process is currently running or not.
|
||||
*/
|
||||
readonly attribute boolean isRunning;
|
||||
};
|
||||
|
||||
%{C++
|
||||
|
@ -62,14 +62,13 @@
|
||||
{0x7b4eeb20, 0xd781, 0x11d4, \
|
||||
{0x8A, 0x83, 0x00, 0x10, 0xa4, 0xe0, 0xc9, 0xca}}
|
||||
|
||||
class nsProcess : public nsIProcess2,
|
||||
class nsProcess : public nsIProcess,
|
||||
public nsIObserver
|
||||
{
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPROCESS
|
||||
NS_DECL_NSIPROCESS2
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
nsProcess();
|
||||
|
@ -77,8 +77,7 @@
|
||||
//-------------------------------------------------------------------//
|
||||
// nsIProcess implementation
|
||||
//-------------------------------------------------------------------//
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS3(nsProcess, nsIProcess,
|
||||
nsIProcess2,
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(nsProcess, nsIProcess,
|
||||
nsIObserver)
|
||||
|
||||
//Constructor
|
||||
@ -470,17 +469,6 @@ NS_IMETHODIMP nsProcess::GetIsRunning(PRBool *aIsRunning)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsProcess::InitWithPid(PRUint32 pid)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProcess::GetLocation(nsIFile** aLocation)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProcess::GetPid(PRUint32 *aPid)
|
||||
{
|
||||
@ -492,18 +480,6 @@ nsProcess::GetPid(PRUint32 *aPid)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProcess::GetProcessName(char** aProcessName)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProcess::GetProcessSignature(PRUint32 *aProcessSignature)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProcess::Kill()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user