Songbird / Development / Songbird Add-Ons API Documentation

components/library/base/public/sbILibrary.idl

Go to the documentation of this file.
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 
00033 #include "sbIMediaList.idl"
00034 
00035 interface nsIArray;
00036 interface nsIChannel;
00037 interface nsIPropertyBag2;
00038 interface nsIStringEnumerator;
00039 interface nsIURI;
00040 interface sbIDevice;
00041 interface sbILibraryFactory;
00042 interface sbIMediaItem;
00043 interface sbIMediaListFactory;
00044 
00049 [scriptable, uuid(923514f0-0845-431f-86d4-3a073c6a0a98)]
00050 interface sbIBatchCreateMediaItemsListener : nsISupports
00051 {
00058   void onProgress(in unsigned long aIndex);
00059 
00067   void onComplete(in nsIArray aMediaItems,
00068                   in unsigned long aResult);
00069 };
00070 
00081 [scriptable, uuid(9153d1d0-ed79-4bc2-a3a6-259cf13781c4)]
00082 interface sbILibrary : sbIMediaList
00083 {
00087   readonly attribute sbIDevice device;
00088 
00092   readonly attribute boolean supportsForeignMediaItems;
00093 
00097   readonly attribute nsIPropertyBag2 creationParameters;
00098 
00102   readonly attribute sbILibraryFactory factory;
00103 
00110   nsIChannel resolve(in nsIURI aUri);
00111 
00125   sbIMediaItem createMediaItem(in nsIURI aContentUri,
00126                                [optional] in sbIPropertyArray aProperties,
00127                                [optional] in boolean aAllowDuplicates);
00128   
00135   boolean createMediaItemIfNotExist(in nsIURI aContentUri,
00136                                     [optional] in sbIPropertyArray aProperties,
00137                                     [optional] out sbIMediaItem aResultItem);
00138 
00147   sbIMediaList createMediaList(in AString aType,
00148                                [optional] in sbIPropertyArray aProperties);
00149 
00158   sbIMediaList copyMediaList(in AString aType,
00159                              in sbIMediaList aSource);
00160 
00166   sbIMediaItem getMediaItem(in AString aGuid);
00167 
00175   sbIMediaItem getDuplicate(in sbIMediaItem aMediaItem);
00176 
00180   readonly attribute nsIStringEnumerator mediaListTypes;
00181 
00187   void registerMediaListFactory(in sbIMediaListFactory aFactory);
00188 
00192 /*
00193   AString getPreferedAudioMimeType();
00194   AString getPreferedVideoMimeType();
00195 */
00196 
00202   void optimize();
00203 
00207   void flush();
00208 
00222   nsIArray batchCreateMediaItems(in nsIArray aURIArray,
00223                                  [optional] in nsIArray aPropertyArrayArray,
00224                                  [optional] in boolean aAllowDuplicates);
00225 
00238   void batchCreateMediaItemsAsync(in sbIBatchCreateMediaItemsListener aListener,
00239                                   in nsIArray aURIArray,
00240                                   [optional] in nsIArray aPropertyArrayArray,
00241                                   [optional] in boolean aAllowDuplicates);
00242 };

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