import"sbIPlaybackHistoryService.idl";
|
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. More...
|
|
void | addEntry (in sbIPlaybackHistoryEntry aEntry) |
| Add an entry to the playback history service. More...
|
|
void | addEntries (in nsIArray aEntries) |
| Add entries to the playback history service. More...
|
|
sbIPlaybackHistoryEntry | getEntryByIndex (in long long aIndex) |
| Get an entry by index. Negative indexes wrap from the last entry. More...
|
|
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. More...
|
|
nsIArray | getEntriesByTimestamp (in long long aStartTimestamp, in long long aEndTimestamp) |
| Get entries between start timestamp and end timestamp. The range is inclusive. More...
|
|
void | removeEntry (in sbIPlaybackHistoryEntry aEntry) |
| Remove an entry from the playback history service. More...
|
|
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. More...
|
|
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. More...
|
|
void | removeEntries (in nsIArray aEntries) |
| Remove entries from the playback history service. More...
|
|
nsIArray | getEntriesByAnnotation (in AString aAnnotationId, in AString aAnnotationValue, [optional] in unsigned long aCount) |
| Get entries by their annotation value. More...
|
|
nsIArray | getEntriesByAnnotations (in sbIPropertyArray aAnnotations, [optional] in unsigned long aCount) |
|
void | clear () |
| Clear all entries from the playback history service. More...
|
|
void | addListener (in sbIPlaybackHistoryListener aListener) |
| Add a listener. More...
|
|
void | removeListener (in sbIPlaybackHistoryListener aListener) |
| Remove a listener. More...
|
|
nsresult | addOrUpdateAnnotation (in long long aEntryId, in AString aAnnotationId, in AString aAnnotationValue) |
|
nsresult | removeAnnotation (in long long aEntryId, in AString aAnnotationId) |
|
The playback history service stores all entries in reverse chronological order. This means that the most recent entry is always the first when using sbIPlaybackHistoryService::entries.
Getter methods assume that index 0 is the most recent entry.
Definition at line 47 of file sbIPlaybackHistoryService.idl.
void sbIPlaybackHistoryService::addEntries |
( |
in nsIArray |
aEntries | ) |
|
Add entries to the playback history service.
- Parameters
-
- Exceptions
-
Add an entry to the playback history service.
- Parameters
-
aEntry | The playback history entry you wish to add. |
nsresult sbIPlaybackHistoryService::addOrUpdateAnnotation |
( |
in long long |
aEntryId, |
|
|
in AString |
aAnnotationId, |
|
|
in AString |
aAnnotationValue |
|
) |
| |
void sbIPlaybackHistoryService::clear |
( |
| ) |
|
Clear all entries from the playback history service.
Create a playback history entry from a media item and a timestamp.
- Parameters
-
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. |
nsIArray sbIPlaybackHistoryService::getEntriesByAnnotation |
( |
in AString |
aAnnotationId, |
|
|
in AString |
aAnnotationValue, |
|
|
[optional] in unsigned long |
aCount |
|
) |
| |
Get entries by their annotation value.
- Parameters
-
aAnnotationId | The annotation id. |
aAnnotationValue | The annotation value. |
[optional] | aCount The maximum number of entries to return. |
- Note
- Results are ordered from newest to oldest.
nsIArray sbIPlaybackHistoryService::getEntriesByAnnotations |
( |
in sbIPropertyArray |
aAnnotations, |
|
|
[optional] in unsigned long |
aCount |
|
) |
| |
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.
- Parameters
-
aStartIndex | The start index. |
aCount | The number of entries you wish to get. |
- Note
- The array will contain sbIPlaybackHistoryEntry objects.
nsIArray sbIPlaybackHistoryService::getEntriesByTimestamp |
( |
in long long |
aStartTimestamp, |
|
|
in long long |
aEndTimestamp |
|
) |
| |
Get entries between start timestamp and end timestamp. The range is inclusive.
- Parameters
-
aStartTimestamp | The beginning of the range. |
aEndTimestamp | The end of the range. |
- Note
- The timestamps are standard UNIX style timestamps.
-
If aStartTimestamp is greater than aEndTimestamp, the results are returned in descending order.
Get an entry by index. Negative indexes wrap from the last entry.
- Parameters
-
nsresult sbIPlaybackHistoryService::removeAnnotation |
( |
in long long |
aEntryId, |
|
|
in AString |
aAnnotationId |
|
) |
| |
void sbIPlaybackHistoryService::removeEntries |
( |
in nsIArray |
aEntries | ) |
|
Remove entries from the playback history service.
- Parameters
-
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.
- Parameters
-
aStartIndex | The start index. |
aCount | The number of entries you wish to remove. |
Remove an entry from the playback history service.
- Parameters
-
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.
- Parameters
-
aIndex | The index of the entry to remove. |
readonly attribute unsigned long long sbIPlaybackHistoryService::entryCount |
The documentation for this interface was generated from the following file: