Package elisa :: Package base_components :: Module playlist
[hide private]
[frames] | no frames]

Source Code for Module elisa.base_components.playlist

 1  # -*- coding: utf-8 -*- 
 2  # Elisa - Home multimedia server 
 3  # Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com). 
 4  # All rights reserved. 
 5  # 
 6  # This file is available under one of two license agreements. 
 7  # 
 8  # This file is licensed under the GPL version 3. 
 9  # See "LICENSE.GPL" in the root of this distribution including a special 
10  # exception to use Elisa with Fluendo's plugins. 
11  # 
12  # The GPL part of Elisa is also available under a commercial licensing 
13  # agreement from Fluendo. 
14  # See "LICENSE.Elisa" in the root directory of this distribution package 
15  # for details on that license. 
16   
17  """ 
18  Playlist management 
19  """ 
20   
21  __maintainer__ = 'Philippe Normand <philippe@fluendo.com>' 
22   
23   
24  from elisa.base_components.activity import Activity 
25   
26  # 
27  # Review by Benjamin Kampmann ( 24/08/2007 ): 
28  # how does loadmore work? how should it work? what should it exaclty do? 
29  # even looking in elisa/plugins/base/playlist/default_playlist.py didn't help 
30  # me... 
31   
32 -class Playlist(Activity):
33 """ Playlist 34 35 DOCME 36 """ 37
38 - def __init__(self):
39 """ Initialize the Component's instance variables 40 """ 41 Activity.__init__(self) 42 self._history = [] 43 self._current_uri = None 44 self.media_types = [] 45 self.loading = False
46
47 - def loadmore(self, model, start=0, end=None):
48 """ 49 Request new items to be loaded in the playlist. 50 51 @param model: DOCME 52 @type model: L{elisa.base_components.model.Model} 53 @param start: starting index 54 @type start: int 55 @param end: ending index, None means end of list 56 @type end: int or None 57 @rtype: L{twisted.internet.defer.Deferred} 58 """ 59 return None
60 61
62 - def empty(self):
63 """ Empty the playlist of all its URIs. 64 """
65
66 - def add_uri(self, uri, position=-1):
67 """ Add an URI to the playlist. 68 69 @param uri: the uri to add. if uri is a list, it will be directly 70 added to the list model. 71 @type uri: L{elisa.core.media_uri.MediaUri} or list 72 @param position: position of the list to update, -1 means appending 73 to the end 74 @type position: int 75 """
76