Package brisa :: Package core :: Module plugin :: Class PluginInterface
[hide private]
[frames] | no frames]

Class PluginInterface

source code

object --+
         |
        PluginInterface

The base class to all plugins. For writing plugins inherit from this class and set the appropriate values for your plugin:

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Initializes the base plugin.
source code
 
execute(self)
Loads the plugin media information into the database.
source code
 
load(self)
Forces subclasses to implement the load method.
source code
 
publish(self, webserver)
Publishes the plugin resources on the service's webserver.
source code
 
unload(self)
Unloads the plugin media information from memory.
source code
string
browse(self, str_object_id, browse_flag, filter, starting_index, requested_count, sort_criteria)
Browse implementation for the plugin.
source code
string
search(self, str_object_id, browse_flag, filter, starting_index, requested_count, sort_criteria)
Search implementation for the plugin.
source code

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

Class Variables [hide private]
  name = 'plugin_stub'
  usage = False
  watch = False
  has_browse_filter = False
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

Initializes the base plugin. If overwritten, remember to set plugin_manager to PluginManagerSingleton.

Overrides: object.__init__

publish(self, webserver)

source code 

Publishes the plugin resources on the service's webserver. Optional.

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

source code 

Browse implementation for the plugin. See Plugin documentation for information about the has_browse_filter flag.

Parameters:
  • str_object_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

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

source code 

Search implementation for the plugin.

Parameters:
  • str_object_id (string) - object to be searched
  • 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 searching action