sbIPlaybackHistoryService.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
27 #include "nsISupports.idl"
28 
29 interface nsIArray;
30 interface nsISimpleEnumerator;
31 
32 interface sbIMediaItem;
33 interface sbIPlaybackHistoryEntry;
35 interface sbIPropertyArray;
36 
46 [scriptable, uuid(c818767c-7474-436c-8bec-a95ad08cf1e5)]
48 {
53  readonly attribute nsISimpleEnumerator entries;
54 
58  readonly attribute unsigned long long entryCount;
59 
68  in long long aTimestamp,
69  in long long aDuration,
70  in sbIPropertyArray aAnnotations);
71 
76  void addEntry(in sbIPlaybackHistoryEntry aEntry);
77 
84  void addEntries(in nsIArray aEntries);
85 
90  sbIPlaybackHistoryEntry getEntryByIndex(in long long aIndex);
91 
99  nsIArray getEntriesByIndex(in long long aStartIndex,
100  in unsigned long long aCount);
101 
111  nsIArray getEntriesByTimestamp(in long long aStartTimestamp,
112  in long long aEndTimestamp);
113 
118  void removeEntry(in sbIPlaybackHistoryEntry aEntry);
119 
125  void removeEntryByIndex(in long long aIndex);
126 
133  void removeEntriesByIndex(in long long aStartIndex,
134  in unsigned long long aCount);
135 
140  void removeEntries(in nsIArray aEntries);
141 
149  nsIArray getEntriesByAnnotation(in AString aAnnotationId,
150  in AString aAnnotationValue,
151  [optional] in unsigned long aCount);
152 
156  nsIArray getEntriesByAnnotations(in sbIPropertyArray aAnnotations,
157  [optional] in unsigned long aCount);
158 
162  void clear();
163 
167  void addListener(in sbIPlaybackHistoryListener aListener);
168 
172  void removeListener(in sbIPlaybackHistoryListener aListener);
173 
177  [notxpcom] nsresult addOrUpdateAnnotation(in long long aEntryId,
178  in AString aAnnotationId,
179  in AString aAnnotationValue);
180 
184  [notxpcom] nsresult removeAnnotation(in long long aEntryId,
185  in AString aAnnotationId);
186 };
187 
188 %{C++
189 
190 #define SB_PLAYBACKHISTORYSERVICE_DESCRIPTION \
191  "Songbird Playback History Service"
192 #define SB_PLAYBACKHISTORYSERVICE_CONTRACTID \
193  "@songbirdnest.com/Songbird/PlaybackHistoryService;1"
194 #define SB_PLAYBACKHISTORYSERVICE_CLASSNAME \
195  "sbPlaybackHistoryService"
196 #define SB_PLAYBACKHISTORYSERVICE_CID \
197 { /*{e4f7838e-9672-453e-818d-a0da84e64365}*/ \
198  0xe4f7838e, \
199  0x9672, \
200  0x453e, \
201  { 0x81, 0x8d, 0xa0, 0xda, 0x84, 0xe6, 0x43, 0x65 } \
202 }
203 
204 %}
void removeListener(in sbIPlaybackHistoryListener aListener)
Remove a listener.
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 las...
nsIArray getEntriesByTimestamp(in long long aStartTimestamp, in long long aEndTimestamp)
Get entries between start timestamp and end timestamp. The range is inclusive.
void removeEntryByIndex(in long long aIndex)
Remove an entry from the playback history service using the entry's index. Negative indexes wrap from...
nsIArray getEntriesByAnnotation(in AString aAnnotationId, in AString aAnnotationValue, [optional] in unsigned long aCount)
Get entries by their annotation value.
sbIPlaybackHistoryEntry getEntryByIndex(in long long aIndex)
Get an entry by index. Negative indexes wrap from the last entry.
void addEntry(in sbIPlaybackHistoryEntry aEntry)
Add an entry to the playback history service.
readonly attribute unsigned long long entryCount
Total number of entries in the playback history service.
var uuid
readonly attribute nsISimpleEnumerator entries
Enumerator of all entries in the playback history service.
function C(H)
nsIArray getEntriesByAnnotations(in sbIPropertyArray aAnnotations, [optional] in unsigned long aCount)
void removeEntries(in nsIArray aEntries)
Remove entries from the playback history service.
void clear()
Clear all entries from the playback history service.
void addEntries(in nsIArray aEntries)
Add entries to the playback history service.
nsresult removeAnnotation(in long long aEntryId, in AString aAnnotationId)
Interface that defines a single item of media in the system.
restoreHistoryPrecursor aCount
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 ...
void removeEntry(in sbIPlaybackHistoryEntry aEntry)
Remove an entry from the playback history service.
nsresult addOrUpdateAnnotation(in long long aEntryId, in AString aAnnotationId, in AString aAnnotationValue)
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...
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 addListener(in sbIPlaybackHistoryListener aListener)
Add a listener.