1 /***************************************************************************
2 * Copyright (C) 2008-2009 by Andrzej Rybczak *
3 * electricityispower@gmail.com *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
28 #ifdef HAVE_CURL_CURL_H
29 # include "curl/curl.h"
32 class Lyrics
: public Screen
<Scrollpad
>
38 const char *tag_close
;
39 bool (*not_found
)(const std::string
&);
43 Lyrics() : itsScrollBegin(0) { }
46 virtual void Resize();
47 virtual void SwitchTo();
49 virtual std::basic_string
<my_char_t
> Title();
51 virtual void Update();
53 virtual void EnterPressed() { }
54 virtual void SpacePressed();
56 virtual bool allowsSelection() { return false; }
58 virtual List
*GetList() { return 0; }
65 # ifdef HAVE_CURL_CURL_H
66 static const char *GetPluginName(int offset
);
68 static const unsigned DBs
;
69 # endif // HAVE_CURL_CURL_H
75 std::string itsFilenamePath
;
77 static const std::string Folder
;
79 # ifdef HAVE_CURL_CURL_H
80 static void *Get(void *);
82 # ifdef HAVE_PTHREAD_H
84 # endif // HAVE_PTHREAD_H
86 static const Plugin
*ChoosePlugin(int);
87 static bool LyricsPlugin_NotFound(const std::string
&);
91 # ifdef HAVE_PTHREAD_H
92 static pthread_t
*Downloader
;
93 # endif // HAVE_PTHREAD_H
95 static const char *PluginsList
[];
96 static const Plugin LyricsPlugin
;
97 # endif // HAVE_CURL_CURL_H
99 size_t itsScrollBegin
;
103 extern Lyrics
*myLyrics
;