import "sbIMediaListListener.idl";
Public Member Functions | |
boolean | onItemAdded (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called when a media item is added to the list. | |
boolean | onBeforeItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called before a media item is removed from the list. | |
boolean | onAfterItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called after a media item is removed from the list. | |
boolean | onItemUpdated (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in sbIPropertyArray aProperties) |
Called when a media item is changed. | |
boolean | onItemMoved (in sbIMediaList aMediaList, in unsigned long aFromIndex, in unsigned long aToIndex) |
Called when a media item is moved. | |
boolean | onListCleared (in sbIMediaList aMediaList) |
void | onBatchBegin (in sbIMediaList aMediaList) |
Called when the library is about to perform multiple operations at once. | |
void | onBatchEnd (in sbIMediaList aMediaList) |
Called when the library has finished performing multiple operations at once. |
Implementors of this interface can listen to changes in a media list.
Definition at line 48 of file sbIMediaListListener.idl.
boolean sbIMediaListListener::onItemAdded | ( | in sbIMediaList | aMediaList, | |
in sbIMediaItem | aMediaItem, | |||
in unsigned long | aIndex | |||
) |
Called when a media item is added to the list.
aMediaList | The list that has changed. | |
aMediaItem | The new media item. | |
aIndex | The index in the list where the new item was added |
boolean sbIMediaListListener::onBeforeItemRemoved | ( | in sbIMediaList | aMediaList, | |
in sbIMediaItem | aMediaItem, | |||
in unsigned long | aIndex | |||
) |
Called before a media item is removed from the list.
aMediaList | The list that has changed. | |
aMediaItem | The media item to be removed | |
aIndex | The index of the item to be removed |
boolean sbIMediaListListener::onAfterItemRemoved | ( | in sbIMediaList | aMediaList, | |
in sbIMediaItem | aMediaItem, | |||
in unsigned long | aIndex | |||
) |
Called after a media item is removed from the list.
aMediaList | The list that has changed. | |
aMediaItem | The removed media item. | |
aIndex | Index from where the item was removed |
boolean sbIMediaListListener::onItemUpdated | ( | in sbIMediaList | aMediaList, | |
in sbIMediaItem | aMediaItem, | |||
in sbIPropertyArray | aProperties | |||
) |
Called when a media item is changed.
aMediaList | The list that has changed. | |
aMediaItem | The item that has changed. | |
aProperties | Array of properties that were updated. Each property's value is the previous value of the property |
boolean sbIMediaListListener::onItemMoved | ( | in sbIMediaList | aMediaList, | |
in unsigned long | aFromIndex, | |||
in unsigned long | aToIndex | |||
) |
Called when a media item is moved.
sbIMediaList | aMediaList The list that contains the item that moved. | |
aFromIndex | Index of the item that was moved | |
aToIndex | New index of the moved item |
boolean sbIMediaListListener::onListCleared | ( | in sbIMediaList | aMediaList | ) |
Called when a media list is cleared.
void sbIMediaListListener::onBatchBegin | ( | in sbIMediaList | aMediaList | ) |
Called when the library is about to perform multiple operations at once.
This notification can be used to optimize behavior. The consumer may choose to ignore further onItemAdded or onItemRemoved notifications until the onBatchEnd notification is received.
aMediaList | The list that has changed. |
void sbIMediaListListener::onBatchEnd | ( | in sbIMediaList | aMediaList | ) |
Called when the library has finished performing multiple operations at once.
This notification can be used to optimize behavior. The consumer may choose to stop ignoring onItemAdded or onItemRemoved notifications after receiving this notification.
aMediaList | The list that has changed. |