michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsICommandLine.idl" michael@0: michael@0: [ptr] native nsArgvArray(const char* const); michael@0: michael@0: /** michael@0: * Extension of nsICommandLine that allows for initialization of new command lines michael@0: * and running the command line actions by processing the command line handlers. michael@0: * michael@0: * @status INTERNAL - This interface is not meant for use by embedders, and is michael@0: * not intended to be frozen. If you are an embedder and need michael@0: * functionality provided by this interface, talk to Benjamin michael@0: * Smedberg . michael@0: */ michael@0: michael@0: [uuid(c9f2996c-b25a-4d3d-821f-4cd0c4bc8afb)] michael@0: interface nsICommandLineRunner : nsICommandLine michael@0: { michael@0: /** michael@0: * This method assumes a native character set, and is meant to be called michael@0: * with the argc/argv passed to main(). Talk to bsmedberg if you need to michael@0: * create a command line using other data. argv will not be altered in any michael@0: * way. michael@0: * michael@0: * On Windows, the "native" character set is UTF-8, not the native codepage. michael@0: * michael@0: * @param workingDir The working directory for resolving file and URI paths. michael@0: * @param state The nsICommandLine.state flag. michael@0: */ michael@0: void init(in long argc, in nsArgvArray argv, michael@0: in nsIFile workingDir, in unsigned long state); michael@0: michael@0: /** michael@0: * Set the windowContext parameter. michael@0: */ michael@0: void setWindowContext(in nsIDOMWindow aWindow); michael@0: michael@0: /** michael@0: * Process the command-line handlers in the proper order, calling "handle()" on michael@0: * each. michael@0: * michael@0: * @throws NS_ERROR_ABORT if any handler throws NS_ERROR_ABORT. All other errors michael@0: * thrown by handlers will be silently ignored. michael@0: */ michael@0: void run(); michael@0: michael@0: /** michael@0: * Process and combine the help text provided by each command-line handler. michael@0: */ michael@0: readonly attribute AUTF8String helpText; michael@0: };