30 #ifndef __PLAYLISTCOMMANDS_MANAGER_H__
31 #define __PLAYLISTCOMMANDS_MANAGER_H__
33 #include <nsISupportsImpl.h>
34 #include <nsISupportsUtils.h>
35 #include <nsIStringBundle.h>
36 #include <nsStringGlue.h>
37 #include <sbILibrary.h>
38 #include "sbIMediaListListener.h"
39 #include "sbIPlaylistCommands.h"
40 #include "sbIPlaylistCommandsBuilder.h"
42 #include <nsCOMArray.h>
45 #ifndef NS_DECL_ISUPPORTS
49 #define SONGBIRD_PlaylistCommandsManager_CONTRACTID \
50 "@songbirdnest.com/Songbird/PlaylistCommandsManager;1"
51 #define SONGBIRD_PlaylistCommandsManager_CLASSNAME \
52 "Songbird Playlist Commands Manager Component"
53 #define SONGBIRD_PlaylistCommandsManager_CID \
55 0xf89d8c28, 0x406d, 0x4d4b, \
56 { 0x91, 0x30, 0xec, 0xab, 0xe6, 0x6a, 0x71, 0xe2 } \
68 NS_DECL_SBIPLAYLISTCOMMANDSMANAGER
77 typedef std::map<nsString, nsCOMPtr<sbIPlaylistCommandsBuilder> >
commandobjmap_t;
82 typedef std::map<nsString, nsCOMArray<sbIPlaylistCommands> >
87 typedef std::map<nsString, nsCOMPtr<LibraryPlaylistCommandsListener> >
112 const nsAString &aContextGUID,
113 const nsAString &aPlaylistType,
133 const nsAString &aContextGUID,
134 const nsAString &aPlaylistType,
138 typedef std::map<nsString, nsCOMArray<sbIPlaylistCommandsListener> > listenermap_t;
139 listenermap_t m_ListenerMap;
159 const nsAString &aSearchString,
181 const nsAString &aContextGUID,
182 const nsAString &aPlaylistType,
203 nsresult FindAllRootCommands(
const nsAString &aContextGUID,
204 const nsAString &aContextType,
213 nsresult GetAllMediaListsForLibrary(
sbILibrary *aLibrary,
229 nsresult RemoveListenerFromRootCommands(
const nsString &aContextGUID,
230 const nsString &aPlaylistType,
240 nsresult RemoveListenerInListenerMap(
const nsString &aSearchString,
249 NS_DECL_SBIMEDIALISTLISTENER
260 nsresult HandleSavedLibraryCommands
261 (PRBool aIsRegistering,
262 libraryGuidToCommandsMap_t *aSavedCommandsMap,
263 commandobjmap_t *aRegistrationMap,
264 const nsAString &aLibraryGUID,
265 const nsAString &aListGUID);
267 nsresult RegisterSavedLibraryCommands
268 (libraryGuidToCommandsMap_t *aSavedCommandsMap,
269 commandobjmap_t *aRegistrationMap,
270 const nsAString &aLibraryGUID,
271 const nsAString &aListGUID);
273 nsresult UnregisterSavedLibraryCommands
274 (libraryGuidToCommandsMap_t *aSavedCommandsMap,
275 commandobjmap_t *aRegistrationMap,
276 const nsAString &aLibraryGUID,
277 const nsAString &aListGUID);
281 #endif // __PLAYLISTCOMMANDS_MANAGER_H__
A helper used to construct sbIPlaylistCommands interfaces.
NS_IMETHODIMP RegisterPlaylistCommands(commandobjmap_t *map, const nsAString &aContextGUID, const nsAString &aPlaylistType, sbIPlaylistCommands *aCommandObj)
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIALISTLISTENER LibraryPlaylistCommandsListener(CPlaylistCommandsManager *aCmdMgr)
libraryGuidToCommandsMap_t m_LibraryGuidToServicePaneCommandsMap
The interface for receiving notices when a Command Object is added to or removed from another Command...
NS_DECL_ISUPPORTS NS_DECL_SBIPLAYLISTCOMMANDSMANAGER CPlaylistCommandsManager()
std::map< nsString, nsCOMPtr< sbIPlaylistCommandsBuilder > > commandobjmap_t
virtual ~CPlaylistCommandsManager()
virtual ~LibraryPlaylistCommandsListener()
commandobjmap_t m_ServicePaneCommandObjMap
libraryGuidToCommandsMap_t m_LibraryGuidToMenuOrToolbarCommandsMap
NS_IMETHODIMP UnregisterPlaylistCommands(commandobjmap_t *map, const nsAString &aContextGUID, const nsAString &aPlaylistType, sbIPlaylistCommands *aCommandObj)
Media library abstraction.
An interface that represents the set of command buttons and context menu items available on a display...
libraryGuidToLibraryListenerMap_t m_LibraryGuidToLibraryListenerMap
std::map< nsString, nsCOMPtr< LibraryPlaylistCommandsListener > > libraryGuidToLibraryListenerMap_t
std::map< nsString, nsCOMPtr< sbIPlaylistCommands > > m_publishedCommands
std::map< nsString, nsCOMArray< sbIPlaylistCommands > > libraryGuidToCommandsMap_t
The service used to register, unregister, and list playlist commands for a particular playlist guid o...
commandobjmap_t m_PlaylistCommandObjMap