sbIMediaListView Interface Reference

A distinct view on a given media list. More...

import"sbIMediaListView.idl";

Inheritance diagram for sbIMediaListView:
[legend]
Collaboration diagram for sbIMediaListView:
[legend]

Public Member Functions

sbIMediaItem getItemByIndex (in unsigned long aIndex)
 Get a media item in the filtered view of this list by index. More...
 
unsigned long getIndexForItem (in sbIMediaItem aMediaItem)
 Searches the view for the first occurrence of the specified media item and returns the index where it was found. More...
 
unsigned long getUnfilteredIndex (in unsigned long aIndex)
 Given an index of an item in the filtered list, get the index of the same item in the unfiltered list. More...
 
AString getViewItemUIDForIndex (in unsigned long aIndex)
 Returns an opaque identifier that uniquely identifies the media item at a given position. This identifier can be used later to find the same media item after this view's filter and sort has been changed. More...
 
unsigned long getIndexForViewItemUID (in AString aViewItemUID)
 Given an opaque identifier returned by getViewItemUIDForIndex, return the index of the media item it identifies. More...
 
nsIStringEnumerator getDistinctValuesForProperty (in AString aPropertyID)
 
sbIMediaListView clone ()
 Create a clone of this view. This will return a copy with the same search, filter, sort, and cascade filter set as the original. More...
 
sbIMediaListViewState getState ()
 Returns a snapshot of the current state of this view. Can later be used to restore the state by passing the returned object as an argument to sbIMediaList::CreateView() More...
 
void addListener (in sbIMediaListViewListener aListener, [optional] in boolean aOwnsWeak)
 Add a listener to this view to be notified of changes to filter configuration, search, and sort configuration. More...
 
void removeListener (in sbIMediaListViewListener aListener)
 Remove a listener from the view. More...
 
void removeSelectedMediaItems ()
 Remove selected items from the view's media list. More...
 

Public Attributes

readonly attribute sbIMediaList mediaList
 The media list this view is on. More...
 
readonly attribute unsigned long length
 Returns the length of filtered view of this list. More...
 
readonly attribute nsITreeView treeView
 Get a treeview that will display this media list view. More...
 
readonly attribute
sbICascadeFilterSet 
cascadeFilterSet
 Get the cascade filter set for this media list view. More...
 
readonly attribute
sbIMediaListViewSelection 
selection
 Get the selection for the view. More...
 

Detailed Description

A distinct view on a given media list.

See Also
sbIMediaList

Definition at line 89 of file sbIMediaListView.idl.

Member Function Documentation

void sbIMediaListView::addListener ( in sbIMediaListViewListener  aListener,
[optional] in boolean  aOwnsWeak 
)

Add a listener to this view to be notified of changes to filter configuration, search, and sort configuration.

Calling addListener twice with the same listener and weak setting will be ignored. Calling twice with the same listener but different weak settings will cause two references to be stored, one weak and one strong.

Parameters
aListenerThe listener instance.
aOwnsWeak[optional] Whether or not to hold a weak reference to the listener. If aOwnsWeak is true then aListener must be able to QI to nsISupportsWeakReference.
See Also
sbIMediaListViewListener
nsISupportsWeakReference
sbIMediaListView sbIMediaListView::clone ( )

Create a clone of this view. This will return a copy with the same search, filter, sort, and cascade filter set as the original.

Returns
A clone of the media list view
nsIStringEnumerator sbIMediaListView::getDistinctValuesForProperty ( in AString  aPropertyID)
unsigned long sbIMediaListView::getIndexForItem ( in sbIMediaItem  aMediaItem)

Searches the view for the first occurrence of the specified media item and returns the index where it was found.

Parameters
aMediaItemMedia item to search for
Returns
Index where the media item was found
Exceptions
NS_ERROR_NOT_AVAILABLEif the media item is not in the view
unsigned long sbIMediaListView::getIndexForViewItemUID ( in AString  aViewItemUID)

Given an opaque identifier returned by getViewItemUIDForIndex, return the index of the media item it identifies.

Parameters
aViewItemUIDThe opaque identifier returned by getViewItemUIDForIndex
Returns
Index of media item the identifer identifies.
sbIMediaItem sbIMediaListView::getItemByIndex ( in unsigned long  aIndex)

Get a media item in the filtered view of this list by index.

Parameters
aIndexFiltered index of the media item
Returns
Media item with the requested index
sbIMediaListViewState sbIMediaListView::getState ( )

Returns a snapshot of the current state of this view. Can later be used to restore the state by passing the returned object as an argument to sbIMediaList::CreateView()

Returns
The state of this media list view
unsigned long sbIMediaListView::getUnfilteredIndex ( in unsigned long  aIndex)

Given an index of an item in the filtered list, get the index of the same item in the unfiltered list.

Parameters
aIndexFiltered index of the media item
Returns
Index of the same item in the unfiltered list
AString sbIMediaListView::getViewItemUIDForIndex ( in unsigned long  aIndex)

Returns an opaque identifier that uniquely identifies the media item at a given position. This identifier can be used later to find the same media item after this view's filter and sort has been changed.

Parameters
aIndexFiltered index of the media item
Returns
Opaque identifier of specified media item
void sbIMediaListView::removeListener ( in sbIMediaListViewListener  aListener)

Remove a listener from the view.

Calling removeListener with a listener that has not been previously added with addListener is a no-op.

Calling removeListener with a listener that had both a weak and a strong reference stored (via two calls to addListener with different values for aOwnsWeak) will cause the weak listener to be removed first. A second call to removeListener is necessary to remove the strong reference.

Parameters
aListenerThe listener instance to remove.
void sbIMediaListView::removeSelectedMediaItems ( )

Remove selected items from the view's media list.

Member Data Documentation

readonly attribute sbICascadeFilterSet sbIMediaListView::cascadeFilterSet

Get the cascade filter set for this media list view.

Definition at line 109 of file sbIMediaListView.idl.

readonly attribute unsigned long sbIMediaListView::length

Returns the length of filtered view of this list.

Definition at line 99 of file sbIMediaListView.idl.

readonly attribute sbIMediaList sbIMediaListView::mediaList

The media list this view is on.

Definition at line 94 of file sbIMediaListView.idl.

readonly attribute sbIMediaListViewSelection sbIMediaListView::selection

Get the selection for the view.

Definition at line 212 of file sbIMediaListView.idl.

readonly attribute nsITreeView sbIMediaListView::treeView

Get a treeview that will display this media list view.

Definition at line 104 of file sbIMediaListView.idl.


The documentation for this interface was generated from the following file: