sbIMediacoreSequencer.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 
25 #include "nsISupports.idl"
26 
27 interface nsIArray;
28 interface nsIURI;
29 
30 interface sbIMediacore;
31 interface sbIMediacoreSequence;
33 interface sbIMediaItem;
34 interface sbIMediaListView;
35 
36 [scriptable, uuid(ddce2b50-d69d-11df-937b-0800200c9a66)]
38 {
44  const unsigned long MODE_FORWARD = 0;
45  const unsigned long MODE_REVERSE = 1;
46  const unsigned long MODE_SHUFFLE = 1 << 1;
47 
48  const unsigned long MODE_CUSTOM = 1 << 16;
49 
50  attribute unsigned long mode;
51 
58  const unsigned long MODE_REPEAT_NONE = 0;
59  const unsigned long MODE_REPEAT_ONE = 1;
60  const unsigned long MODE_REPEAT_ALL = 1 << 1;
61 
62  attribute unsigned long repeatMode;
63 
68 
74  readonly attribute unsigned long viewPosition;
75 
82  readonly attribute sbIMediaItem currentItem;
83 
90  readonly attribute sbIMediaItem nextItem;
91 
97  readonly attribute nsIArray currentSequence;
98 
104  attribute unsigned long sequencePosition;
105 
120  void playView(in sbIMediaListView aView,
121  [optional] in long long aItemIndex,
122  [optional] in boolean aNotFromUserAction);
123 
134  const long AUTO_PICK_INDEX = -1;
135 
139  void playURL(in nsIURI aURI);
140 
144  void play();
145 
153  void stop([optional] in boolean aNotFromUserAction);
154 
162  void next([optional] in boolean aNotFromUserAction);
163 
171  void previous([optional] in boolean aNotFromUserAction);
172 
177  void requestHandleNextItem(in sbIMediacore aMediacore);
178 
185  void abort();
186 
187  // When in custom mode, this generator is used to generate the sequence.
189 };
void play()
Play the sequence.
const unsigned long MODE_CUSTOM
void playView(in sbIMediaListView aView, [optional] in long long aItemIndex, [optional] in boolean aNotFromUserAction)
Play a media list view as a sequence. Optionally provide the index of the item in the view that shoul...
attribute sbIMediaListView view
The view that was used to generate the current sequence.
readonly attribute sbIMediaItem nextItem
The next item in the sequence.
const unsigned long MODE_REPEAT_ONE
attribute unsigned long repeatMode
readonly attribute nsIArray currentSequence
The current sequence. It contains the indexes of the songs in the current sequence in the view...
var uuid
readonly attribute sbIMediaItem currentItem
The current item in the view.
A distinct view on a given media list.
const unsigned long MODE_FORWARD
The mode used to generate the sequence. Note that it is possible to disable shuffle mode using the pl...
attribute sbIMediacoreSequenceGenerator customGenerator
attribute unsigned long mode
void requestHandleNextItem(in sbIMediacore aMediacore)
Indicate that the current core will handle the next item in the sequence when the stream ends...
const unsigned long MODE_SHUFFLE
attribute unsigned long sequencePosition
The current position in the sequence. This position is tied to the viewPosition.
void abort()
Abort the current item playback attempt.
void playURL(in nsIURI aURI)
Play a single URL as a sequence.
const unsigned long MODE_REVERSE
readonly attribute unsigned long viewPosition
The current position in the view. This position is tied to the sequencePosition.
void stop([optional] in boolean aNotFromUserAction)
Stop the sequence.
const unsigned long MODE_REPEAT_ALL
void next([optional] in boolean aNotFromUserAction)
Go to the next item in the sequence.
const long AUTO_PICK_INDEX
Allow the sequencer to pick the most appropriate start index for a sequence.
Interface that defines a single item of media in the system.
const unsigned long MODE_REPEAT_NONE
The repeat mode to use. Note that it is possible to disable repeat mode using the playlist...
void previous([optional] in boolean aNotFromUserAction)
Go to the previous item in the sequence.