Interface used to listen to changes to a device library. More...
import"sbIDeviceLibrary.idl";
Public Member Functions | |
void | onBatchBegin (in sbIMediaList aMediaList) |
Called when the library is about to perform multiple operations at once. More... | |
void | onBatchEnd (in sbIMediaList aMediaList) |
Called when the library has finished performing multiple operations at once. More... | |
boolean | onItemAdded (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called when a media item is added to a list, through add or addAll. More... | |
boolean | onBeforeItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called before a media item is removed from a list, through remove, removeAll or removeByIndex. More... | |
boolean | onAfterItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called after a media item has been removed from a list, through remove, removeAll or removeByIndex. More... | |
boolean | onBeforeListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
boolean | onListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
boolean | onItemUpdated (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in sbIPropertyArray aProperties) |
Called when a media item is changed. More... | |
boolean | onItemMoved (in sbIMediaList aMediaList, in unsigned long aFromIndex, in unsigned long aToIndex) |
Called when a media item is moved. More... | |
void | onItemCopied (in sbIMediaItem aSourceItem, in sbIMediaItem aDestItem) |
Called when a media item has been copied. More... | |
boolean | onBeforeCreateMediaItem (in nsIURI aContentUri, [optional] in sbIPropertyArray aProperties, [optional] in boolean aAllowDuplicates) |
Called before a media item is going to be created. More... | |
boolean | onBeforeCreateMediaList (in AString aType, [optional] in sbIPropertyArray aProperties) |
Called before a media list is going to be created. More... | |
boolean | onBeforeAdd (in sbIMediaItem aMediaItem) |
Called before an item is added. More... | |
boolean | onBeforeAddAll (in sbIMediaList aMediaList) |
Called before all item from a list are added. More... | |
boolean | onBeforeAddSome (in nsISimpleEnumerator aMediaItems) |
Called before some items are added. More... | |
boolean | onBeforeClear () |
Called before the device is cleared. More... | |
Interface used to listen to changes to a device library.
Definition at line 46 of file sbIDeviceLibrary.idl.
boolean sbIDeviceLibraryListener::onAfterItemRemoved | ( | in sbIMediaList | aMediaList, |
in sbIMediaItem | aMediaItem, | ||
in unsigned long | aIndex | ||
) |
Called after a media item has been removed from a list, through remove, removeAll or removeByIndex.
sbIMediaList | aMediaList The list that has changed. |
sbIMediaItem | aMediaItem The removed media item. |
unsigned | long aIndex The index of the removed item |
void sbIDeviceLibraryListener::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 notifications until the onBatchEnd notification is received.
sbIMediaList | aMediaList The list that has changed. |
void sbIDeviceLibraryListener::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 notifications after receiving this notification.
sbIMediaList | aMediaList The list that has changed. |
boolean sbIDeviceLibraryListener::onBeforeAdd | ( | in sbIMediaItem | aMediaItem | ) |
Called before an item is added.
boolean sbIDeviceLibraryListener::onBeforeAddAll | ( | in sbIMediaList | aMediaList | ) |
Called before all item from a list are added.
boolean sbIDeviceLibraryListener::onBeforeAddSome | ( | in nsISimpleEnumerator | aMediaItems | ) |
Called before some items are added.
boolean sbIDeviceLibraryListener::onBeforeClear | ( | ) |
Called before the device is cleared.
boolean sbIDeviceLibraryListener::onBeforeCreateMediaItem | ( | in nsIURI | aContentUri, |
[optional] in sbIPropertyArray | aProperties, | ||
[optional] in boolean | aAllowDuplicates | ||
) |
Called before a media item is going to be created.
These are listener functions that will get called before some actions take place, like adding, or creating items in the library.
boolean sbIDeviceLibraryListener::onBeforeCreateMediaList | ( | in AString | aType, |
[optional] in sbIPropertyArray | aProperties | ||
) |
Called before a media list is going to be created.
boolean sbIDeviceLibraryListener::onBeforeItemRemoved | ( | in sbIMediaList | aMediaList, |
in sbIMediaItem | aMediaItem, | ||
in unsigned long | aIndex | ||
) |
Called before a media item is removed from a list, through remove, removeAll or removeByIndex.
sbIMediaList | sbIMediaList aMediaList The list that has changed. |
sbIMediaItem | sbIMediaItem aMediaItem The removed media item. |
unsigned | long aIndex The index of the item to be removed |
boolean sbIDeviceLibraryListener::onBeforeListCleared | ( | in sbIMediaList | aMediaList, |
in boolean | aExcludeLists | ||
) |
Called before a media list is cleared.
sbIMediaList | aMediaList The list that is about to be cleared. |
aExcludeLists | If true, only media items, not media lists, are being cleared. |
boolean sbIDeviceLibraryListener::onItemAdded | ( | in sbIMediaList | aMediaList, |
in sbIMediaItem | aMediaItem, | ||
in unsigned long | aIndex | ||
) |
Called when a media item is added to a list, through add or addAll.
Listener functions for media list changes (sbIMediaList)
sbIMediaList | aMediaList The list that has changed. |
sbIMediaItem | aMediaItem The new media item. |
unsigned | long aIndex The index of the new media item |
void sbIDeviceLibraryListener::onItemCopied | ( | in sbIMediaItem | aSourceItem, |
in sbIMediaItem | aDestItem | ||
) |
Called when a media item has been copied.
sbIMediaItem | aSourceItem The item that was copied from. |
sbIMediaItem | aDestItem The item that was copied to. |
boolean sbIDeviceLibraryListener::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 sbIDeviceLibraryListener::onItemUpdated | ( | in sbIMediaList | aMediaList, |
in sbIMediaItem | aMediaItem, | ||
in sbIPropertyArray | aProperties | ||
) |
Called when a media item is changed.
sbIMediaList | aMediaList The list that has changed. |
sbIMediaItem | 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 sbIDeviceLibraryListener::onListCleared | ( | in sbIMediaList | aMediaList, |
in boolean | aExcludeLists | ||
) |
Called when a media list is cleared.
sbIMediaList | aMediaList The list that was cleared. |
aExcludeLists | If true, only media items, not media lists, were cleared. |