sbRemoteCommands Class Reference

#include <sbRemoteCommands.h>

Inheritance diagram for sbRemoteCommands:
[legend]
Collaboration diagram for sbRemoteCommands:
[legend]

Public Member Functions

NS_DECL_SBIREMOTECOMMANDS
NS_DECL_ISUPPORTS
NS_DECL_NSICLASSINFO
NS_DECL_SBISECURITYAGGREGATOR
virtual
NS_DECL_SBIPLAYLISTCOMMANDS
nsresult 
Init ()
 
 sbRemoteCommands (sbRemotePlayer *aRemotePlayer)
 
- Public Member Functions inherited from sbIRemoteCommands
void addCommand (in AString aType, in AString aID, in AString aName, in AString aTooltip)
 
void removeCommand (in AString aID)
 
void setCommandData (in unsigned long aNumCommands, [const, array, size_is(aNumCommands)] in wstring aTypeArray, [const, array, size_is(aNumCommands)] in wstring aIDArray, [const, array, size_is(aNumCommands)] in wstring aNameArray, [const, array, size_is(aNumCommands)] in wstring aTooltipArray)
 
- Public Member Functions inherited from sbIPlaylistCommands
void addCommandObject (in sbIPlaylistCommands aCommandObjectAction)
 Adds a command object as a child of this sbIPlaylistCommands object. More...
 
void removeCommandObject (in sbIPlaylistCommands aCommandObject)
 Removes a child command object from this sbIPlaylistCommands object. More...
 
void addListener (in sbIPlaylistCommandsListener aListener)
 Adds a listener to this command object to detect child additions or removals and other changes to the command object. More...
 
void removeListener (in sbIPlaylistCommandsListener aListener)
 Removes a listener from this command object. More...
 
void notifyListeners (in AString aTriggerFunction, in sbIPlaylistCommands aCommandObject)
 Notifies the listeners added to this command object. aTriggerFunction can be onCommandAdded, onCommandRemoved, or onCommandChanged and the param aCommandObject is expected to be the added, removed, or changed sbIPlaylistCommands object. More...
 
PRBool getVisible (in AString aHost)
 Return the visible state for the entire command object. More...
 
void setContext (in sbIPlaylistCommandsContext aContext)
 Be informed when a set of commands are attached to a playlist element. More...
 
PRInt32 getNumCommands (in AString aSubMenu, in AString aHost)
 Return the number of command elements to be displayed. More...
 
