sbIPlaybackHistoryEntry.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 sbIMediaItem;
30 interface sbIPropertyArray;
31 
35 [scriptable, uuid(3e2733de-9e30-4bde-99f0-274bacdd0b20)]
37 {
42  readonly attribute long long entryId;
43 
47  readonly attribute sbIMediaItem item;
48 
53  readonly attribute long long timestamp;
54 
59  readonly attribute long long duration;
60 
65  readonly attribute sbIPropertyArray annotations;
66 
73  AString getAnnotation(in AString aAnnotationId);
74 
81  boolean hasAnnotation(in AString aAnnotationId);
82 
88  void setAnnotation(in AString aAnnotationId,
89  in AString aAnnotationValue);
90 
95  void removeAnnotation(in AString aAnnotationId);
96 
105  void init(in sbIMediaItem aItem,
106  in long long aTimestamp,
107  in long long aDuration,
108  in sbIPropertyArray aAnnotations);
109 
115  [notxpcom] void setEntryId(in long long aEntryId);
116 };
117 
118 %{C++
119 
120 #define SB_PLAYBACKHISTORYENTRY_DESCRIPTION \
121  "Songbird Playback History Entry"
122 #define SB_PLAYBACKHISTORYENTRY_CONTRACTID \
123  "@songbirdnest.com/Songbird/PlaybackHistoryEntry;1"
124 #define SB_PLAYBACKHISTORYENTRY_CLASSNAME \
125  "sbPlaybackHistoryEntry"
126 #define SB_PLAYBACKHISTORYENTRY_CID \
127 { /* 64abdd62-3481-4ce9-89c6-e02398a4aa5c */ \
128  0x64abdd62, \
129  0x3481, \
130  0x4ce9, \
131  { 0x89, 0xc6, 0xe0, 0x23, 0x98, 0xa4, 0xaa, 0x5c } \
132 }
133 
134 %}
readonly attribute sbIMediaItem item
The item that was played.
void setEntryId(in long long aEntryId)
Set the entry id.
void setAnnotation(in AString aAnnotationId, in AString aAnnotationValue)
Set an annotation on the entry.
var uuid
readonly attribute long long duration
Duration of playback in microseconds.
function C(H)
boolean hasAnnotation(in AString aAnnotationId)
Verify the presence of an annotation.
void init(in sbIMediaItem aItem, in long long aTimestamp, in long long aDuration, in sbIPropertyArray aAnnotations)
Initialize a playback history entry.
readonly attribute long long timestamp
Timestamp indicating at which time the item started playing.
readonly attribute sbIPropertyArray annotations
Annotations to the entry. Annotations are properties.
void removeAnnotation(in AString aAnnotationId)
Remove an annotation from the entry.
readonly attribute long long entryId
Interface that defines a single item of media in the system.
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...
AString getAnnotation(in AString aAnnotationId)
Get an annotation by id.