Part of elisa.core.tests.test_media_manager View In Hierarchy
Line # | Kind | Name | Docs |
---|---|---|---|
26 | Method | supported_uri_schemes__get | Retrieve the URI schemes supported by the provider, for each |
Inherited from MediaProvider:
Line # | Kind | Name | Docs |
---|---|---|---|
69 | Method | scannable_uri_schemes__get | Retrieve the URI schemes that can be scanned by the |
112 | Method | get_real_uri | Returns the original uri (acesable) from a virtual |
124 | Method | get_media_type | Same as blocking_get_media_type but without blocking
(in
|
136 | Method | _blocking_get_media_type | Try to guess the maximum information from the media located |
156 | Method | is_directory | Same as _blocking_is_directory
but without blocking (in
|
168 | Method | _blocking_is_directory | return True if a directory |
178 | Method | has_children_with_types | Same as _blocking_has_children_with_types
but without blocking (in
|
193 | Method | _blocking_has_children_with_types | Detect whether the given uri has children for given media |
207 | Method | get_direct_children | Same as _blocking_get_direct_children
but without blocking (in
|
222 | Method | _blocking_get_direct_children | Scan the data located at given uri and return informations |
251 | Method | open | Same as _blocking_open
but without blocking (in
|
269 | Method | _blocking_open | Open an uri and return MediaFile. |
286 | Method | close | Same as _blocking_close
but without blocking (in
|
298 | Method | _blocking_close | Close a MediaFile |
308 | Method | seek | Same as _blocking_seek
but without blocking (in
|
325 | Method | _blocking_seek | Seek data in a MediaFile |
339 | Method | read | Same as _blocking_seek
but without blocking (in
|
353 | Method | _blocking_read | Read data from a MediaFile |
371 | Method | next_location | Same as _blocking_next_location
but without blocking (in
|
386 | Method | _blocking_next_location | Return the uri just next to given uri. |
399 | Method | previous_location | Same as _blocking_previous_location
but without blocking (in
|
412 | Method | _blocking_previous_location | Return the uri found before given uri |
422 | Method | monitor_uri | Start monitoring given uri for modification and call a |
441 | Method | unmonitor_uri | Stop monitoring given uri. |
450 | Method | uri_is_monitorable | Check if the uri is monitorable for modification |
461 | Method | uri_is_monitored | Check if the uri is currently monitored for modification |
473 | Method | copy | Copy one location to another. If both URIs represent a |
492 | Method | move | Move data located at given URI to another URI. If orig_uri |
509 | Method | delete | Delete a resource located at given URI. If that URI represents |
Inherited from Component (via MediaProvider):
Line # | Kind | Name | Docs |
---|---|---|---|
85 | Class | PathDescriptor | Undocumented |
97 | Class Method | create | Create and initialize the component. |
130 | Method | initialize | Initialize the component. |
142 | Method | clean | Clean the component. |
Inherited from Loggable (via MediaProvider, Component):
Line # | Kind | Name | Docs |
---|---|---|---|
81 | Method | __init__ | Undocumented |
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