Make sure audacious-code compiles
[monky] / src / audacious.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2  * vim: ts=4 sw=4 noet ai cindent syntax=c
3  *
4  * audacious.h:  conky support for audacious music player
5  *
6  * Copyright (C) 2005-2007 Philip Kovacs pkovacs@users.sourceforge.net
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
21  * USA.
22  *
23  */
24
25 #ifndef AUDACIOUS_H
26 #define AUDACIOUS_H
27
28 #include "timed_thread.h"
29
30 enum _audacious_items {
31         AUDACIOUS_STATUS = 0,
32         AUDACIOUS_TITLE,
33         AUDACIOUS_LENGTH,
34         AUDACIOUS_LENGTH_SECONDS,
35         AUDACIOUS_POSITION,
36         AUDACIOUS_POSITION_SECONDS,
37         AUDACIOUS_BITRATE,
38         AUDACIOUS_FREQUENCY,
39         AUDACIOUS_CHANNELS,
40         AUDACIOUS_FILENAME,
41         AUDACIOUS_PLAYLIST_LENGTH,
42         AUDACIOUS_PLAYLIST_POSITION,
43         AUDACIOUS_MAIN_VOLUME,
44 };
45
46 /* 12 slots for the audacious values */
47 typedef char audacious_t[13][128];
48
49 /* type for data exchange with main thread */
50 typedef struct audacious_s {
51   audacious_t items;  /* e.g. items[AUDACIOUS_STATUS] */
52   int max_title_len;  /* e.g. ${audacious_title 50} */
53   timed_thread *p_timed_thread;
54 } AUDACIOUS_S;
55
56 /* create a worker thread for audacious media player status */
57 int create_audacious_thread(void);
58
59 /* destroy audacious media player worker thread */
60 int destroy_audacious_thread(void);
61
62 /* Service routine for the conky main thread */
63 int update_audacious(void);
64
65 /* Thread functions */
66 void *audacious_thread_func(void *);
67
68 #endif