AString getCommandType (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the type of the requested command element index. More...
 
AString getCommandId (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the id string for the requested command element index. More...
 
AString getCommandText (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the human readable text for the requested command element index. More...
 
PRInt32 getCommandFlex (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the flex value for the requested command element index. More...
 
AString getCommandToolTipText (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the human readable text for the requested command element's tooltip. More...
 
PRBool getCommandEnabled (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the enabled state for the requested command element index. More...
 
PRBool getCommandVisible (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the visible state for the requested command element index. More...
 
PRBool getCommandFlag (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the value of the flag for the requested command element index. More...
 
AString getCommandValue (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the value of the requested command element index. More...
 
AString getCommandChoiceItem (in AString aChoiceMenu, in AString aHost)
 Return the selected item for choice list of the requested command element index. More...
 
AString getCommandShortcutModifiers (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the shortcut modifiers of the requested command element index. More...
 
AString getCommandShortcutKey (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the shortcut key of the requested command element index. More...
 
AString getCommandShortcutKeycode (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the shortcut keycode of the requested command element index. More...
 
PRBool getCommandShortcutLocal (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return a boolean reflecting the local vs window-wide behavior of the shortcut. More...
 
sbIPlaylistCommands getCommandSubObject (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return an sbIPlaylistCommands secondary object. More...
 
nsISimpleEnumerator getChildrenCommandObjects ()
 Returns all sbIPlaylistCommands that are children of this command object (returns the originals) More...
 
nsIDOMNode instantiateCustomCommand (in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMDocument aDocument)
 Instantiate the custom element associated with the requested command. More...
 
void refreshCustomCommand (in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMNode aCustomCommandElement)
 Refresh the custom element associated with the requested command. More...
 
void onCommand (in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aId, in AString aValue)
 Handle the fact that a command was activated. More...
 
sbIPlaylistCommands duplicate ()
 Duplicate the command object. More...
 
void initCommands (in AString aHost)
 Initialization function. More...
 
void shutdownCommands ()
 Shutdown function. More...
 

Protected Member Functions

virtual ~sbRemoteCommands ()
 
void DoCommandsUpdated ()
 

Protected Attributes

nsCOMPtr< nsIWeakReference > mWeakOwner
 
nsCOMPtr
< sbIPlaylistCommandsContext
mContext
 
nsTArray< sbCommandmCommands
 
std::map< nsString, nsString > mProperties
 
nsCOMPtr
< nsISecurityCheckedComponent
mSecurityMixin
 
nsRefPtr< sbRemotePlayermRemotePlayer
 

Additional Inherited Members

- Public Attributes inherited from sbIRemoteCommands
attribute sbIRemotePlayer owner
 
- Public Attributes inherited from sbIPlaylistCommands
readonly attribute AString id
 An identifier for the command object, unique for each playlist type or guid. Must be set with the init method before a playlist command can be registered. More...
 
attribute PRUint16 targetFlags
 Flags of the form specified in sbIPlaylistCommandsHelper.idl to indicate the current location of this command object. These flags are only set by the functions of sbIPlaylistCommandsHelper currently, so may not be present in sbIPlaylistCommands created and added through other means. If these flags are not present, or equal 0, then the sbIPlaylistCommands object is not informed of its current location. As well, because of issues removing objects with the sbIPlaylistCommandsHelper functions that were not created or added in through that service, these flags can, in that situation, inaccurately report that an object is somewhere that it is actually not present (namely one of the mediaitem context menu or toolbar). These flags will always, however, accurately report where this playlist command is not. More...
 
attribute sbIPlaylistCommands parentCommandObject
 The parent sbIPlaylistCommands of this object. The parentCommandObject is set by sbIPlaylistCommands.addCommandObject and is primarily used to bubble listener notifications up the sbIPlaylistCommands hierarchy. More...
 
readonly attribute
sbIPlaylistCommandsBuilderPCCallback 
visibleCallback
 Return the current visibility callback method that determines where this object will be visible. More...
 
- Public Attributes inherited from sbISecurityAggregator
readonly attribute sbIRemotePlayer remotePlayer
 

Detailed Description

Definition at line 56 of file sbRemoteCommands.h.

Constructor & Destructor Documentation

sbRemoteCommands::sbRemoteCommands ( sbRemotePlayer aRemotePlayer)

Definition at line 101 of file sbRemoteCommands.cpp.

sbRemoteCommands::~sbRemoteCommands ( )
protectedvirtual

Definition at line 112 of file sbRemoteCommands.cpp.

Member Function Documentation

void sbRemoteCommands::DoCommandsUpdated ( )
protected

Definition at line 223 of file sbRemoteCommands.cpp.

sbISecurityAggregator nsresult sbRemoteCommands::Init ( )
virtual

Definition at line 99 of file sbRemoteCommands.cpp.

Member Data Documentation

nsTArray<sbCommand> sbRemoteCommands::mCommands
protected

Definition at line 82 of file sbRemoteCommands.h.

nsCOMPtr<sbIPlaylistCommandsContext> sbRemoteCommands::mContext
protected

Definition at line 81 of file sbRemoteCommands.h.

std::map<nsString, nsString> sbRemoteCommands::mProperties
protected

Definition at line 83 of file sbRemoteCommands.h.

nsRefPtr<sbRemotePlayer> sbRemoteCommands::mRemotePlayer
protected

Definition at line 88 of file sbRemoteCommands.h.

nsCOMPtr<nsISecurityCheckedComponent> sbRemoteCommands::mSecurityMixin
protected

Definition at line 86 of file sbRemoteCommands.h.

nsCOMPtr<nsIWeakReference> sbRemoteCommands::mWeakOwner
protected

Definition at line 80 of file sbRemoteCommands.h.


The documentation for this class was generated from the following files: