Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsISupports.idl" |
michael@0 | 8 | #include "nsICommandParams.idl" |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * nsIControllerCommand |
michael@0 | 12 | * |
michael@0 | 13 | * A generic command interface. You can register an nsIControllerCommand |
michael@0 | 14 | * with the nsIControllerCommandTable. |
michael@0 | 15 | */ |
michael@0 | 16 | |
michael@0 | 17 | [scriptable, uuid(0eae9a46-1dd2-11b2-aca0-9176f05fe9db)] |
michael@0 | 18 | interface nsIControllerCommand : nsISupports |
michael@0 | 19 | { |
michael@0 | 20 | |
michael@0 | 21 | /** |
michael@0 | 22 | * Returns true if the command is currently enabled. An nsIControllerCommand |
michael@0 | 23 | * can implement more than one commands; say, a group of related commands |
michael@0 | 24 | * (e.g. delete left/delete right). Because of this, the command name is |
michael@0 | 25 | * passed to each method. |
michael@0 | 26 | * |
michael@0 | 27 | * @param aCommandName the name of the command for which we want the enabled |
michael@0 | 28 | * state. |
michael@0 | 29 | * @param aCommandContext a cookie held by the nsIControllerCommandTable, |
michael@0 | 30 | * allowing the command to get some context information. |
michael@0 | 31 | * The contents of this cookie are implementation-defined. |
michael@0 | 32 | */ |
michael@0 | 33 | boolean isCommandEnabled(in string aCommandName, in nsISupports aCommandContext); |
michael@0 | 34 | |
michael@0 | 35 | void getCommandStateParams(in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); |
michael@0 | 36 | |
michael@0 | 37 | /** |
michael@0 | 38 | * Execute the name command. |
michael@0 | 39 | * |
michael@0 | 40 | * @param aCommandName the name of the command to execute. |
michael@0 | 41 | * |
michael@0 | 42 | * @param aCommandContext a cookie held by the nsIControllerCommandTable, |
michael@0 | 43 | * allowing the command to get some context information. |
michael@0 | 44 | * The contents of this cookie are implementation-defined. |
michael@0 | 45 | */ |
michael@0 | 46 | void doCommand(in string aCommandName, in nsISupports aCommandContext); |
michael@0 | 47 | |
michael@0 | 48 | void doCommandParams(in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); |
michael@0 | 49 | |
michael@0 | 50 | }; |
michael@0 | 51 |