Songbird / Development / Songbird Add-Ons API Documentation

components/mediaimport/uri/public/sbIURIImportService.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 nsIMutableArray;
00030 interface nsIDOMWindow;
00031 interface sbIMediaList;
00032 interface sbIMediaItem;
00033 
00034 
00035 //
00036 // @brief Callback listener interface for an import job.
00037 //
00038 [scriptable, uuid(7E0C19F8-64D4-418D-B7A6-B89EE92B7721)]
00039 interface sbIRUIImportListener : nsISupports
00040 {
00041   //
00042   // @brief Callback method when the import of URIs is complete.
00043   // @param aTargetMediaList The target media list.
00044   // @param aTotalImportCount The number of items that where imported
00045   // @param aTotalDupeCount The number of duplicates found
00046   // @param aTotalInserted The number of media items that where inserted into
00047   //        the target media list.
00048   // @param aOtherDrops Other items that were not imported.
00049   //
00050   void onImportComplete(in sbIMediaList aTargetMediaList,
00051                         in unsigned long aTotalImportCount,
00052                         in unsigned long aTotalDupeCount,
00053                         in unsigned long aTotalInserted,
00054                         in unsigned long aOtherDrops);
00055 
00056   //
00057   // @brief Callback method when the first media item has been inserted.
00058   // @param aTargetMediaList The target media list of the import
00059   // @param aTargetMediaItem The first inserted media item.
00060   //
00061   void onFirstMediaItem(in sbIMediaList aTargetMediaList,
00062                         in sbIMediaItem aTargetMediaItem);
00063 };
00064 
00065 //------------------------------------------------------------------------------
00066 
00067 //
00068 // @brief Import service to help assist with inputing several URIs into a
00069 //        associated medialist. For callback information about the status
00070 //        of the import, see |sbIRUIImportListener|.
00071 //
00072 [scriptable, uuid(F9BC0B02-C078-47A3-91C3-3F00EA0CF8A1)]
00073 interface sbIURIImportService : nsISupports
00074 {
00075   //
00076   // @brief Start a import of a URI array.
00077   // @param aURIArray The array of URIs to import into the medialist.
00078   // @param aDOMWindow The parent window to show progress off of.
00079   // @param aTargetMediaList The media list to insert the media items created
00080   //                         from the URI array into.
00081   // @param aTargetPosition The position to insert media items into at. This
00082   //                        value can be -1 if the position does not matter.
00083   // @param aImportListener The callback listener that implements 
00084   //                        |sbIURIImportListener|.
00085   //
00086   void importURIArray(in nsIMutableArray aURIArray,
00087                       in nsIDOMWindow aDOMWindow,
00088                       in sbIMediaList aTargetMediaList,
00089                       in long aTargetPosition,
00090                       in sbIRUIImportListener aImportListener);
00091 };
00092 

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