Package elisa :: Package plugins :: Package bad :: Package coherence_plugin :: Module upnp_media_server :: Class UPnPMediaServer
[hide private]
[frames] | no frames]

Class UPnPMediaServer

source code


Provides UPnP clients access to UPnP resources

Nested Classes [hide private]

Inherited from core.component.Component: __metaclass__

Instance Methods [hide private]
 
__init__(self)
Lazily set name from class name styled with underscores (class ComponentBar -> name component_bar.
source code
 
initialize(self)
Initialize various variables internal to the Component.
source code
 
_bus_message_received(self, msg, sender) source code
 
clean(self)
Perform some cleanups and save the Component config back to application's config.
source code
 
add_media_location(self, location) source code
 
remove_media_location(self, location) source code
 
enable_coherence(self, host, port) source code
 
_next_id(self) source code
 
_got_children(*args, **kwargs)
 
_db_filter(self, kind, media_type, parent) source code
 
_get_containers(self, tree, parent='frontend') source code
 
_node_to_dict(self, node, parent_id) source code
 
remote_get_media_root_id(self, media_type) source code
 
remote_get_media_node_with_id(self, container_id)
Returns a dict with following keys: id = id in the media db parent_id = parent_id in the media db name = title, album name or basename mimetype = 'directory' or real mimetype size = in bytes (??) children = list of objects for which this item is the parent location = filesystem path if item is a file
source code

Inherited from twisted.spread.flavors.Referenceable: jellyFor, remoteMessageReceived

Inherited from twisted.spread.flavors.Serializable: processUniqueID

Inherited from twisted.spread.jelly.Jellyable: __providedBy__, getStateFor

Inherited from base_components.service_provider.ServiceProvider: start, stop

Inherited from core.component.Component: load_config, save_config

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]

Inherited from core.component.Component: __classinit__

Class Variables [hide private]
  tree = {'0': ('Elisa', {'A': ('Music', {'A': ('All', {'content...
string name = 'u_pn_p_media_server'
Component's name

Inherited from twisted.spread.flavors.Referenceable: __implemented__, __provides__, perspective

Inherited from core.component.Component: checked, config_doc, default_config, id, plugin

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from core.component.Component: config, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Lazily set name from class name styled with underscores (class ComponentBar -> name component_bar. Also set log category based on component name, with a 'comp_' prefix.
Overrides: core.component.Component.__init__
(inherited documentation)

initialize(self)

source code 

Initialize various variables internal to the Component.

This method is called by the plugin_registry after the component's config has been loaded.

Override this method if you need to perform some initializations that would normally go in Component's constructor but can't be done there because they require access to the component's config.
Overrides: core.component.Component.initialize
(inherited documentation)

clean(self)

source code 
Perform some cleanups and save the Component config back to application's config. This method should be called by the elisa.core.manager.Manager holding the component reference when it stops itself.
Overrides: core.component.Component.clean
(inherited documentation)

_got_children(*args, **kwargs)

 
Decorators:
  • @defer.deferredGenerator

Class Variable Details [hide private]

tree

Value:
{'0': ('Elisa',
       {'A': ('Music',
              {'A': ('All', {'content': (0, 'audio', None)}),
               'B': ('By artist',
                     {'content': elisa://localhost/artists/}),
               'C': ('By album',
                     {'content': elisa://localhost/albums/}),
               'D': ('By folder', {'content': (1, 'audio', None)})}),
...