Package brisa :: Package core :: Module plugin_manager :: Class RootPlugin
[hide private]
[frames] | no frames]

Class RootPlugin

source code

            object --+    
                     |    
plugin.PluginInterface --+
                         |
                        RootPlugin

Root plugin for all plugins. Receives the first browse which returns the initial folder structure.

Instance Methods [hide private]
 
__init__(self)
Constructor for the _RootPlugin class.
source code
integer
_get_next_id(self)
Method to get the next plugin id.
source code
 
load(self)
Adds root containers for the root plugin.
source code
None or dict
get_container(self, title)
Method to get the container which is equal to the title parameter
source code
 
unload(self)
Unload implementation.
source code
string
browse(self, id, browse_flag, filter, starting_index, requested_count, sort_criteria)
Browse implementation.
source code
string
search(self, id, browse_flag, filter, starting_index, requested_count, sort_criteria)
TODO Search implementation.
source code
MemDIDLContainer
add_container(self, title, parent_id=-1, plugin=None)
Adds a container to the root plugin.
source code

Inherited from plugin.PluginInterface: execute, publish

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

Class Variables [hide private]
  name = "rootplugin"
  containers = {}

Inherited from plugin.PluginInterface: has_browse_filter, usage, watch

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor for the _RootPlugin class.

Overrides: object.__init__

_get_next_id(self)

source code 

Method to get the next plugin id.

Returns: integer
the next plugin id

load(self)

source code 

Adds root containers for the root plugin.

Overrides: plugin.PluginInterface.load

get_container(self, title)

source code 

Method to get the container which is equal to the title parameter

Parameters:
  • title (string) - the title of the container which you want to get
Returns: None or dict
The container, if it's there

unload(self)

source code 

Unload implementation.

Overrides: plugin.PluginInterface.unload

browse(self, id, browse_flag, filter, starting_index, requested_count, sort_criteria)

source code 

Browse implementation.

Parameters:
  • id (string) - object to be browsed
  • browse_flag (string) - UPnP flag
  • filter (string) - filter parameter
  • starting_index (ui4) - The starting intex of the browser
  • requested_count (ui4) - Requested number of entries under the object
  • sort_criteria (string) - sorting criteria
Returns: string
the results of the browsing action
Overrides: plugin.PluginInterface.browse

search(self, id, browse_flag, filter, starting_index, requested_count, sort_criteria)

source code 

TODO Search implementation.

Parameters:
  • str_object_id - object to be searched
  • browse_flag - UPnP flag
  • filter - filter parameter
  • starting_index - The starting intex of the browser
  • requested_count - Requested number of entries under the object
  • sort_criteria - sorting criteria
Returns: string
the results of the searching action
Overrides: plugin.PluginInterface.search

add_container(self, title, parent_id=-1, plugin=None)

source code 

Adds a container to the root plugin.

Parameters:
  • title (string) - title
  • parent_id (string) - parent id
  • plugin (Plugin) - container owner plugin
Returns: MemDIDLContainer
the added container