feat(mpd): Add support for play/pause icons

This commit is contained in:
Minijackson
2019-04-17 13:55:08 +02:00
parent 557b786ce0
commit cbfcec4867
2 changed files with 41 additions and 7 deletions

View File

@ -14,8 +14,11 @@ class MPD : public ALabel {
private:
std::thread worker();
void setLabel();
std::string getStateIcon();
void tryConnect();
void checkErrors();
void fetchState();
void waitForEvent();
@ -28,10 +31,11 @@ class MPD : public ALabel {
// Not using unique_ptr since we don't manage the pointer
// (It's either nullptr, or from the config)
const char* server_;
unsigned port_;
const unsigned port_;
unique_connection connection_;
unique_status status_;
mpd_state state_;
unique_song song_;
bool stopped_;