sbIMediaItemController.idl
Go to the documentation of this file.
1 /*
2  *=BEGIN SONGBIRD GPL
3  *
4  * This file is part of the Songbird web player.
5  *
6  * Copyright(c) 2005-2010 POTI, Inc.
7  * http://www.songbirdnest.com
8  *
9  * This file may be licensed under the terms of of the
10  * GNU General Public License Version 2 (the ``GPL'').
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the GPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the GPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/gpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  *=END SONGBIRD GPL
23  */
24 
31 #include "sbIMediaItem.idl"
32 interface nsIDOMWindow;
33 
40 [scriptable, uuid(749a5b2d-8610-4ea0-96fe-46d120055045)]
42 {
60  void onValidatePlaybackComplete(in sbIMediaItem aItem, in long aResult);
61 };
62 
78 [scriptable, uuid(f888f0c0-c805-11df-bd3b-0800200c9a66)]
80 {
84  boolean isItemDisabled(in sbIMediaItem aMediaItem);
85 
86  /*
87  * \brief Called when a mediaitem is about to be played by the
88  * mediacore sequencer. By the time this method is called, the
89  * sequencer has been put on hold and is listening for the
90  * controller's onValidatePlaybackComplete event (see
91  * sbIMediaItemControllerListener) so as to resume when the
92  * validation process has completed.
93  *
94  * \param aItem The item about to be played back
95  * \param aFromUserAction True if the user specifically requested playback
96  * for the item, false if the sequencer advanced on
97  * its own to next item.
98  * \param aListener An interface to receive completion callbacks
99  *
100  * Note that the mediacore sequencer monitor is being held when this method
101  * is called, implementors should not call back into the sequencer except
102  * from the same thread.
103  */
104  void validatePlayback(in sbIMediaItem aItem,
105  in boolean aFromUserAction,
106  in sbIMediaItemControllerListener aListener);
107 
108  /*
109  * \brief Called to validate whether the streaming media item is accessible.
110  * By the time this method is called, the caller should be put on hold
111  * and is listening for the controller's onValidatePlaybackComplete
112  * event (see sbIMediaItemControllerListener) so as to resume when the
113  * validation process has completed.
114  *
115  * \param aItem The item to be validated.
116  * \param aFromUserAction True if the user specifically requested validation.
117  * for the item, false to skip to the next item.
118  * \param aPromptLoginOnce True if only prompt for login once.
119  * \param aListener An interface to receive completion callbacks.
120  */
121  void validateStreaming(in sbIMediaItem aItem,
122  in boolean aFromUserAction,
123  in boolean aPromptLoginOnce,
124  in sbIMediaItemControllerListener aListener);
125 };
126 
127 %{C++
128 // This is the partial contract id for an sbIMediaItemController implementor.
129 // The appropriate mediaItem trackType should be appended to this string to
130 // construct the full contract id of a controller for a given item.
131 #define SB_MEDIAITEMCONTROLLER_PARTIALCONTRACTID \
132  "@songbirdnest.com/Songbird/library/mediaitemcontroller;1?type="
133 %}
134 
boolean isItemDisabled(in sbIMediaItem aMediaItem)
Determines if the item should be disabled in playlists.
void validatePlayback(in sbIMediaItem aItem, in boolean aFromUserAction, in sbIMediaItemControllerListener aListener)
var uuid
Interface to receive events from a mediaItemController.
const long VALIDATEPLAYBACKCOMPLETE_PROCEED
Result constant for onValidatePlaybackComplete used to proceed with playing the validated item...
function C(H)
const nsIDOMWindow
Definition of the sbIMediaItem interface.
void onValidatePlaybackComplete(in sbIMediaItem aItem, in long aResult)
Event triggered when the controller is done validating playback for an item.
Interface that defines a single item of media in the system.
void validateStreaming(in sbIMediaItem aItem, in boolean aFromUserAction, in boolean aPromptLoginOnce, in sbIMediaItemControllerListener aListener)
Interface that defines a mediaitem controller.
const long VALIDATEPLAYBACKCOMPLETE_SKIP
Result constant for onValidatePlaybackComplete used to skip item and continue on with the next in que...