Songbird / Development / Songbird Add-Ons API Documentation

sbIDeviceLibraryListener Interface Reference

Interface used to listen to changes to a device library. More...

import "sbIDeviceLibrary.idl";

List of all members.

Public Member Functions

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.
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.
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.
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.
boolean onListCleared (in sbIMediaList aMediaList)
 Called when a media list is cleared.
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.
void onItemCopied (in sbIMediaItem aSourceItem, in sbIMediaItem aDestItem)
 Called when a media item has been copied.
boolean onBeforeCreateMediaItem (in nsIURI aContentUri,[optional] in sbIPropertyArray aProperties,[optional] in boolean aAllowDuplicates)
 Called before a media item is going to be created.
boolean onBeforeCreateMediaList (in AString aType,[optional] in sbIPropertyArray aProperties)
 Called before a media list is going to be created.
boolean onBeforeAdd (in sbIMediaItem aMediaItem)
 Called before an item is added.
boolean onBeforeAddAll (in sbIMediaList aMediaList)
 Called before all item from a list are added.
boolean onBeforeAddSome (in nsISimpleEnumerator aMediaItems)
 Called before some items are added.
boolean onBeforeClear ()
 Called before the device is cleared.


Detailed Description

Interface used to listen to changes to a device library.

Note:
Implementations of this interface must be threadsafe.
See also:
sbIDeviceLibrary

Definition at line 45 of file sbIDeviceLibrary.idl.


Member Function Documentation

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.

Parameters:
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.

Parameters:
sbIMediaList aMediaList The list that has changed.

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.

Parameters:
sbIMediaList aMediaList The list that has changed.
sbIMediaItem aMediaItem The new media item.
unsigned long aIndex The index of the new media item
Returns:
True if you do not want any further onItemAdded notifications for the current batch. If there is no current batch, the return value is ignored.

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.

Parameters:
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
Returns:
True if you do not want any further onItemRemoved for the current batch. If there is no current batch, the return value is ignored.

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.

Parameters:
sbIMediaList aMediaList The list that has changed.
sbIMediaItem aMediaItem The removed media item.
unsigned long aIndex The index of the removed item
Returns:
True if you do not want any further onItemRemoved for the current batch. If there is no current batch, the return value is ignored.

boolean sbIDeviceLibraryListener::onListCleared ( in sbIMediaList  aMediaList  ) 

Called when a media list is cleared.

Parameters:
sbIMediaList aMediaList The list that has been cleared.
Returns:
True if you do not want any further onListCleared notifications for the current batch. If there is no current batch, the return value is ignored.

boolean sbIDeviceLibraryListener::onItemUpdated ( in sbIMediaList  aMediaList,
in sbIMediaItem  aMediaItem,
in sbIPropertyArray  aProperties 
)

Called when a media item is changed.

Parameters:
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
Returns:
True if you do not want any further onItemUpdated notifications for the current batch. If there is no current batch, the return value is ignored.

boolean sbIDeviceLibraryListener::onItemMoved ( in sbIMediaList  aMediaList,
in unsigned long  aFromIndex,
in unsigned long  aToIndex 
)

Called when a media item is moved.

Parameters:
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
Returns:
True if you do not want any further onItemMoved notifications for the current batch. If there is no current batch, the return value is ignored.

void sbIDeviceLibraryListener::onItemCopied ( in sbIMediaItem  aSourceItem,
in sbIMediaItem  aDestItem 
)

Called when a media item has been copied.

Parameters:
sbIMediaItem aSourceItem The item that was copied from.
sbIMediaItem aDestItem The item that was copied to.

boolean sbIDeviceLibraryListener::onBeforeCreateMediaItem ( in nsIURI  aContentUri,
[optional] in sbIPropertyArray  aProperties,
[optional] in boolean  aAllowDuplicates 
)

Called before a media item is going to be created.

See also:
sbILibrary::CreateMediaItem

boolean sbIDeviceLibraryListener::onBeforeCreateMediaList ( in AString  aType,
[optional] in sbIPropertyArray  aProperties 
)

Called before a media list is going to be created.

See also:
sbILibrary::CreateMediaList

boolean sbIDeviceLibraryListener::onBeforeAdd ( in sbIMediaItem  aMediaItem  ) 

Called before an item is added.

See also:
sbIMediaList::Add

boolean sbIDeviceLibraryListener::onBeforeAddAll ( in sbIMediaList  aMediaList  ) 

Called before all item from a list are added.

See also:
sbIMediaList::AddAll

boolean sbIDeviceLibraryListener::onBeforeAddSome ( in nsISimpleEnumerator  aMediaItems  ) 

Called before some items are added.

See also:
sbIMediaList::AddSome

boolean sbIDeviceLibraryListener::onBeforeClear (  ) 

Called before the device is cleared.

See also:
sbIMediaList::Clear


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:28:58 2009 for Songbird by  doxygen 1.5.2