infopipe tweaking
[monky] / src / infopipe.h
1 /* -------------------------------------------------------------------------
2  * infopipe.h:  conky support for XMMS/BMP InfoPipe plugin
3  * 
4  * InfoPipe: http://www.beastwithin.org/users/wwwwolf/code/xmms/infopipe.html
5  *
6  * Copyright (C) 2005  Philip Kovacs kovacsp3@comcast.net
7  *
8  * Based on original ideas and code graciously presented by:
9  * Ulrich Jansen - ulrich( dot )jansen( at )rwth-aachen.de
10  *
11  * $Id$
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
26  * --------------------------------------------------------------------------- */
27
28 #ifndef INFOPIPE_H
29 #define INFOPIPE_H
30
31 /* The named pipe created by the infopipe plugin (actually a symlink) */
32 #define INFOPIPE_NAMED_PIPE "/tmp/xmms-info"
33
34 /* 14 keys comprise the output of the infopipe plugin. */
35 enum _infopipe_keys {
36         INFOPIPE_PROTOCOL,
37         INFOPIPE_VERSION,
38         INFOPIPE_STATUS,
39         INFOPIPE_PLAYLIST_TUNES,
40         INFOPIPE_PLAYLIST_CURRTUNE,
41         INFOPIPE_USEC_POSITION,
42         INFOPIPE_POSITION,
43         INFOPIPE_USEC_TIME,
44         INFOPIPE_TIME,
45         INFOPIPE_BITRATE,
46         INFOPIPE_FREQUENCY,
47         INFOPIPE_CHANNELS,
48         INFOPIPE_TITLE,
49         INFOPIPE_FILE
50 };
51
52 /* 14 slots for the infopipe values */
53 typedef char infopipe_t[14][128];
54
55 /* Service routine for the conky main thread */
56 void update_infopipe(void);
57
58 /* Thread function */
59 void *infopipe_thread_func(void *);
60
61 #endif