toolkit/components/commandlines/nsICommandLineRunner.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "nsISupports.idl"
michael@0 6 #include "nsICommandLine.idl"
michael@0 7
michael@0 8 [ptr] native nsArgvArray(const char* const);
michael@0 9
michael@0 10 /**
michael@0 11 * Extension of nsICommandLine that allows for initialization of new command lines
michael@0 12 * and running the command line actions by processing the command line handlers.
michael@0 13 *
michael@0 14 * @status INTERNAL - This interface is not meant for use by embedders, and is
michael@0 15 * not intended to be frozen. If you are an embedder and need
michael@0 16 * functionality provided by this interface, talk to Benjamin
michael@0 17 * Smedberg <benjamin@smedbergs.us>.
michael@0 18 */
michael@0 19
michael@0 20 [uuid(c9f2996c-b25a-4d3d-821f-4cd0c4bc8afb)]
michael@0 21 interface nsICommandLineRunner : nsICommandLine
michael@0 22 {
michael@0 23 /**
michael@0 24 * This method assumes a native character set, and is meant to be called
michael@0 25 * with the argc/argv passed to main(). Talk to bsmedberg if you need to
michael@0 26 * create a command line using other data. argv will not be altered in any
michael@0 27 * way.
michael@0 28 *
michael@0 29 * On Windows, the "native" character set is UTF-8, not the native codepage.
michael@0 30 *
michael@0 31 * @param workingDir The working directory for resolving file and URI paths.
michael@0 32 * @param state The nsICommandLine.state flag.
michael@0 33 */
michael@0 34 void init(in long argc, in nsArgvArray argv,
michael@0 35 in nsIFile workingDir, in unsigned long state);
michael@0 36
michael@0 37 /**
michael@0 38 * Set the windowContext parameter.
michael@0 39 */
michael@0 40 void setWindowContext(in nsIDOMWindow aWindow);
michael@0 41
michael@0 42 /**
michael@0 43 * Process the command-line handlers in the proper order, calling "handle()" on
michael@0 44 * each.
michael@0 45 *
michael@0 46 * @throws NS_ERROR_ABORT if any handler throws NS_ERROR_ABORT. All other errors
michael@0 47 * thrown by handlers will be silently ignored.
michael@0 48 */
michael@0 49 void run();
michael@0 50
michael@0 51 /**
michael@0 52 * Process and combine the help text provided by each command-line handler.
michael@0 53 */
michael@0 54 readonly attribute AUTF8String helpText;
michael@0 55 };

mercurial