import "sbIPlaybackHistoryService.idl";
Public Member Functions | |
sbIPlaybackHistoryEntry | createEntry (in sbIMediaItem aItem, in long long aTimestamp, in long long aDuration, in sbIPropertyArray aAnnotations) |
Create a playback history entry from a media item and a timestamp. | |
void | addEntry (in sbIPlaybackHistoryEntry aEntry) |
Add an entry to the playback history service. | |
void | addEntries (in nsIArray aEntries) |
Add entries to the playback history service. | |
sbIPlaybackHistoryEntry | getEntryByIndex (in long long aIndex) |
Get an entry by index. Negative indexes wrap from the last entry. | |
nsIArray | getEntriesByIndex (in long long aStartIndex, in unsigned long long aCount) |
Get entries from the playback history service using a start index. Negative indexes wrap from the last entry. | |
nsIArray | getEntriesByTimestamp (in long long aStartTimestamp, in long long aEndTimestamp) |
Get entries between start timestamp and end timestamp. The range is inclusive. | |
void | removeEntry (in sbIPlaybackHistoryEntry aEntry) |
Remove an entry from the playback history service. | |
void | removeEntryByIndex (in long long aIndex) |
Remove an entry from the playback history service using the entry's index. Negative indexes wrap from the last entry. | |
void | removeEntriesByIndex (in long long aStartIndex, in unsigned long long aCount) |
Remove entries from the playback history service using a start index. Negative indexes wrap from the last entry. | |
void | removeEntries (in nsIArray aEntries) |
Remove entries from the playback history service. | |
nsIArray | getEntriesByAnnotation (in AString aAnnotationId, in AString aAnnotationValue,[optional] in unsigned long aCount) |
Get entries by their annotation value. | |
void | clear () |
Clear all entries from the playback history service. | |
void | addListener (in sbIPlaybackHistoryListener aListener) |
Add a listener. | |
void | removeListener (in sbIPlaybackHistoryListener aListener) |
Remove a listener. | |
Public Attributes | |
readonly attribute nsISimpleEnumerator | entries |
Enumerator of all entries in the playback history service. | |
readonly attribute unsigned long long | entryCount |
Total number of entries in the playback history service. |
Getter methods assume that index 0 is the most recent entry.
Definition at line 47 of file sbIPlaybackHistoryService.idl.
sbIPlaybackHistoryEntry sbIPlaybackHistoryService::createEntry | ( | in sbIMediaItem | aItem, | |
in long long | aTimestamp, | |||
in long long | aDuration, | |||
in sbIPropertyArray | aAnnotations | |||
) |
Create a playback history entry from a media item and a timestamp.
aItem | The media item for which you wish to create an entry. | |
aTimestamp | The time at which the item was played in UNIX timestamp format. | |
aDuration | The duration of playback for the item for this entry. | |
aAnnotations | Optional annotations for the entry. |
void sbIPlaybackHistoryService::addEntry | ( | in sbIPlaybackHistoryEntry | aEntry | ) |
Add an entry to the playback history service.
aEntry | The playback history entry you wish to add. |
void sbIPlaybackHistoryService::addEntries | ( | in nsIArray | aEntries | ) |
Add entries to the playback history service.
aEntries | An array of sbIPlaybackHistoryEntry objects. |
NS_ERROR_INVALID_ARG | when the array does not contain sbIPlaybackHistoryEntry objects. |
sbIPlaybackHistoryEntry sbIPlaybackHistoryService::getEntryByIndex | ( | in long long | aIndex | ) |
Get an entry by index. Negative indexes wrap from the last entry.
aIndex |
nsIArray sbIPlaybackHistoryService::getEntriesByIndex | ( | in long long | aStartIndex, | |
in unsigned long long | aCount | |||
) |
Get entries from the playback history service using a start index. Negative indexes wrap from the last entry.
aStartIndex | The start index. | |
aCount | The number of entries you wish to get. |
nsIArray sbIPlaybackHistoryService::getEntriesByTimestamp | ( | in long long | aStartTimestamp, | |
in long long | aEndTimestamp | |||
) |
Get entries between start timestamp and end timestamp. The range is inclusive.
aStartTimestamp | The beginning of the range. | |
aEndTimestamp | The end of the range. |
If aStartTimestamp is greater than aEndTimestamp, the results are returned in descending order.
void sbIPlaybackHistoryService::removeEntry | ( | in sbIPlaybackHistoryEntry | aEntry | ) |
Remove an entry from the playback history service.
aEntry | The entry to remove. |
void sbIPlaybackHistoryService::removeEntryByIndex | ( | in long long | aIndex | ) |
Remove an entry from the playback history service using the entry's index. Negative indexes wrap from the last entry.
aIndex | The index of the entry to remove. |
void sbIPlaybackHistoryService::removeEntriesByIndex | ( | in long long | aStartIndex, | |
in unsigned long long | aCount | |||
) |
Remove entries from the playback history service using a start index. Negative indexes wrap from the last entry.
aStartIndex | The start index. | |
aCount | The number of entries you wish to remove. |
void sbIPlaybackHistoryService::removeEntries | ( | in nsIArray | aEntries | ) |
Remove entries from the playback history service.
aEntries | An array of sbIPlaybackHistoryEntry objects to remove. |
nsIArray sbIPlaybackHistoryService::getEntriesByAnnotation | ( | in AString | aAnnotationId, | |
in AString | aAnnotationValue, | |||
[optional] in unsigned long | aCount | |||
) |
Get entries by their annotation value.
aAnnotationId | The annotation id. | |
aAnnotationValue | The annotation value. | |
[optional] | aCount The maximum number of entries to return. |
readonly attribute nsISimpleEnumerator sbIPlaybackHistoryService::entries |
Enumerator of all entries in the playback history service.
Definition at line 53 of file sbIPlaybackHistoryService.idl.