Songbird / Development / Songbird Add-Ons API Documentation

components/mediacore/playback/history/public/sbIPlaybackHistoryService.idl

00001 /*
00002 //
00003 // BEGIN SONGBIRD GPL
00004 //
00005 // This file is part of the Songbird web player.
00006 //
00007 // Copyright(c) 2005-2008 POTI, Inc.
00008 // http://songbirdnest.com
00009 //
00010 // This file may be licensed under the terms of of the
00011 // GNU General Public License Version 2 (the "GPL").
00012 //
00013 // Software distributed under the License is distributed
00014 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
00015 // express or implied. See the GPL for the specific language
00016 // governing rights and limitations.
00017 //
00018 // You should have received a copy of the GPL along with this
00019 // program. If not, go to http://www.gnu.org/licenses/gpl.html
00020 // or write to the Free Software Foundation, Inc.,
00021 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00022 //
00023 // END SONGBIRD GPL
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 { /*{e4f7838e-9672-453e-818d-a0da84e64365}*/     \
00198   0xe4f7838e,                                    \
00199   0x9672,                                        \
00200   0x453e,                                        \
00201   { 0x81, 0x8d, 0xa0, 0xda, 0x84, 0xe6, 0x43, 0x65 }  \
00202 }
00203 
00204 %}

Generated on Tue Mar 10 14:28:55 2009 for Songbird by  doxygen 1.5.2