28 #ifndef __SBLIBRARYLISTENERHELPERS__H__
29 #define __SBLIBRARYLISTENERHELPERS__H__
31 #include "sbIDeviceLibrary.h"
32 #include "sbILocalDatabaseSimpleMediaList.h"
33 #include "sbIMediaListListener.h"
36 #include <nsAutoLock.h>
38 #include <nsDataHashtable.h>
72 sbBaseIgnore() : mLock(nsAutoLock::NewLock(
"sbBaseIgnore::mLock")),
73 mIgnoreListenerCounter(0) {
75 NS_ASSERTION(mLock,
"Failed to allocate sbBaseIgnore::mLock");
81 nsAutoLock::DestroyLock(mLock);
85 nsDataHashtable<nsStringHashKey,PRInt32> mIgnored;
87 PRInt32 mIgnoreListenerCounter;
96 NS_DECL_SBIDEVICELIBRARYLISTENER
115 NS_DECL_SBILOCALDATABASEMEDIALISTCOPYLISTENER
132 NS_DECL_SBIMEDIALISTLISTENER
nsresult Init(sbBaseDevice *aDevice)
virtual ~sbDeviceBaseLibraryCopyListener()
nsresult Init(sbBaseDevice *aDevice)
Interface used to listen to changes to a device library.
nsresult SetIgnoreListener(PRBool aIgnoreListener)
NS_DECL_ISUPPORTS NS_DECL_SBIDEVICELIBRARYLISTENER sbBaseDeviceLibraryListener()
NS_DECL_ISUPPORTS NS_DECL_SBILOCALDATABASEMEDIALISTCOPYLISTENER sbDeviceBaseLibraryCopyListener()
nsresult UnignoreMediaItem(sbIMediaItem *aItem)
PRBool MediaItemIgnored(sbIMediaItem *aItem)
virtual ~sbBaseDeviceLibraryListener()
nsresult IgnoreMediaItem(sbIMediaItem *aItem)