Service for interacting with the Play Queue. More...
import"sbIPlayQueueService.idl";
Public Member Functions | |
void | queueNext (in sbIMediaItem aMediaItem) |
Adds a media item to the next slot in the Play Queue. More... | |
void | queueLast (in sbIMediaItem aMediaItem) |
Adds a media item to the end of the Play Queue. More... | |
void | queueSomeBefore (in unsigned long aIndex, in nsISimpleEnumerator aMediaItems) |
Adds an enumerator of media items before the slot specified by aIndex in the Play Queue asynchronously. Items are not actually in the queue until the onQueueOperationCompleted notification is sent, and callers should not attempt to add or remove items from the queue while the operation is in progress. More... | |
void | queueSomeNext (in nsISimpleEnumerator aMediaItems) |
Adds an enumerator of media items to the next slot in the Play Queue asynchronously. Items are not actually in the queue until the onQueueOperationCompleted notification is sent, and callers should not attempt to add or remove items from the queue while the operation is in progress. More... | |
void | queueSomeLast (in nsISimpleEnumerator aMediaItems) |
Adds an enumerator of media items to the end of the Play Queue asynchronously. Items are not actually in the queue until the onQueueOperationCompleted notification is sent, and callers should not attempt to add or remove items from the queue while the operation is in progress. More... | |
void | clearHistory () |
Clear the Play Queue's history. More... | |
void | clearAll () |
Clear the Play Queue's contents. More... | |
void | addListener (in sbIPlayQueueServiceListener aListener) |
Add a listener for the service. More... | |
void | removeListener (in sbIPlayQueueServiceListener aListener) |
Remove a listener for the service. More... | |
Public Attributes | |
readonly attribute sbIMediaList | mediaList |
The underlying MediaList for the Play Queue. More... | |
attribute unsigned long | index |
Index of the current track in the Play Queue. More... | |
readonly attribute boolean | operationInProgress |
Whether a queue operation is in progress. More... | |
Service for interacting with the Play Queue.
Service to allow queueing items and visibility into the persistent current index.
Definition at line 76 of file sbIPlayQueueService.idl.
void sbIPlayQueueService::addListener | ( | in sbIPlayQueueServiceListener | aListener | ) |
Add a listener for the service.
Adds a listener to receive updates when the current index in the queue changes.
void sbIPlayQueueService::clearAll | ( | ) |
Clear the Play Queue's contents.
Remove all media items from the queue.
void sbIPlayQueueService::clearHistory | ( | ) |
Clear the Play Queue's history.
Remove all media items before index.
void sbIPlayQueueService::queueLast | ( | in sbIMediaItem | aMediaItem | ) |
Adds a media item to the end of the Play Queue.
aMediaItem | media item to add |
void sbIPlayQueueService::queueNext | ( | in sbIMediaItem | aMediaItem | ) |
Adds a media item to the next slot in the Play Queue.
Inserts a media item (could be a list) into the Play Queue so that it is played next.
If the current media item is playing or has been played, the new item will be inserted after the current item. Otherwise, the new item will be inserted before the current item. If the current item is not playing, the current index will be updated to correspond to the new item.
A track is considered "played" if it has been played for at least 240 seconds or 1/2 its duration (matching Audioscrobbler). See sbPlaybackHistoryService.cpp#1633.
aMediaItem | media item to add |
void sbIPlayQueueService::queueSomeBefore | ( | in unsigned long | aIndex, |
in nsISimpleEnumerator | aMediaItems | ||
) |
Adds an enumerator of media items before the slot specified by aIndex in the Play Queue asynchronously. Items are not actually in the queue until the onQueueOperationCompleted notification is sent, and callers should not attempt to add or remove items from the queue while the operation is in progress.
aIndex | Index of the item before which to add media items. |
aMediaItems | enumerator of media items to add |
void sbIPlayQueueService::queueSomeLast | ( | in nsISimpleEnumerator | aMediaItems | ) |
Adds an enumerator of media items to the end of the Play Queue asynchronously. Items are not actually in the queue until the onQueueOperationCompleted notification is sent, and callers should not attempt to add or remove items from the queue while the operation is in progress.
aMediaItems | enumerator of media items to add |
void sbIPlayQueueService::queueSomeNext | ( | in nsISimpleEnumerator | aMediaItems | ) |
Adds an enumerator of media items to the next slot in the Play Queue asynchronously. Items are not actually in the queue until the onQueueOperationCompleted notification is sent, and callers should not attempt to add or remove items from the queue while the operation is in progress.
Inserts all media items in aMediaItems into the play queue so that the first enumerated item is played next and the remaining enumerated items are played before any remaining future tracks that were already in the queue.
aMediaItems | enumerator of media items to add |
void sbIPlayQueueService::removeListener | ( | in sbIPlayQueueServiceListener | aListener | ) |
Remove a listener for the service.
attribute unsigned long sbIPlayQueueService::index |
Index of the current track in the Play Queue.
Definition at line 89 of file sbIPlayQueueService.idl.
readonly attribute sbIMediaList sbIPlayQueueService::mediaList |
The underlying MediaList for the Play Queue.
mediaList should not be used to add items to the play queue. Items should always be added using the queue methods provided by this interface.
Definition at line 84 of file sbIPlayQueueService.idl.
readonly attribute boolean sbIPlayQueueService::operationInProgress |
Whether a queue operation is in progress.
Definition at line 94 of file sbIPlayQueueService.idl.