|
a/src/ohproduct.cxx |
|
b/src/ohproduct.cxx |
|
... |
|
... |
38 |
using namespace std::placeholders;
|
38 |
using namespace std::placeholders;
|
39 |
|
39 |
|
40 |
static const string sTpProduct("urn:av-openhome-org:service:Product:1");
|
40 |
static const string sTpProduct("urn:av-openhome-org:service:Product:1");
|
41 |
static const string sIdProduct("urn:av-openhome-org:serviceId:Product");
|
41 |
static const string sIdProduct("urn:av-openhome-org:serviceId:Product");
|
42 |
|
42 |
|
|
|
43 |
static string csxml(
|
|
|
44 |
"<SourceList>"
|
|
|
45 |
" <Source>"
|
|
|
46 |
" <Name>PlayList</Name>"
|
|
|
47 |
" <Type>Playlist</Type>"
|
|
|
48 |
" <Visible>true</Visible>"
|
|
|
49 |
" </Source>"
|
|
|
50 |
" <Source>"
|
|
|
51 |
" <Name>UpnpAv</Name>"
|
|
|
52 |
" <Type>UpnpAv</Type>"
|
|
|
53 |
" <Visible>true</Visible>"
|
|
|
54 |
" </Source>"
|
|
|
55 |
);
|
|
|
56 |
|
43 |
OHProduct::OHProduct(UpMpd *dev, const string& friendlyname)
|
57 |
OHProduct::OHProduct(UpMpd *dev, const string& friendlyname, bool hasRcv)
|
44 |
: UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev),
|
58 |
: UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev),
|
45 |
m_roomOrName(friendlyname)
|
59 |
m_roomOrName(friendlyname)
|
46 |
{
|
60 |
{
|
|
|
61 |
if (hasRcv) {
|
|
|
62 |
csxml += string(" <Source>"
|
|
|
63 |
" <Name>Receiver</Name>"
|
|
|
64 |
" <Type>Receiver</Type>"
|
|
|
65 |
" <Visible>true</Visible>"
|
|
|
66 |
" </Source>");
|
|
|
67 |
}
|
|
|
68 |
csxml += string("</SourceList>");
|
|
|
69 |
|
47 |
dev->addActionMapping(this, "Manufacturer",
|
70 |
dev->addActionMapping(this, "Manufacturer",
|
48 |
bind(&OHProduct::manufacturer, this, _1, _2));
|
71 |
bind(&OHProduct::manufacturer, this, _1, _2));
|
49 |
dev->addActionMapping(this, "Model", bind(&OHProduct::model, this, _1, _2));
|
72 |
dev->addActionMapping(this, "Model", bind(&OHProduct::model, this, _1, _2));
|
50 |
dev->addActionMapping(this, "Product",
|
73 |
dev->addActionMapping(this, "Product",
|
51 |
bind(&OHProduct::product, this, _1, _2));
|
74 |
bind(&OHProduct::product, this, _1, _2));
|
|
... |
|
... |
69 |
bind(&OHProduct::attributes, this, _1, _2));
|
92 |
bind(&OHProduct::attributes, this, _1, _2));
|
70 |
dev->addActionMapping(this, "SourceXmlChangeCount",
|
93 |
dev->addActionMapping(this, "SourceXmlChangeCount",
|
71 |
bind(&OHProduct::sourceXMLChangeCount, this, _1, _2));
|
94 |
bind(&OHProduct::sourceXMLChangeCount, this, _1, _2));
|
72 |
}
|
95 |
}
|
73 |
|
96 |
|
74 |
static const string csxml(
|
|
|
75 |
"<SourceList>"
|
|
|
76 |
"<Source>"
|
|
|
77 |
"<Name>PlayList</Name>"
|
|
|
78 |
"<Type>Playlist</Type>"
|
|
|
79 |
"<Visible>true</Visible>"
|
|
|
80 |
"</Source>"
|
|
|
81 |
"</SourceList>"
|
|
|
82 |
);
|
|
|
83 |
|
97 |
|
84 |
static const string csattrs("Info Time Volume");
|
98 |
static const string csattrs("Info Time Volume");
|
85 |
static const string csversion(PACKAGE_VERSION);
|
99 |
static const string csversion(PACKAGE_VERSION);
|
86 |
static const string csmanname("UpMPDCli heavy industries Co.");
|
100 |
static const string csmanname("UpMPDCli heavy industries Co.");
|
87 |
static const string csmaninfo("Such nice guys and gals");
|
101 |
static const string csmaninfo("Such nice guys and gals");
|
88 |
static const string csmanurl("http://www.lesbonscomptes.com/upmpdcli");
|
102 |
static const string csmanurl("http://www.lesbonscomptes.com/upmpdcli");
|
89 |
static const string csmodname("UpMPDCli UPnP-MPD gateway");
|
103 |
static const string csmodname("UpMPDCli UPnP-MPD gateway");
|
90 |
static const string csmodurl("http://www.lesbonscomptes.com/upmpdcli");
|
104 |
static const string csmodurl("http://www.lesbonscomptes.com/upmpdcli");
|
91 |
static const string csprodname("Upmpdcli");
|
105 |
static const string csprodname("Upmpdcli");
|
|
|
106 |
|
92 |
bool OHProduct::getEventData(bool all, std::vector<std::string>& names,
|
107 |
bool OHProduct::getEventData(bool all, std::vector<std::string>& names,
|
93 |
std::vector<std::string>& values)
|
108 |
std::vector<std::string>& values)
|
94 |
{
|
109 |
{
|
95 |
//LOGDEB("OHProduct::getEventData" << endl);
|
110 |
//LOGDEB("OHProduct::getEventData" << endl);
|
96 |
// Our data never changes, so if this is not an unconditional
|
111 |
// Our data never changes, so if this is not an unconditional
|