|
a/upmpd/mpdcli.hxx |
|
b/upmpd/mpdcli.hxx |
|
... |
|
... |
21 |
#include <string>
|
21 |
#include <string>
|
22 |
#include <map>
|
22 |
#include <map>
|
23 |
|
23 |
|
24 |
class MpdStatus {
|
24 |
class MpdStatus {
|
25 |
public:
|
25 |
public:
|
|
|
26 |
MpdStatus()
|
|
|
27 |
: trackcounter(0), detailscounter(0)
|
|
|
28 |
{}
|
26 |
enum State {MPDS_UNK, MPDS_STOP, MPDS_PLAY, MPDS_PAUSE};
|
29 |
enum State {MPDS_UNK, MPDS_STOP, MPDS_PLAY, MPDS_PAUSE};
|
27 |
int volume;
|
30 |
int volume;
|
28 |
bool rept;
|
31 |
bool rept;
|
29 |
bool random;
|
32 |
bool random;
|
30 |
bool single;
|
33 |
bool single;
|
|
... |
|
... |
38 |
int songpos;
|
41 |
int songpos;
|
39 |
int songid;
|
42 |
int songid;
|
40 |
unsigned int songelapsedms; //current ms
|
43 |
unsigned int songelapsedms; //current ms
|
41 |
unsigned int songlenms; // song millis
|
44 |
unsigned int songlenms; // song millis
|
42 |
unsigned int kbrate;
|
45 |
unsigned int kbrate;
|
|
|
46 |
unsigned int sample_rate;
|
|
|
47 |
unsigned int bitdepth;
|
|
|
48 |
unsigned int channels;
|
43 |
std::string errormessage;
|
49 |
std::string errormessage;
|
44 |
// Current song info. The keys are didl-lite names (which can be
|
50 |
// Current song info. The keys are didl-lite names (which can be
|
45 |
// attribute or element names
|
51 |
// attribute or element names
|
46 |
std::unordered_map<std::string, std::string> currentsong;
|
52 |
std::unordered_map<std::string, std::string> currentsong;
|
47 |
std::unordered_map<std::string, std::string> nextsong;
|
53 |
std::unordered_map<std::string, std::string> nextsong;
|
|
|
54 |
|
|
|
55 |
// Synthetized fields
|
|
|
56 |
int trackcounter;
|
|
|
57 |
int detailscounter;
|
48 |
};
|
58 |
};
|
49 |
|
59 |
|
50 |
class MPDCli {
|
60 |
class MPDCli {
|
51 |
public:
|
61 |
public:
|
52 |
MPDCli(const std::string& host, int port = 6600,
|
62 |
MPDCli(const std::string& host, int port = 6600,
|