39 static PRLogModuleInfo* gPlayQueueLibraryListenerLog = nsnull;
40 #define TRACE(args) PR_LOG(gPlayQueueLibraryListenerLog, PR_LOG_DEBUG, args)
41 #define LOG(args) PR_LOG(gPlayQueueLibraryListenerLog, PR_LOG_WARN, args)
43 #define __FUNCTION__ __PRETTY_FUNCTION__
55 : mShouldIgnore(PR_FALSE)
58 if (!gPlayQueueLibraryListenerLog) {
59 gPlayQueueLibraryListenerLog = PR_NewLogModule(
"sbPlayQueueLibraryListener");
62 TRACE((
"%s[%p]", __FUNCTION__,
this));
65 sbPlayQueueLibraryListener::~sbPlayQueueLibraryListener()
67 TRACE((
"%s[%p]", __FUNCTION__,
this));
73 TRACE((
"%s[%p]", __FUNCTION__,
this));
78 sbPlayQueueLibraryListener::OnBeforeListCleared(
sbIMediaList* aMediaList,
80 PRBool *aNoMoreForBatch)
82 TRACE((
"%s[%p]", __FUNCTION__,
this));
87 mShouldIgnore = PR_TRUE;
92 sbPlayQueueLibraryListener::OnListCleared(
sbIMediaList* aMediaList,
94 PRBool* aNoMoreForBatch)
96 TRACE((
"%s[%p]", __FUNCTION__,
this));
97 mShouldIgnore = PR_FALSE;
105 sbPlayQueueLibraryListener::OnBatchBegin(
sbIMediaList* aMediaList)
111 sbPlayQueueLibraryListener::OnBatchEnd(
sbIMediaList* aMediaList)
117 sbPlayQueueLibraryListener::OnItemAdded(
sbIMediaList* aMediaList,
120 PRBool* aNoMoreForBatch)
122 if (aNoMoreForBatch) {
123 *aNoMoreForBatch = PR_TRUE;
129 sbPlayQueueLibraryListener::OnBeforeItemRemoved(
sbIMediaList* aMediaList,
132 PRBool* aNoMoreForBatch)
134 if (aNoMoreForBatch) {
135 *aNoMoreForBatch = PR_TRUE;
141 sbPlayQueueLibraryListener::OnAfterItemRemoved(
sbIMediaList* aMediaList,
144 PRBool* aNoMoreForBatch)
146 if (aNoMoreForBatch) {
147 *aNoMoreForBatch = PR_TRUE;
153 sbPlayQueueLibraryListener::OnItemUpdated(
sbIMediaList* aMediaList,
156 PRBool* aNoMoreForBatch)
158 if (aNoMoreForBatch) {
159 *aNoMoreForBatch = PR_TRUE;
165 sbPlayQueueLibraryListener::OnItemMoved(
sbIMediaList* aMediaList,
168 PRBool* aNoMoreForBatch)
170 if (aNoMoreForBatch) {
171 *aNoMoreForBatch = PR_TRUE;
NS_IMPL_ISUPPORTS1(sbPlayQueueLibraryListener, sbIMediaListListener)
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIALISTLISTENER sbPlayQueueLibraryListener()
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...
Helper class to listen to play queue library notifications.