lyrics: redesigned plugins system

This commit is contained in:
Andrzej Rybczak
2010-08-09 11:39:41 +02:00
parent d3cb0ea6f6
commit daad444f3c
11 changed files with 209 additions and 195 deletions

View File

@@ -27,14 +27,6 @@
class Lyrics : public Screen<Scrollpad>
{
struct Plugin
{
const char *url;
const char *tag_open;
const char *tag_close;
bool (*not_found)(const std::string &);
};
public:
Lyrics() : itsScrollBegin(0) { }
~Lyrics() { }
@@ -58,12 +50,6 @@ class Lyrics : public Screen<Scrollpad>
static bool Reload;
# ifdef HAVE_CURL_CURL_H
static const char *GetPluginName(int offset);
static const unsigned DBs;
# endif // HAVE_CURL_CURL_H
protected:
virtual void Init();
@@ -79,20 +65,12 @@ class Lyrics : public Screen<Scrollpad>
void Take();
# endif // HAVE_PTHREAD_H
static const Plugin *ChoosePlugin(int);
//static bool LyricsPlugin_NotFound(const std::string &);
static bool Generic_NotFound(const std::string &);
static bool Ready;
# ifdef HAVE_PTHREAD_H
static pthread_t *Downloader;
# endif // HAVE_PTHREAD_H
static const char *PluginsList[];
//static const Plugin LyricsPlugin;
static const Plugin LyrcComAr;
static const Plugin Lyricsfly;
# endif // HAVE_CURL_CURL_H
size_t itsScrollBegin;