Package elisa :: Package core :: Package tests :: Module test_media_manager :: Class FooMediaProvider
[hide private]
[frames] | no frames]

Class FooMediaProvider

source code


Nested Classes [hide private]

Inherited from component.Component: __metaclass__

Instance Methods [hide private]
 
supported_uri_schemes__get(self)
Retrieve the URI schemes supported by the provider, for each scheme there's a priority.
source code

Inherited from base_components.media_provider.MediaProvider: close, copy, delete, get_direct_children, get_media_type, get_real_uri, has_children_with_types, is_directory, monitor_uri, move, next_location, open, previous_location, read, scannable_uri_schemes__get, seek, unmonitor_uri, uri_is_monitorable, uri_is_monitored

Inherited from component.Component: __init__, clean, initialize, 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 component.Component: __classinit__

Class Variables [hide private]

Inherited from base_components.media_provider.MediaProvider: name

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

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from component.Component: config, path

Properties [hide private]

Inherited from base_components.media_provider.MediaProvider: scannable_uri_schemes, supported_uri_schemes

Inherited from object: __class__

Method Details [hide private]

supported_uri_schemes__get(self)

source code 

Retrieve the URI schemes supported by the provider, for each scheme there's a priority. Higher priority == 0 means the provider will always be used to read data from a given scheme.

This function is called by the MediaManager to know which media provider it has to use to access a specified URI. You should return a dict containing the uri scheme (such as 'file', 'cdda', ...) and its priority between 0 to 255 (0 being the topmost priority). The prority is used by the MediaManager to know which media provider it should use in case there are more than one who support the desired uri scheme. You might have for example a component which supports more than one scheme, but the support of one of them is not very efficient compared to what it could be. In this case you could modify its priority to tell the MediaManager that another component should be used instead of it to access this scheme.

example: { 'file': 0, 'smb': 10 }

# FIXME: this should be documented in the class docstring as a class # variable
Overrides: base_components.media_provider.MediaProvider.supported_uri_schemes__get
(inherited documentation)