Modify version string to post-release version 11.8.17
[gmpc-lyrics.git] / src / gmpc-lyrics.h
blobc4946c459347aaba124e223f4bde83040aa3575a
1 /* gmpc-lyrics (GMPC plugin)
2 * Copyright (C) 2006-2009 Qball Cow <qball@sarine.nl>
3 * Copyright (C) 2006 Maxime Petazzoni <maxime.petazzoni@bulix.org>
4 * Project homepage: http://gmpc.wikia.com/
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __GMPC_LYRICS_H__
22 #define __GMPC_LYRICS_H__
24 #include <stdio.h>
25 #include <string.h>
26 #include <stdlib.h>
28 #include <config.h>
29 #include <glib.h>
30 #include <glib/gstdio.h>
31 #include <glib/gi18n-lib.h>
32 #include <libxml/parser.h>
33 #include <libxml/tree.h>
34 #include <libxml/xmlstring.h>
36 #include <libmpd/debug_printf.h>
38 #include <gmpc/plugin.h>
39 #include <gmpc/gmpc_easy_download.h>
41 /**
42 * We need gmpc's threading abstraction.
45 #define PLUGIN_AUTH "GMPC+Lyrics+Plugin"
46 #define USER_AGENT "User-Agent: GmpcSoapLyrics/0.1"
48 /* Lyrics plugin */
49 struct lyrics_api
51 gchar *name;
52 gchar *host;
54 gchar *search_full;
55 gchar *search_title;
57 gchar *lyrics_uri;
59 gchar *(*get_id)(xmlDocPtr results_doc, gchar *artist, gchar *songtitle, int exact);
60 gchar *(*get_lyrics)(const gchar *data, gssize length); /* should return the lyrics if availble or NULL else */
65 void lyrics_init (void);
66 void lyrics_enable_toggle (GtkWidget *wid);
67 void lyrics_api_changed (GtkWidget *wid);
68 void lyrics_construct (GtkWidget *container);
69 void lyrics_destroy (GtkWidget *container);
72 /* XML Parsing */
73 xmlNodePtr get_node_by_name (xmlNodePtr node, xmlChar *name);
75 /* LeosLyrics API */
76 gchar *__leoslyrics_get_id (xmlDocPtr results_doc, gchar *artist, gchar *songtitle, int exact);
77 gchar *__leoslyrics_get_lyrics (const gchar *srcdata, gssize srcsize);
79 /* LyricTracker API */
80 gchar *__lyrictracker_get_id (xmlDocPtr results_doc, gchar *artist, gchar *songtitle, int exact);
81 gchar *__lyrictracker_get_lyrics (const gchar *srcdata, gssize srcsize);
83 #endif