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

Banshee::LiveRadio::Plugins::ShoutCastPlugin Class Reference

Inheritance diagram for Banshee::LiveRadio::Plugins::ShoutCastPlugin:

Banshee::LiveRadio::Plugins::LiveRadioBasePlugin Banshee::LiveRadio::Plugins::ILiveRadioPlugin

List of all members.

Detailed Description

LiveRadio plugin for shoutcast.com.

This plugin is able to download a genre list upon initialize/refresh and execute live queries on the shoutcast directory

Definition at line 49 of file ShoutCastPlugin.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.
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.
override void SaveConfiguration ()
 Saves the configuration for this plugin.
virtual void SetLiveRadioPluginSource (LiveRadioPluginSource source)
 Set the LiveRadioPluginSource of the plugin.
 ShoutCastPlugin ()
 Constructor -- sets configuration entries.
override string ToString ()
 Return a string most likely unique to the plugin, best practice is to return the name of the plugin.

Static Public Attributes

static readonly SchemaEntry
< string > 
static readonly SchemaEntry
< string > 
static readonly SchemaEntry
< string > 

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.
override void RetrieveGenres ()
 Retrieve and parse genre list.
override void RetrieveRequest (LiveRadioRequestType request_type, string query)
 Retrieve and parse a live query on the shoutcast directory.
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 > > 
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


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.
override string Name [get]
 The name of the plugin -- used as identifier and as label for the source header.
LiveRadioPluginSource PluginSource [get]
 Returns the LiveRadioPluginSource for this plugin.
string ProxyUrl [get, set]
bool UseCredentials [get, set]
bool UseProxy [get, set]
override string Version [get]
 Version of this plugin code.


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 ParseGenres (XmlDocument doc)
 Parses and sorts an XML genre catalog and fills the plugins genre list.
void ParseXmlResponse (XmlDocument xml_response, LiveRadioRequestType request_type, string query)
 Parses the response to a query request and fills the results cache.

Private Attributes

const string base_url = "http://www.shoutcast.com"
const string freetext_request = "?search="
const string genre_request = "?genre="
const string request_url = "/sbin/newxml.phtml"

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

Generated by  Doxygen 1.6.0   Back to index