25 #ifndef __SBPLAYQUEUEEXTERNALLIBRARYLISTENER_H__
26 #define __SBPLAYQUEUEEXTERNALLIBRARYLISTENER_H__
33 #include <nsAutoLock.h>
35 #include <nsCOMArray.h>
36 #include <nsVoidArray.h>
40 #include <sbILibrary.h>
41 #include <sbIMediaListListener.h>
42 #include <sbIPropertyArray.h>
73 NS_DECL_SBIMEDIALISTLISTENER
102 virtual ~sbPlayQueueExternalLibraryListener();
108 typedef std::list<sbPropertyUpdate> Updates;
109 typedef std::list<sbPropertyUpdate>::iterator UpdateIter;
128 nsCOMPtr<sbILibrary> mMasterLibrary;
133 nsCOMArray<sbILibrary> mExternalLibraries;
nsresult AddExternalLibrary(sbILibrary *aLibrary)
Add an external library to listen to.
sbPropertyUpdate(sbIMediaItem *aItem, sbIPropertyArray *aUpdate)
Class to allow items in a "master" internal library to stay in sync with duplicates in other librarie...
nsresult SetPropertiesNoSync(sbIMediaItem *aMediaItem, sbIPropertyArray *aProperties)
Set properties on an item, but don't synchronize to duplicates in other libraries.
bool operator==(sbPropertyUpdate rhs)
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIALISTLISTENER sbPlayQueueExternalLibraryListener()
Media library abstraction.
nsresult RemoveListeners()
Removes all listeners so the libraries can shut down.
nsresult SetMasterLibrary(sbILibrary *aLibrary)
Set the master library. Items that are in this library with duplicates in external libraries...
Class to hold onto property updates to make sure we're not applying them more than once...
nsCOMPtr< sbIPropertyArray > mUpdate
nsCOMPtr< sbIMediaItem > mItem
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...