Switch to unified view

a/src/ohproduct.cxx b/src/ohproduct.cxx
...
...
51
51
52
// (Type, Name) list
52
// (Type, Name) list
53
static vector<pair<string, string> > o_sources;
53
static vector<pair<string, string> > o_sources;
54
54
55
OHProduct::OHProduct(UpMpd *dev, const string& friendlyname)
55
OHProduct::OHProduct(UpMpd *dev, const string& friendlyname)
56
    : UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev),
56
    : OHService(sTpProduct, sIdProduct, dev),
57
      m_roomOrName(friendlyname), m_sourceIndex(0), m_standby(false)
57
      m_roomOrName(friendlyname), m_sourceIndex(0), m_standby(false)
58
{
58
{
59
    // Playlist must stay first.
59
    // Playlist must stay first.
60
    o_sources.push_back(pair<string,string>("Playlist","Playlist"));
60
    o_sources.push_back(pair<string,string>("Playlist","Playlist"));
61
    if (m_dev->m_ohrd) {
61
    if (m_dev->m_ohrd) {
...
...
155
    st["Attributes"] = csattrs;
155
    st["Attributes"] = csattrs;
156
156
157
    return true;
157
    return true;
158
}
158
}
159
159
160
bool OHProduct::getEventData(bool all, std::vector<std::string>& names, 
161
                             std::vector<std::string>& values)
162
{
163
    //LOGDEB("OHProduct::getEventData" << endl);
164
165
    unordered_map<string, string> state;
166
    makestate(state);
167
168
    unordered_map<string, string> changed;
169
    if (all) {
170
        changed = state;
171
    } else {
172
        changed = diffmaps(m_state, state);
173
    }
174
    m_state = state;
175
176
    for (auto it = changed.begin(); it != changed.end(); it++) {
177
        names.push_back(it->first);
178
        values.push_back(it->second);
179
    }
180
181
    return true;
182
}
183
184
int OHProduct::manufacturer(const SoapIncoming& sc, SoapOutgoing& data)
160
int OHProduct::manufacturer(const SoapIncoming& sc, SoapOutgoing& data)
185
{
161
{
186
    LOGDEB("OHProduct::manufacturer" << endl);
162
    LOGDEB("OHProduct::manufacturer" << endl);
187
    data.addarg("Name", csmanname);
163
    data.addarg("Name", csmanname);
188
    data.addarg("Info", csmaninfo);
164
    data.addarg("Info", csmaninfo);