sbIMediaListListener.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 
33 #include "nsISupports.idl"
34 
35 interface sbIMediaItem;
36 interface sbIMediaList;
37 interface sbIPropertyArray;
38 
47 [scriptable, uuid(c5e933cc-1dd1-11b2-b51a-fab53acecdc4)]
49 {
59  boolean onItemAdded(in sbIMediaList aMediaList,
60  in sbIMediaItem aMediaItem,
61  in unsigned long aIndex);
62 
72  boolean onBeforeItemRemoved(in sbIMediaList aMediaList,
73  in sbIMediaItem aMediaItem,
74  in unsigned long aIndex);
75 
85  boolean onAfterItemRemoved(in sbIMediaList aMediaList,
86  in sbIMediaItem aMediaItem,
87  in unsigned long aIndex);
88 
99  boolean onItemUpdated(in sbIMediaList aMediaList,
100  in sbIMediaItem aMediaItem,
101  in sbIPropertyArray aProperties);
102 
112  boolean onItemMoved(in sbIMediaList aMediaList,
113  in unsigned long aFromIndex,
114  in unsigned long aToIndex);
115 
125  boolean onBeforeListCleared(in sbIMediaList aMediaList,
126  in boolean aExcludeLists);
127 
137  boolean onListCleared(in sbIMediaList aMediaList,
138  in boolean aExcludeLists);
139 
150  void onBatchBegin(in sbIMediaList aMediaList);
151 
162  void onBatchEnd(in sbIMediaList aMediaList);
163 };
164 
170 [scriptable, uuid(8060b316-1837-44df-a184-7f25c18ea4c0)]
172 {
173  const unsigned short CONTINUE = 0;
174  const unsigned short CANCEL = 1;
175 
185  unsigned short onEnumerationBegin(in sbIMediaList aMediaList);
186 
197  unsigned short onEnumeratedItem(in sbIMediaList aMediaList,
198  in sbIMediaItem aMediaItem);
199 
206  void onEnumerationEnd(in sbIMediaList aMediaList,
207  in nsresult aStatusCode);
208 };
209 
boolean onBeforeListCleared(in sbIMediaList aMediaList, in boolean aExcludeLists)
boolean onItemMoved(in sbIMediaList aMediaList, in unsigned long aFromIndex, in unsigned long aToIndex)
Called when a media item is moved.
boolean onBeforeItemRemoved(in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex)
Called before a media item is removed from the list.
void onBatchBegin(in sbIMediaList aMediaList)
Called when the library is about to perform multiple operations at once.
Interface used to enumerate the items in a media list.
unsigned short onEnumerationBegin(in sbIMediaList aMediaList)
Called when enumeration is about to begin.
var uuid
A brief description of the contents of this interface.
unsigned short onEnumeratedItem(in sbIMediaList aMediaList, in sbIMediaItem aMediaItem)
Called once for each item in the enumeration.
Interface used to listen to changes to a media list.
boolean onListCleared(in sbIMediaList aMediaList, in boolean aExcludeLists)
void onBatchEnd(in sbIMediaList aMediaList)
Called when the library has finished performing multiple operations at once.
boolean onAfterItemRemoved(in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex)
Called after a media item is removed from the list.
Interface that defines a single item of media in the system.
boolean onItemUpdated(in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in sbIPropertyArray aProperties)
Called when a media item is changed.
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...
boolean onItemAdded(in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex)
Called when a media item is added to the list.
void onEnumerationEnd(in sbIMediaList aMediaList, in nsresult aStatusCode)
Called when enumeration has completed.