X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmpd.h;h=d011fcee897a5cfc5ec139def9220b0fa53a1fa4;hb=d8f523936094f7de38b6333e7155b9934fea8344;hp=2ff1b84aaf10ef883f294f221afc8f420fa1f15c;hpb=0c5977952874dd1c36eeb10c3e2bced8204284f7;p=monky diff --git a/src/mpd.h b/src/mpd.h index 2ff1b84..d011fce 100644 --- a/src/mpd.h +++ b/src/mpd.h @@ -1,36 +1,53 @@ +/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- */ + #ifndef MPD_H_ #define MPD_H_ -#include "libmpdclient.h" -#include "timed_thread.h" - struct mpd_s { char *title; char *artist; char *album; - char *status; - char *random; - char *repeat; + const char *status; + const char *random; + const char *repeat; char *track; char *name; char *file; - int volume; - unsigned int port; - char host[128]; - char password[128]; + int is_playing; + int vol; float progress; int bitrate; int length; int elapsed; - mpd_Connection *conn; - timed_thread *timed_thread; }; -#include "conky.h" +/* functions for setting the configuration values */ +void mpd_set_host(const char *); +void mpd_set_password(const char *, int); +void mpd_clear_password(void); +int mpd_set_port(const char *); + +/* text object functions */ +void init_mpd(void); +struct mpd_s *mpd_get_info(void); +void free_mpd(void); +int update_mpd(void); -extern void init_mpd_stats(struct mpd_s *mpd); -void clear_mpd_stats(struct mpd_s *mpd); -void *update_mpd(void *) __attribute__((noreturn)); -void free_mpd_vars(struct mpd_s *mpd); +void print_mpd_elapsed(struct text_object *, char *, int); +void print_mpd_length(struct text_object *, char *, int); +void print_mpd_percent(struct text_object *, char *, int); +void print_mpd_bar(struct text_object *, char *, int); +void print_mpd_smart(struct text_object *, char *, int); +void print_mpd_title(struct text_object *, char *, int); +void print_mpd_artist(struct text_object *, char *, int); +void print_mpd_album(struct text_object *, char *, int); +void print_mpd_random(struct text_object *, char *, int); +void print_mpd_repeat(struct text_object *, char *, int); +void print_mpd_track(struct text_object *, char *, int); +void print_mpd_name(struct text_object *, char *, int); +void print_mpd_file(struct text_object *, char *, int); +void print_mpd_vol(struct text_object *, char *, int); +void print_mpd_bitrate(struct text_object *, char *, int); +void print_mpd_status(struct text_object *, char *, int); #endif /*MPD_H_*/