-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpd.h
48 lines (34 loc) · 787 Bytes
/
mpd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef MPD_H
#define MPD_H
#include <mpd/connection.h>
#include <string>
class Mpd {
public:
Mpd();
~Mpd();
bool connect( const std::string& host );
void off();
void on();
void toggleOnOff();
void toggleOnOff( bool& isOn );
void previousTrack();
void nextTrack();
void deltaVolume( int delta );
void volumeUp();
void volumeUp( unsigned& percentOn );
void volumeDown();
void volumeDown( unsigned& percentOn );
void idleBegin();
void idleEnd( bool& stateChanged );
int getFd();
bool getIsOn() const { return isOn_; }
private:
Mpd& operator=( const Mpd& other );
Mpd( const Mpd& other );
void printConnectionError( const std::string& prefix );
void updateIsOn();
mpd_connection* connection_;
bool isOn_;
unsigned volumePercent_;
};
#endif // MPD_H