Linux Mac OSX Windows

Implemented by

 nsIControllerCommandTable
 
 An interface via which a controller can maintain a series of commands,
 and efficiently dispatch commands to their respective handlers.

 Controllers that use an nsIControllerCommandTable should support
 nsIInterfaceRequestor, and be able to return an interface to their
 controller command table via getInterface().
 
[scriptable, uuid(d1a47834-6ad4-11d7-bfad-000393636592)]
interface nsIControllerCommandTable : nsISupports

Methods

 Execute the named command.

 @param aCommandName    the name of the command to execute
 @param aCommandRefCon  the command context data
void doCommand(in string aCommandName, in nsISupports aCommandRefCon)

        
void doCommandParams(in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon)
 Find the command handler which has been registered to handle the named command.

 @param aCommandName  the name of the command to find the handler for.
nsIControllerCommand findCommandHandler(in string aCommandName)

        
void getCommandState(in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon)
 Get whether the named command is enabled.

 @param aCommandName    the name of the command to test
 @param aCommandRefCon  the command context data
boolean isCommandEnabled(in string aCommandName, in nsISupports aCommandRefCon)
 Make this command table immutable, so that commands cannot
 be registered or unregistered. Some command tables are made
 mutable after command registration so that they can be 
 used as singletons.
void makeImmutable()
 Register and unregister commands with the command table.

 @param aCommandName  the name of the command under which to register or
                      unregister the given command handler.

 @param aCommand      the handler for this command.
void registerCommand(in string aCommandName, in nsIControllerCommand aCommand)
 Get whether the named command is supported.

 @param aCommandName    the name of the command to test
 @param aCommandRefCon  the command context data
boolean supportsCommand(in string aCommandName, in nsISupports aCommandRefCon)

        
void unregisterCommand(in string aCommandName, in nsIControllerCommand aCommand)
 Tell the command to udpate its state (if it is a state updating command)

 @param aCommandName    the name of the command to update
 @param aCommandRefCon  the command context data
void updateCommandState(in string aCommandName, in nsISupports aCommandRefCon)