Logo Search packages:      
Sourcecode: banshee-community-extensions version File versions  Download package

Banshee::LiveRadio::Plugins::LiveRadioBasePlugin Class Reference

Inheritance diagram for Banshee::LiveRadio::Plugins::LiveRadioBasePlugin:

Banshee::LiveRadio::Plugins::ILiveRadioPlugin Banshee::LiveRadio::Plugins::Live365Plugin Banshee::LiveRadio::Plugins::MagnatunePlugin Banshee::LiveRadio::Plugins::ShoutCastPlugin Banshee::LiveRadio::Plugins::XiphOrgPlugin

List of all members.


Detailed Description

An abstact base plugin for LiveRadio plugins. Should normally be the parent class of all plugins. Implements the ILiveRadioPlugin interface and provides a lot of basic functionality for plugins:

derived classes must implement the following abstract members:

derived classes may override the following virtual members:

Errors should be reported through the RaiseErrorReturned () method.

Definition at line 92 of file LiveRadioBasePlugin.cs.


Public Member Functions

virtual SafeUri CleanUpUrl (SafeUri url)
 Cleans up any plugin specific data from a track url, such as session data or any other temporary parameters.
virtual void Disable ()
 Method that will disable the plugin. Must set Enabled Property to false and should disable any background tasks.
void ExecuteRequest (LiveRadioRequestType request_type, string query)
 Method capsuling the actual RetrieveRequest worker method with a background worker thread.
virtual void Initialize ()
 Initializes the plugin by retrieving its genre list.
 LiveRadioBasePlugin (bool has_login)
 Full Constructor -- creates the genres list object and the cached_results dictionary.
 LiveRadioBasePlugin ()
 Parameterless Constructor, assumes that it will handle an internet radio directory without user credentials processing.
void RaiseErrorReturned (string short_message, string long_message)
 Raises the ErrorReturned event.
void RaiseGenreListLoaded ()
 Raises the GenreListLoaded event.
void RaiseRequestResultRetrieved (LiveRadioRequestType request_type, string query)
 Raises the ResultsRetrieved event.
void RetrieveGenreList ()
 Method capsuling the actual RetrieveGenres worker method with a background worker thread.
abstract void SaveConfiguration ()
 Actual method that does the work of saving the configuration for this plugin. For examples see derived classes. There are no predefined SchemaEntry objects, the derived class needs to take care of those.
virtual void SetLiveRadioPluginSource (LiveRadioPluginSource source)
 Set the LiveRadioPluginSource of the plugin.
override string ToString ()
 Return a string most likely unique to the plugin, best practice is to return the name of the plugin.

Protected Member Functions

void OnErrorReturned (string short_message, string long_message)
 Method to invoke the ErrorReturned event.
void OnGenreListLoaded ()
 Method to invoke the GenreListLoaded event.
void OnRequestResultRetrieved (LiveRadioRequestType request_type, string query, List< DatabaseTrackInfo > result)
 Method to invoke the RequestResultRetrieved event.
abstract void RetrieveGenres ()
 Actual method that does the work of retrieving the list of genres from an outside source. This method must take care of retrieving the data (possibly using the provided RetrieveXML method), parsing it, and filling the.
abstract void RetrieveRequest (LiveRadioRequestType request_type, string query)
 Actual method that does the work of retrieving the results of a user query from an outside source. This method must take care of retrieving the data (possibly using the provided RetrieveXML method). parsing it, and filling the.
XmlDocument RetrieveXml (string query)
 Retrieves, reads and returns an XML document from the specified query url using HTTP GET.

Protected Attributes

Dictionary< string, List
< DatabaseTrackInfo > > 
cached_results
LiveRadioPluginConfigurationWidget configuration_widget
string credentials_password
string credentials_username
List< Genregenres
bool has_login
int http_timeout_seconds
string proxy_url
LiveRadioPluginSource source
bool use_credentials
bool use_proxy

Properties

virtual Widget ConfigurationWidget [get]
 Always returns a new standard Configration Widget with all base Properties set.
bool Enabled [get]
 Must truthfully return, if the plugin is enabled. A plugin is enabled, if it has been initialized and not been disabled afterwards.
List< GenreGenres [get]
 Returns the list of genres.
string HttpPassword [get, set]
int HttpTimeout [get, set]
string HttpUsername [get, set]
string IsEnabled [get]
 Should return "Yes" if enabled, and "No" if not enabled.
abstract string Name [get]
 Returns a plugin name unique to the implementing plugin.
LiveRadioPluginSource PluginSource [get]
 Returns the LiveRadioPluginSource for this plugin.
string ProxyUrl [get, set]
bool UseCredentials [get, set]
bool UseProxy [get, set]
abstract string Version [get]
 Returns the version information for the plugin.

Events

ErrorReturnedEventHandler ErrorReturned
 Event raised when an Error occurs in a plugin.
GenreListLoadedEventHandler GenreListLoaded
 Event raised when a genre list has been retrieved by the plugin.
RequestResultRetrievedEventHandler RequestResultRetrieved
 Event raised when a query result has been retrieved by the plugin.

Private Member Functions

void DoExecuteRequest (object sender, DoWorkEventArgs e)
 The background worker asynchronous thread method calling the worker method.
void DoRetrieveGenreList (object sender, DoWorkEventArgs e)
 The background worker asynchronous thread method calling the worker method.
void OnDoExecuteRequestFinished (object sender, RunWorkerCompletedEventArgs e)
 Method executed upon the completion of the background worker method.
void OnDoRetrieveGenreListFinished (object sender, RunWorkerCompletedEventArgs e)
 Method executed upon the completion of the background worker method.

Private Attributes

bool enabled

Classes

class  LiveRadioRequestObject
 Internal object to capsule request type and actual query. More...

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index