00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "nsISupports.idl"
00028
00029 interface nsIArray;
00030 interface nsISimpleEnumerator;
00031
00032 interface sbIMediaItem;
00033 interface sbIPlaybackHistoryEntry;
00034 interface sbIPlaybackHistoryListener;
00035 interface sbIPropertyArray;
00036
00046 [scriptable, uuid(c818767c-7474-436c-8bec-a95ad08cf1e5)]
00047 interface sbIPlaybackHistoryService : nsISupports
00048 {
00053 readonly attribute nsISimpleEnumerator entries;
00054
00058 readonly attribute unsigned long long entryCount;
00059
00067 sbIPlaybackHistoryEntry createEntry(in sbIMediaItem aItem,
00068 in long long aTimestamp,
00069 in long long aDuration,
00070 in sbIPropertyArray aAnnotations);
00071
00076 void addEntry(in sbIPlaybackHistoryEntry aEntry);
00077
00084 void addEntries(in nsIArray aEntries);
00085
00090 sbIPlaybackHistoryEntry getEntryByIndex(in long long aIndex);
00091
00099 nsIArray getEntriesByIndex(in long long aStartIndex,
00100 in unsigned long long aCount);
00101
00111 nsIArray getEntriesByTimestamp(in long long aStartTimestamp,
00112 in long long aEndTimestamp);
00113
00118 void removeEntry(in sbIPlaybackHistoryEntry aEntry);
00119
00125 void removeEntryByIndex(in long long aIndex);
00126
00133 void removeEntriesByIndex(in long long aStartIndex,
00134 in unsigned long long aCount);
00135
00140 void removeEntries(in nsIArray aEntries);
00141
00149 nsIArray getEntriesByAnnotation(in AString aAnnotationId,
00150 in AString aAnnotationValue,
00151 [optional] in unsigned long aCount);
00152
00156 nsIArray getEntriesByAnnotations(in sbIPropertyArray aAnnotations,
00157 [optional] in unsigned long aCount);
00158
00162 void clear();
00163
00167 void addListener(in sbIPlaybackHistoryListener aListener);
00168
00172 void removeListener(in sbIPlaybackHistoryListener aListener);
00173
00177 [notxpcom] nsresult addOrUpdateAnnotation(in long long aEntryId,
00178 in AString aAnnotationId,
00179 in AString aAnnotationValue);
00180
00184 [notxpcom] nsresult removeAnnotation(in long long aEntryId,
00185 in AString aAnnotationId);
00186 };
00187
00188 %{C++
00189
00190 #define SB_PLAYBACKHISTORYSERVICE_DESCRIPTION \
00191 "Songbird Playback History Service"
00192 #define SB_PLAYBACKHISTORYSERVICE_CONTRACTID \
00193 "@songbirdnest.com/Songbird/PlaybackHistoryService;1"
00194 #define SB_PLAYBACKHISTORYSERVICE_CLASSNAME \
00195 "sbPlaybackHistoryService"
00196 #define SB_PLAYBACKHISTORYSERVICE_CID \
00197 { \
00198 0xe4f7838e, \
00199 0x9672, \
00200 0x453e, \
00201 { 0x81, 0x8d, 0xa0, 0xda, 0x84, 0xe6, 0x43, 0x65 } \
00202 }
00203
00204 %}