[USER CODE SHOULD NOT REFERENCE THIS CLASS] More...
import"sbILocalDatabaseSmartMediaList.idl";
Public Member Functions | |
sbILocalDatabaseSmartMediaListCondition | appendCondition (in AString aPropertyID, in sbIPropertyOperator aOperator, in AString aLeftValue, in AString aRightValue, in AString aDisplayUnit) |
Add a condition or limiting condition. More... | |
void | removeConditionAt (in unsigned long aConditionIndex) |
Remove a condition. More... | |
sbILocalDatabaseSmartMediaListCondition | getConditionAt (in unsigned long aConditionIndex) |
Get the condition at the specified index. Indexes start at 0. The last item is at conditionCount - 1. More... | |
void | clearConditions () |
Clear all conditions. More... | |
void | rebuild () |
Rebuild the smart media list contents from the conditions specificied. You should call this after you add/modify/remove any conditions. More... | |
void | addSmartMediaListListener (in sbILocalDatabaseSmartMediaListListener aListener) |
void | removeSmartMediaListListener (in sbILocalDatabaseSmartMediaListListener aListener) |
Public Member Functions inherited from sbIMediaList | |
sbIMediaItem | getItemByGuid (in AString aGuid) |
Get a media item in the list by guid. More... | |
sbIMediaItem | getItemByIndex (in unsigned long aIndex) |
Get a media item in the list by index. More... | |
unsigned short | getListContentType () |
Get the content type of the media list. More... | |
void | enumerateAllItems (in sbIMediaListEnumerationListener aEnumerationListener, [optional] in unsigned short aEnumerationType) |
Enumerate all items in the list. More... | |
void | enumerateItemsByProperty (in AString aPropertyID, in AString aPropertyValue, in sbIMediaListEnumerationListener aEnumerationListener, [optional] in unsigned short aEnumerationType) |
Enumerate the media items in the list that match a given property ID and value. More... | |
void | enumerateItemsByProperties (in sbIPropertyArray aProperties, in sbIMediaListEnumerationListener aEnumerationListener, [optional] in unsigned short aEnumerationType) |
Enumerate the media items that match a list of property IDs and values. More... | |
nsIArray | getItemsByProperty (in AString aPropertyID, in AString aPropertyValue) |
PRUint32 | getItemCountByProperty (in AString aPropertyID, in AString aPropertyValue) |
nsIArray | getItemsByProperties (in sbIPropertyArray aProperties) |
unsigned long | indexOf (in sbIMediaItem aMediaItem, [optional] in unsigned long aStartFrom) |
Get the first index of a media item in the list. More... | |
unsigned long | lastIndexOf (in sbIMediaItem aMediaItem, in unsigned long aStartFrom) |
Get the last index of a media item int he list. More... | |
boolean | contains (in sbIMediaItem aMediaItem) |
Check if the list contains a media item. More... | |
void | add (in sbIMediaItem aMediaItem) |
Add a media item to this list. More... | |
sbIMediaItem | addItem (in sbIMediaItem aMediaItem) |
addItem a media item to this list More... | |
void | addAll (in sbIMediaList aMediaList) |
Add the contents of a media list to this list. More... | |
void | addSome (in nsISimpleEnumerator aMediaItems) |
Adds media items suppled by the provided enumerator NOTE: This method is now deprecated. More... | |
void | addMediaItems (in nsISimpleEnumerator aMediaItems, in sbIAddMediaItemsListener aListener, in boolean aAsync) |
Adds media items suppled by the provided enumerator. More... | |
void | remove (in sbIMediaItem aMediaItem) |
Remove the first occurrence of the given media item from the list. More... | |
void | removeByIndex (in unsigned long aIndex) |
Remove a media item from the list by index. More... | |
void | removeSome (in nsISimpleEnumerator aMediaItems) |
Removed media items suppled by the provided enumerator. More... | |
void | clear () |
Clear the list. More... | |
void | addListener (in sbIMediaListListener aListener, [optional] in boolean aOwnsWeak, [optional] in unsigned long aFlags, [optional] in sbIPropertyArray aPropertyFilter) |
Add a listener to this media list. More... | |
void | removeListener (in sbIMediaListListener aListener) |
Remove a listener from this media list. More... | |
sbIMediaListView | createView ([optional] in sbIMediaListViewState aState) |
Create a new, raw view for this list. This is generally not the function that you want to use for making views as it will create a completely raw view, for example lacking any filterConstraint. Please consider using sbLibraryUtils.createStandardMediaListView and proceed carefully if you use this method instead. More... | |
void | runInBatchMode (in sbIMediaListBatchCallback aCallback, [optional] in nsISupports aUserData) |
Runs the given callback with the given user data in batch mode. More... | |
nsIStringEnumerator | getDistinctValuesForProperty (in AString aPropertyID) |
Public Member Functions inherited from sbIMediaItem | |
void | testIsURIAvailable (in nsIObserver aObserver) |
Test if this media item is available for playback. More... | |
nsIChannel | openInputStreamAsync (in nsIStreamListener aListener, in nsISupports aContext) |
Asynchronously get an input stream to the content of the media item. More... | |
nsIInputStream | openInputStream () |
Synchronously get an input stream to the content of the media item. More... | |
nsIOutputStream | openOutputStream () |
Get an output stream to the content of the media item. More... | |
AString | toString () |
Get a string representation of the media item, useful for debugging. More... | |
Public Member Functions inherited from sbILibraryResource | |
AString | getProperty (in AString aID) |
Get the value of a property of this resource. More... | |
void | setProperty (in AString aID, in AString aValue) |
Set the value of a property on this resource. More... | |
sbIPropertyArray | getProperties ([optional] in sbIPropertyArray aPropertyIDs) |
Get properties from this resource in a property array. More... | |
void | setProperties (in sbIPropertyArray aProperties) |
Sets the properties and values in the supplied property array to this resource. This works as if you called setProperty on each property in the array. More... | |
boolean | equals (in sbILibraryResource aOtherLibraryResource) |
Tests the equality of two library resources. More... | |
Public Attributes | |
const unsigned long | MATCH_TYPE_ANY = 0 |
const unsigned long | MATCH_TYPE_ALL = 1 |
const unsigned long | MATCH_TYPE_NONE = 2 |
const unsigned long | LIMIT_TYPE_NONE = 0 |
const unsigned long | LIMIT_TYPE_ITEMS = 1 |
const unsigned long | LIMIT_TYPE_USECS = 2 |
const unsigned long | LIMIT_TYPE_BYTES = 3 |
const unsigned long | NOTEXISTS_ASZERO = 0 |
const unsigned long | NOTEXISTS_ASNULL = 1 |
attribute unsigned long | matchType |
Match any or all conditions. More... | |
readonly attribute unsigned long | conditionCount |
The number of conditions added to this smart playlist. More... | |
attribute unsigned long | limitType |
Type of limit to use. More... | |
attribute unsigned long long | limit |
Value to apply to the limit type. More... | |
attribute AString | selectPropertyID |
Property to select limited results by. More... | |
attribute boolean | selectDirection |
Direction to sort the selection property, true for ascending, false for descending. More... | |
attribute boolean | randomSelection |
Randomly select the items out of the entire result set. More... | |
attribute boolean | autoUpdate |
Whether this smart media list updates automatically upon changes to its source library. More... | |
attribute unsigned long | notExistsMode |
How to handle non-existent properties: More... | |
attribute AString | sourceLibraryGuid |
The guid of the source library (by default, the main library). Change this to select a different source library. More... | |
Public Attributes inherited from sbIMediaList | |
const unsigned short | ENUMERATIONTYPE_SNAPSHOT = 0 |
This flag means that the list being enumerated is a copy that may become out of date. More... | |
const unsigned short | ENUMERATIONTYPE_LOCKING = 1 |
This flag means that the list is protected from changes by other threads during the enumeration. More... | |
const unsigned short | CONTENTTYPE_NONE = 0 |
These flags specify the contentType of the media list. More... | |
const unsigned short | CONTENTTYPE_AUDIO = 1 |
const unsigned short | CONTENTTYPE_VIDEO = 2 |
const unsigned short | CONTENTTYPE_MIX = 3 |
attribute AString | name |
The name of the media list. More... | |
readonly attribute AString | type |
The type of media list (eg "simple") More... | |
readonly attribute unsigned long | length |
Returns the length of the list. More... | |
readonly attribute boolean | isEmpty |
Is the list empty? More... | |
readonly attribute boolean | userEditableContent |
True if the user should be allowed to edit the content of this media list. More... | |
const unsigned long | LISTENER_FLAGS_ITEMADDED = 1 << 0 |
const unsigned long | LISTENER_FLAGS_BEFOREITEMREMOVED = 1 << 1 |
const unsigned long | LISTENER_FLAGS_AFTERITEMREMOVED = 1 << 2 |
const unsigned long | LISTENER_FLAGS_ITEMUPDATED = 1 << 3 |
const unsigned long | LISTENER_FLAGS_BEFORELISTCLEARED = 1 << 4 |
const unsigned long | LISTENER_FLAGS_LISTCLEARED = 1 << 5 |
const unsigned long | LISTENER_FLAGS_BATCHBEGIN = 1 << 6 |
const unsigned long | LISTENER_FLAGS_BATCHEND = 1 << 7 |
const unsigned long | LISTENER_FLAGS_ITEMMOVED = 1 << 8 |
const unsigned long | LISTENER_FLAGS_ALL = 0xffffffff |
Public Attributes inherited from sbIMediaItem | |
readonly attribute sbILibrary | library |
The library that this media item is contained in. More... | |
readonly attribute boolean | isMutable |
Can the media item be changed? More... | |
readonly attribute sbIMediaItemController | itemController |
An interface to the media item controller (if any) that determines this item's availability for playback. More... | |
attribute long long | mediaCreated |
Creation time of the media item as a unix timestamp. More... | |
attribute long long | mediaUpdated |
Last modification time of the media item as a unix timestamp. More... | |
attribute nsIURI | contentSrc |
A nsIURI that resolves to the content of the media item. More... | |
attribute long long | contentLength |
Size (in bytes) of the content of the media item. More... | |
attribute AString | contentType |
Content type of the content of the media item, typically a mime type (should this be renamed?) More... | |
Public Attributes inherited from sbILibraryResource | |
readonly attribute AString | guid |
The guid of this resource. More... | |
readonly attribute long long | created |
The creation time of this resource as a unix timestamp. More... | |
readonly attribute long long | updated |
The last update time of this resource as a unix timestamp. More... | |
readonly attribute nsIStringEnumerator | propertyIDs |
Returns a string enumerator of the IDs of all the properties set on this resource. More... | |
readonly attribute boolean | userEditable |
True if users should be allowed to modify the resource. More... | |
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
Methods and attributes that are specific to the smart media list are implemented here.
Definition at line 98 of file sbILocalDatabaseSmartMediaList.idl.
void sbILocalDatabaseSmartMediaList::addSmartMediaListListener | ( | in sbILocalDatabaseSmartMediaListListener | aListener | ) |
sbILocalDatabaseSmartMediaListCondition sbILocalDatabaseSmartMediaList::appendCondition | ( | in AString | aPropertyID, |
in sbIPropertyOperator | aOperator, | ||
in AString | aLeftValue, | ||
in AString | aRightValue, | ||
in AString | aDisplayUnit | ||
) |
Add a condition or limiting condition.
void sbILocalDatabaseSmartMediaList::clearConditions | ( | ) |
Clear all conditions.
sbILocalDatabaseSmartMediaListCondition sbILocalDatabaseSmartMediaList::getConditionAt | ( | in unsigned long | aConditionIndex | ) |
Get the condition at the specified index. Indexes start at 0. The last item is at conditionCount - 1.
void sbILocalDatabaseSmartMediaList::rebuild | ( | ) |
Rebuild the smart media list contents from the conditions specificied. You should call this after you add/modify/remove any conditions.
void sbILocalDatabaseSmartMediaList::removeConditionAt | ( | in unsigned long | aConditionIndex | ) |
Remove a condition.
void sbILocalDatabaseSmartMediaList::removeSmartMediaListListener | ( | in sbILocalDatabaseSmartMediaListListener | aListener | ) |
attribute boolean sbILocalDatabaseSmartMediaList::autoUpdate |
Whether this smart media list updates automatically upon changes to its source library.
Definition at line 152 of file sbILocalDatabaseSmartMediaList.idl.
readonly attribute unsigned long sbILocalDatabaseSmartMediaList::conditionCount |
The number of conditions added to this smart playlist.
Definition at line 120 of file sbILocalDatabaseSmartMediaList.idl.
attribute unsigned long long sbILocalDatabaseSmartMediaList::limit |
Value to apply to the limit type.
Definition at line 130 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::LIMIT_TYPE_BYTES = 3 |
Definition at line 107 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::LIMIT_TYPE_ITEMS = 1 |
Definition at line 105 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::LIMIT_TYPE_NONE = 0 |
Definition at line 104 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::LIMIT_TYPE_USECS = 2 |
Definition at line 106 of file sbILocalDatabaseSmartMediaList.idl.
attribute unsigned long sbILocalDatabaseSmartMediaList::limitType |
Type of limit to use.
Definition at line 125 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::MATCH_TYPE_ALL = 1 |
Definition at line 101 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::MATCH_TYPE_ANY = 0 |
Definition at line 100 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::MATCH_TYPE_NONE = 2 |
Definition at line 102 of file sbILocalDatabaseSmartMediaList.idl.
attribute unsigned long sbILocalDatabaseSmartMediaList::matchType |
Match any or all conditions.
Definition at line 115 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::NOTEXISTS_ASNULL = 1 |
Definition at line 110 of file sbILocalDatabaseSmartMediaList.idl.
const unsigned long sbILocalDatabaseSmartMediaList::NOTEXISTS_ASZERO = 0 |
Definition at line 109 of file sbILocalDatabaseSmartMediaList.idl.
attribute unsigned long sbILocalDatabaseSmartMediaList::notExistsMode |
How to handle non-existent properties:
NOTEXISTS_ASZERO : Properties that do not exist will equal 0 for numeric fields, "" for text fields, FALSE for booleans, and 'infinitely far in the past' for dates (default). NOTEXISTS_ASNULL : Properties that do not exist will not match any numeric, text, boolean or date rule.
Definition at line 163 of file sbILocalDatabaseSmartMediaList.idl.
attribute boolean sbILocalDatabaseSmartMediaList::randomSelection |
Randomly select the items out of the entire result set.
Definition at line 146 of file sbILocalDatabaseSmartMediaList.idl.
attribute boolean sbILocalDatabaseSmartMediaList::selectDirection |
Direction to sort the selection property, true for ascending, false for descending.
Definition at line 141 of file sbILocalDatabaseSmartMediaList.idl.
attribute AString sbILocalDatabaseSmartMediaList::selectPropertyID |
Property to select limited results by.
Definition at line 135 of file sbILocalDatabaseSmartMediaList.idl.
attribute AString sbILocalDatabaseSmartMediaList::sourceLibraryGuid |
The guid of the source library (by default, the main library). Change this to select a different source library.
Definition at line 205 of file sbILocalDatabaseSmartMediaList.idl.