#include <sbLocalDatabaseMediaListView.h>
Public Member Functions | |
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIALISTVIEW NS_DECL_SBIMEDIALISTLISTENER NS_DECL_SBIFILTERABLEMEDIALISTVIEW NS_DECL_SBISEARCHABLEMEDIALISTVIEW NS_DECL_SBISORTABLEMEDIALISTVIEW NS_DECL_NSICLASSINFO | sbLocalDatabaseMediaListView (sbLocalDatabaseLibrary *aLibrary, sbLocalDatabaseMediaListBase *aMediaList, nsAString &aDefaultSortProperty, PRUint32 aMediaListId) |
~sbLocalDatabaseMediaListView () | |
nsresult | Init (sbIMediaListViewState *aState) |
already_AddRefed < sbLocalDatabaseMediaListBase > | GetNativeMediaList () |
sbILocalDatabaseGUIDArray * | GetGUIDArray () |
nsresult | UpdateViewArrayConfiguration (PRBool aClearTreeSelection) |
void | NotifyListenersFilterChanged () |
void | NotifyListenersSearchChanged () |
void | NotifyListenersSortChanged () |
nsresult | GetViewConstraint (sbILibraryConstraint **aFilterConstraint) |
Public Member Functions inherited from sbSupportsWeakReference | |
sbSupportsWeakReference () | |
Public Member Functions inherited from sbIMediaListView | |
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 Member Functions inherited from sbIMediaListListener | |
boolean | onItemAdded (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called when a media item is added to the list. More... | |
boolean | onBeforeItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called before a media item is removed from the list. More... | |
boolean | onAfterItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called after a media item is removed from the list. More... | |
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... | |
boolean | onBeforeListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
boolean | onListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
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... | |
Public Member Functions inherited from sbISortableMediaListView | |
void | setSort (in sbIPropertyArray aSort) |
Set a new sort for the media list. More... | |
void | clearSort () |
Clear the sort. More... | |
Additional Inherited Members | |
Public Attributes inherited from sbIMediaListView | |
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... | |
Public Attributes inherited from sbIFilterableMediaListView | |
attribute sbILibraryConstraint | filterConstraint |
Get or set the current filter constraints, including any constraints on the cascadeFilterSet of this view. More... | |
Public Attributes inherited from sbISearchableMediaListView | |
attribute sbILibraryConstraint | searchConstraint |
Get or set the current search configuration. More... | |
Public Attributes inherited from sbISortableMediaListView | |
readonly attribute nsIStringEnumerator | sortableProperties |
A list of properties that support sorting. More... | |
readonly attribute sbIPropertyArray | currentSort |
The current sort. More... | |
Protected Member Functions inherited from sbSupportsWeakReference | |
~sbSupportsWeakReference () | |
void | ClearWeakReferences () |
PRBool | HasWeakReferences () const |
Definition at line 63 of file sbLocalDatabaseMediaListView.h.
sbLocalDatabaseMediaListView::sbLocalDatabaseMediaListView | ( | sbLocalDatabaseLibrary * | aLibrary, |
sbLocalDatabaseMediaListBase * | aMediaList, | ||
nsAString & | aDefaultSortProperty, | ||
PRUint32 | aMediaListId | ||
) |
Definition at line 205 of file sbLocalDatabaseMediaListView.cpp.
sbLocalDatabaseMediaListView::~sbLocalDatabaseMediaListView | ( | ) |
Definition at line 235 of file sbLocalDatabaseMediaListView.cpp.
sbILocalDatabaseGUIDArray * sbLocalDatabaseMediaListView::GetGUIDArray | ( | ) |
Definition at line 428 of file sbLocalDatabaseMediaListView.cpp.
already_AddRefed< sbLocalDatabaseMediaListBase > sbLocalDatabaseMediaListView::GetNativeMediaList | ( | ) |
Definition at line 419 of file sbLocalDatabaseMediaListView.cpp.
nsresult sbLocalDatabaseMediaListView::GetViewConstraint | ( | sbILibraryConstraint ** | aFilterConstraint | ) |
Definition at line 1234 of file sbLocalDatabaseMediaListView.cpp.
nsresult sbLocalDatabaseMediaListView::Init | ( | sbIMediaListViewState * | aState | ) |
Definition at line 260 of file sbLocalDatabaseMediaListView.cpp.
|
inline |
Definition at line 95 of file sbLocalDatabaseMediaListView.h.
|
inline |
Definition at line 99 of file sbLocalDatabaseMediaListView.h.
|
inline |
Definition at line 103 of file sbLocalDatabaseMediaListView.h.
nsresult sbLocalDatabaseMediaListView::UpdateViewArrayConfiguration | ( | PRBool | aClearTreeSelection | ) |
Definition at line 1777 of file sbLocalDatabaseMediaListView.cpp.