minor
[monky] / src / xmms.h
1 /* -------------------------------------------------------------------------
2  * xmms.h:  conky support for XMMS-related projects
3  * 
4  * Copyright (C) 2005  Philip Kovacs kovacsp3@comcast.net
5  *
6  * $Id$
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21  * --------------------------------------------------------------------------- */
22
23 #ifndef XMMS_H
24 #define XMMS_H
25
26 enum _xmms_items {
27         XMMS_STATUS=0,
28         XMMS_TITLE,
29         XMMS_LENGTH,
30         XMMS_LENGTH_SECONDS,
31         XMMS_POSITION,
32         XMMS_POSITION_SECONDS,
33         XMMS_BITRATE,
34         XMMS_FREQUENCY,
35         XMMS_CHANNELS,
36         XMMS_FILENAME,
37         XMMS_PLAYLIST_LENGTH,
38         XMMS_PLAYLIST_POSITION,
39 };
40
41 enum _xmms_projects {
42         PROJECT_NONE = 0,
43         PROJECT_XMMS = 1,
44         PROJECT_BMP = 2,
45         PROJECT_AUDACIOUS = 3,
46         PROJECT_INFOPIPE = 4
47 };
48
49 #define SET_XMMS_PROJECT_AVAILABLE(mask,project)        (mask |= (1<<project))
50 #define TEST_XMMS_PROJECT_AVAILABLE(mask,project)       (mask & (1<<project))
51
52 /* 12 slots for the xmms values */
53 typedef char xmms_t[12][128];
54
55 /* create a worker thread for xmms media player status */
56 int create_xmms_thread(void);
57
58 /* destroy xmms media player worker thread */
59 int destroy_xmms_thread(void);
60
61 /* Service routine for the conky main thread */
62 void update_xmms(void);
63
64 /* Thread functions */
65 void *xmms_thread_func_dynamic(void *);
66 void *xmms_thread_func_infopipe(void *);
67
68 #endif