Switch to unified view

a/src/conman.cxx b/src/conman.cxx
...
...
26
#include <vector>
26
#include <vector>
27
27
28
#include "libupnpp/log.hxx"
28
#include "libupnpp/log.hxx"
29
#include "libupnpp/soaphelp.hxx"
29
#include "libupnpp/soaphelp.hxx"
30
30
31
#include "protocolinfo.hxx"
32
31
using namespace std;
33
using namespace std;
32
using namespace std::placeholders;
34
using namespace std::placeholders;
33
using namespace UPnPP;
35
using namespace UPnPP;
34
using namespace UPnPProvider;
36
using namespace UPnPProvider;
35
37
36
static const string sTpCM("urn:schemas-upnp-org:service:ConnectionManager:1");
38
static const string sTpCM("urn:schemas-upnp-org:service:ConnectionManager:1");
37
static const string sIdCM("urn:upnp-org:serviceId:ConnectionManager");
39
static const string sIdCM("urn:upnp-org:serviceId:ConnectionManager");
38
40
39
UpMpdConMan::UpMpdConMan(UpnpDevice *dev, const string& protoinfo)
41
UpMpdConMan::UpMpdConMan(UpnpDevice *dev)
40
    : UpnpService(sTpCM, sIdCM, dev), m_protoinfo(protoinfo)
42
    : UpnpService(sTpCM, sIdCM, dev)
41
{
43
{
42
    dev->addActionMapping(this,"GetCurrentConnectionIDs", 
44
    dev->addActionMapping(this,"GetCurrentConnectionIDs", 
43
                          bind(&UpMpdConMan::getCurrentConnectionIDs, 
45
                          bind(&UpMpdConMan::getCurrentConnectionIDs, 
44
                               this, _1,_2));
46
                               this, _1,_2));
45
    dev->addActionMapping(this,"GetCurrentConnectionInfo", 
47
    dev->addActionMapping(this,"GetCurrentConnectionInfo", 
...
...
56
58
57
    // Our data never changes, so if this is not an unconditional request,
59
    // Our data never changes, so if this is not an unconditional request,
58
    // we return nothing.
60
    // we return nothing.
59
    if (all) {
61
    if (all) {
60
        names.push_back("SinkProtocolInfo");
62
        names.push_back("SinkProtocolInfo");
61
        values.push_back(m_protoinfo);
63
        values.push_back(Protocolinfo::the()->gettext());
62
    }
64
    }
63
    return true;
65
    return true;
64
}
66
}
65
67
66
int UpMpdConMan::getCurrentConnectionIDs(const SoapIncoming& sc, SoapOutgoing& data)
68
int UpMpdConMan::getCurrentConnectionIDs(const SoapIncoming& sc, SoapOutgoing& data)
...
...
92
94
93
int UpMpdConMan::getProtocolInfo(const SoapIncoming& sc, SoapOutgoing& data)
95
int UpMpdConMan::getProtocolInfo(const SoapIncoming& sc, SoapOutgoing& data)
94
{
96
{
95
    LOGDEB("UpMpdConMan::getProtocolInfo" << endl);
97
    LOGDEB("UpMpdConMan::getProtocolInfo" << endl);
96
    data.addarg("Source", "");
98
    data.addarg("Source", "");
97
    data.addarg("Sink", m_protoinfo);
99
    data.addarg("Sink", Protocolinfo::the()->gettext());
98
100
99
    return UPNP_E_SUCCESS;
101
    return UPNP_E_SUCCESS;
100
}
102
}