annotate libaudacious/titlestring.h @ 883:c8d24c955736 trunk

[svn] - disable the scrobbler plugin if curl isn't there (for real)
author nenolod
date Sat, 25 Mar 2006 17:27:49 -0800
parents cb178e5ad177
children e4b17654a83b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /*
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 2001, Espen Skoglund <esk@ira.uka.de>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * modify it under the terms of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 * as published by the Free Software Foundation; either version 2
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * of the License, or (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 * 02111-1307, USA.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 #ifndef XMMS_TITLESTRING_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 #define XMMS_TITLESTRING_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 #include <gtk/gtk.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 /*
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 * Struct which is passed to xmms_get_titlestring(). An input struct
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 * is allocated and initialized with XMMS_NEW_TITLEINPUT(). Before
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 * passing the struct to xmms_get_titlestring() it should be filled
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 * with appropriate field values.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 gint __size; /* Set by XMMS_NEW_TITLEINPUT() */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 gint __version; /* Ditto */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 gchar *performer; /* %p */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 gchar *album_name; /* %a */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 gchar *track_name; /* %t */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 gint track_number; /* %n */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 gint year; /* %y */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 gchar *date; /* %d */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 gchar *genre; /* %g */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 gchar *comment; /* %c */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 gchar *file_name; /* %f */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 const gchar *file_ext; /* %e *//* is not always strdup'ed, see xmms_input_get_song_info and plugins! */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 gchar *file_path; /* %F */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 } TitleInput;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 typedef TitleInput BmpTitleInput;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 /*
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 * Using a __size field helps the library functions detect plugins
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 * that use a possibly extended version of the struct. The __version
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 * field helps the library detect possible future incompatibilities in
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 * the struct layout.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61 #define XMMS_TITLEINPUT_SIZE sizeof(TitleInput)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 #define XMMS_TITLEINPUT_VERSION (1)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 #define XMMS_NEW_TITLEINPUT(input) G_STMT_START { \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 input = g_new0(TitleInput, 1); \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 input->__size = XMMS_TITLEINPUT_SIZE; \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 input->__version = XMMS_TITLEINPUT_VERSION; \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 } G_STMT_END
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 G_BEGIN_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 TitleInput *bmp_title_input_new(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74 void bmp_title_input_free(BmpTitleInput * input);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76 gchar *xmms_get_titlestring(const gchar * fmt, TitleInput * input);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 GtkWidget *xmms_titlestring_descriptions(gchar * tags, gint rows);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 G_END_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 #endif /* !XMMS_TITLESTRING_H */