Switch to side-by-side view

--- a/src/ohvolume.cxx
+++ b/src/ohvolume.cxx
@@ -41,8 +41,8 @@
 static const string sTpProduct("urn:av-openhome-org:service:Volume:1");
 static const string sIdProduct("urn:av-openhome-org:serviceId:Volume");
 
-OHVolume::OHVolume(UpMpd *dev, UpMpdRenderCtl *ctl)
-    : UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev), m_ctl(ctl)
+OHVolume::OHVolume(UpMpd *dev)
+    : UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev)
 {
     dev->addActionMapping(this,"Characteristics", 
                           bind(&OHVolume::characteristics, this, _1, _2));
@@ -75,7 +75,7 @@
     st["BalanceMax"] = "0";
     st["Fade"] = "0";
     st["FadeMax"] = "0";
-    int volume = m_ctl->getvolume_i();
+    int volume = m_dev->m_rdctl->getvolume_i();
     st["Volume"] = SoapHelp::i2s(volume);
     st["Mute"] = volume == 0 ? "1" : "0";
     return true;
@@ -122,7 +122,7 @@
     if (!sc.get("Value", &volume)) {
         return UPNP_E_INVALID_PARAM;
     }
-    m_ctl->setvolume_i(volume);
+    m_dev->m_rdctl->setvolume_i(volume);
     m_dev->loopWakeup();
     return UPNP_E_SUCCESS;
 }
@@ -134,17 +134,17 @@
     if (!sc.get("Value", &mute)) {
         return UPNP_E_INVALID_PARAM;
     }
-    m_ctl->setmute_i(mute);
+    m_dev->m_rdctl->setmute_i(mute);
     return UPNP_E_SUCCESS;
 }
 
 int OHVolume::volumeInc(const SoapIncoming& sc, SoapOutgoing& data)
 {
     LOGDEB("OHVolume::volumeInc" << endl);
-    int newvol = m_ctl->getvolume_i() + 1;
+    int newvol = m_dev->m_rdctl->getvolume_i() + 1;
     if (newvol > 100)
         newvol = 100;
-    m_ctl->setvolume_i(newvol);
+    m_dev->m_rdctl->setvolume_i(newvol);
     m_dev->loopWakeup();
     return UPNP_E_SUCCESS;
 }
@@ -152,10 +152,10 @@
 int OHVolume::volumeDec(const SoapIncoming& sc, SoapOutgoing& data)
 {
     LOGDEB("OHVolume::volumeDec" << endl);
-    int newvol = m_ctl->getvolume_i() - 1;
+    int newvol = m_dev->m_rdctl->getvolume_i() - 1;
     if (newvol < 0)
         newvol = 0;
-    m_ctl->setvolume_i(newvol);
+    m_dev->m_rdctl->setvolume_i(newvol);
     m_dev->loopWakeup();
     return UPNP_E_SUCCESS;
 }
@@ -163,14 +163,14 @@
 int OHVolume::volume(const SoapIncoming& sc, SoapOutgoing& data)
 {
     LOGDEB("OHVolume::volume" << endl);
-    data.addarg("Value", SoapHelp::i2s(m_ctl->getvolume_i()));
+    data.addarg("Value", SoapHelp::i2s(m_dev->m_rdctl->getvolume_i()));
     return UPNP_E_SUCCESS;
 }
 
 int OHVolume::mute(const SoapIncoming& sc, SoapOutgoing& data)
 {
     LOGDEB("OHVolume::mute" << endl);
-    bool mute = m_ctl->getvolume_i() == 0;
+    bool mute = m_dev->m_rdctl->getvolume_i() == 0;
     data.addarg("Value", mute ? "1" : "0");
     return UPNP_E_SUCCESS;
 }