Songbird / Development / Songbird Add-Ons API Documentation

components/devices/base/public/sbIDeviceLibrary.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 "sbILibrary.idl"
00028 #include "nsISupports.idl"
00029 
00030 interface nsIArray;
00031 interface sbIMediaItem;
00032 interface sbIMediaList;
00033 interface sbIPropertyArray;
00034 interface nsIURI;
00035 
00036 
00044 [scriptable, uuid(c2885733-72f8-4d1a-8143-d81f2ca446e3)]
00045 interface sbIDeviceLibraryListener : nsISupports
00046 {
00057   void onBatchBegin(in sbIMediaList aMediaList);
00058 
00068   void onBatchEnd(in sbIMediaList aMediaList);
00069 
00082   boolean onItemAdded(in sbIMediaList aMediaList,
00083                       in sbIMediaItem aMediaItem,
00084                       in unsigned long aIndex);
00085 
00096   boolean onBeforeItemRemoved(in sbIMediaList aMediaList,
00097                               in sbIMediaItem aMediaItem,
00098                               in unsigned long aIndex);
00099 
00110   boolean onAfterItemRemoved(in sbIMediaList aMediaList,
00111                              in sbIMediaItem aMediaItem,
00112                              in unsigned long aIndex);
00113 
00121   boolean onListCleared(in sbIMediaList aMediaList);
00122 
00133   boolean onItemUpdated(in sbIMediaList aMediaList,
00134                         in sbIMediaItem aMediaItem,
00135                         in sbIPropertyArray aProperties);
00136 
00146   boolean onItemMoved(in sbIMediaList aMediaList,
00147                       in unsigned long aFromIndex,
00148                       in unsigned long aToIndex);
00149 
00155   void onItemCopied(in sbIMediaItem aSourceItem, 
00156                     in sbIMediaItem aDestItem);
00157 
00158 
00168   boolean onBeforeCreateMediaItem(in nsIURI aContentUri,
00169                                   [optional] in sbIPropertyArray aProperties,
00170                                   [optional] in boolean aAllowDuplicates);
00171 
00176   boolean onBeforeCreateMediaList(in AString aType,
00177                                   [optional] in sbIPropertyArray aProperties);
00178 
00183   boolean onBeforeAdd(in sbIMediaItem aMediaItem);
00184 
00189   boolean onBeforeAddAll(in sbIMediaList aMediaList);
00190 
00195   boolean onBeforeAddSome(in nsISimpleEnumerator aMediaItems);
00196 
00201   boolean onBeforeClear();
00202 
00203 };
00204  
00209 [scriptable, uuid(c477d296-f25b-42a4-98bf-0b5d77dcebb4)]
00210 interface sbIDeviceLibrary : sbILibrary
00211 {
00216   void initialize(in AString aLibraryId);
00217 
00221   void finalize();
00222 
00229   const unsigned long MGMT_TYPE_MANUAL            = 0;
00230 
00233   const unsigned long MGMT_TYPE_SYNC_ALL          = 1;
00234 
00237   const unsigned long MGMT_TYPE_SYNC_PLAYLISTS    = 2;
00238 
00246   attribute PRUint32 mgmtType;
00247 
00256   nsIArray getSyncPlaylistList();
00257 
00266   void setSyncPlaylistList(in nsIArray aPlaylistList);
00267 
00275   void addToSyncPlaylistList(in sbIMediaList aPlaylist);
00276   
00284   void sync();
00285 
00286 
00291   void addDeviceLibraryListener(in sbIDeviceLibraryListener aListener);
00292 
00297   void removeDeviceLibraryListener(in sbIDeviceLibraryListener aListener);
00298 };

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