94d0d29088f08d6c80757f76f94c38e1d4085bc4
[monky] / src / mpd.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- */
2
3 #ifndef MPD_H_
4 #define MPD_H_
5
6 struct mpd_s {
7         char *title;
8         char *artist;
9         char *album;
10         const char *status;
11         const char *random;
12         const char *repeat;
13         char *track;
14         char *name;
15         char *file;
16         int is_playing;
17         int vol;
18         float progress;
19         int bitrate;
20         int length;
21         int elapsed;
22 };
23
24 /* functions for setting the configuration values */
25 void mpd_set_host(const char *);
26 void mpd_set_password(const char *, int);
27 void mpd_clear_password(void);
28 int mpd_set_port(const char *);
29
30 /* text object functions */
31 void init_mpd(void);
32 struct mpd_s *mpd_get_info(void);
33 void free_mpd(void);
34 void update_mpd(void);
35
36 void print_mpd_elapsed(struct text_object *, char *, int);
37 void print_mpd_length(struct text_object *, char *, int);
38 void print_mpd_percent(struct text_object *, char *, int);
39 void print_mpd_bar(struct text_object *, char *, int);
40 void print_mpd_smart(struct text_object *, char *, int);
41 void print_mpd_title(struct text_object *, char *, int);
42 void print_mpd_artist(struct text_object *, char *, int);
43 void print_mpd_album(struct text_object *, char *, int);
44 void print_mpd_random(struct text_object *, char *, int);
45 void print_mpd_repeat(struct text_object *, char *, int);
46 void print_mpd_track(struct text_object *, char *, int);
47 void print_mpd_name(struct text_object *, char *, int);
48 void print_mpd_file(struct text_object *, char *, int);
49 void print_mpd_vol(struct text_object *, char *, int);
50 void print_mpd_bitrate(struct text_object *, char *, int);
51 void print_mpd_status(struct text_object *, char *, int);
52
53 #endif /*MPD_H_*/