Package elisa :: Package plugins :: Package base :: Package activities :: Module player_activity
[hide private]
[frames] | no frames]

Source Code for Module elisa.plugins.base.activities.player_activity

 1  # Elisa - Home multimedia server 
 2  # Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com). 
 3  # All rights reserved. 
 4  # 
 5  # This file is available under one of two license agreements. 
 6  # 
 7  # This file is licensed under the GPL version 3. 
 8  # See "LICENSE.GPL" in the root of this distribution including a special 
 9  # exception to use Elisa with Fluendo's plugins. 
10  # 
11  # The GPL part of Elisa is also available under a commercial licensing 
12  # agreement from Fluendo. 
13  # See "LICENSE.Elisa" in the root directory of this distribution package 
14  # for details on that license. 
15   
16   
17  __maintainer__ = 'Florian Boucault <florian@fluendo.com>' 
18   
19   
20  from elisa.base_components.activity import Activity 
21  from elisa.core import common 
22  from elisa.core.bus import bus_message 
23   
24 -class PlayerActivity(Activity):
25
26 - def get_model(self):
27 registry = common.application.plugin_registry 28 29 player_model = registry.create_component('base:player_model') 30 31 # TODO: make this configurable 32 playlist_activity = registry.create_component('base:default_playlist') 33 playlist_model = playlist_activity.get_model() 34 player_model.playlist = playlist_model 35 playlist_model.parent = player_model 36 37 player_model.activity = self 38 39 msg = bus_message.PlayerModel(player_model) 40 common.application.bus.send_message(msg) 41 42 return player_model
43