Switch to unified view

a/src/ohproduct.cxx b/src/ohproduct.cxx
...
...
169
}
169
}
170
170
171
int OHProduct::setStandby(const SoapIncoming& sc, SoapOutgoing& data)
171
int OHProduct::setStandby(const SoapIncoming& sc, SoapOutgoing& data)
172
{
172
{
173
    LOGDEB("OHProduct::setStandby" << endl);
173
    LOGDEB("OHProduct::setStandby" << endl);
174
    if (!sc.getBool("Value", &m_standby)) {
174
    if (!sc.get("Value", &m_standby)) {
175
        return UPNP_E_INVALID_PARAM;
175
        return UPNP_E_INVALID_PARAM;
176
    }
176
    }
177
    m_dev->loopWakeup();
177
    m_dev->loopWakeup();
178
    return UPNP_E_SUCCESS;
178
    return UPNP_E_SUCCESS;
179
}
179
}
...
...
201
201
202
int OHProduct::setSourceIndex(const SoapIncoming& sc, SoapOutgoing& data)
202
int OHProduct::setSourceIndex(const SoapIncoming& sc, SoapOutgoing& data)
203
{
203
{
204
    LOGDEB("OHProduct::setSourceIndex" << endl);
204
    LOGDEB("OHProduct::setSourceIndex" << endl);
205
    int sindex;
205
    int sindex;
206
    if (!sc.getInt("Value", &sindex)) {
206
    if (!sc.get("Value", &sindex)) {
207
        return UPNP_E_INVALID_PARAM;
207
        return UPNP_E_INVALID_PARAM;
208
    }
208
    }
209
    LOGDEB("OHProduct::setSourceIndex: " << sindex << endl);
209
    LOGDEB("OHProduct::setSourceIndex: " << sindex << endl);
210
    if (sindex < 0 || sindex >= int(o_sources.size())) {
210
    if (sindex < 0 || sindex >= int(o_sources.size())) {
211
        LOGERR("OHProduct::setSourceIndex: bad index: " << sindex << endl);
211
        LOGERR("OHProduct::setSourceIndex: bad index: " << sindex << endl);
...
...
219
int OHProduct::setSourceIndexByName(const SoapIncoming& sc, SoapOutgoing& data)
219
int OHProduct::setSourceIndexByName(const SoapIncoming& sc, SoapOutgoing& data)
220
{
220
{
221
    LOGDEB("OHProduct::setSourceIndexByName" << endl);
221
    LOGDEB("OHProduct::setSourceIndexByName" << endl);
222
222
223
    string name;
223
    string name;
224
    if (!sc.getString("Value", &name)) {
224
    if (!sc.get("Value", &name)) {
225
        return UPNP_E_INVALID_PARAM;
225
        return UPNP_E_INVALID_PARAM;
226
    }
226
    }
227
    for (unsigned int i = 0; i < o_sources.size(); i++) {
227
    for (unsigned int i = 0; i < o_sources.size(); i++) {
228
        if (o_sources[i] == name) {
228
        if (o_sources[i] == name) {
229
            m_sourceIndex = i;
229
            m_sourceIndex = i;
...
...
238
238
239
int OHProduct::source(const SoapIncoming& sc, SoapOutgoing& data)
239
int OHProduct::source(const SoapIncoming& sc, SoapOutgoing& data)
240
{
240
{
241
    LOGDEB("OHProduct::source" << endl);
241
    LOGDEB("OHProduct::source" << endl);
242
    int sindex;
242
    int sindex;
243
    if (!sc.getInt("Index", &sindex)) {
243
    if (!sc.get("Index", &sindex)) {
244
        return UPNP_E_INVALID_PARAM;
244
        return UPNP_E_INVALID_PARAM;
245
    }
245
    }
246
    LOGDEB("OHProduct::source: " << sindex << endl);
246
    LOGDEB("OHProduct::source: " << sindex << endl);
247
    if (sindex < 0 || sindex >= int(o_sources.size())) {
247
    if (sindex < 0 || sindex >= int(o_sources.size())) {
248
        LOGERR("OHProduct::source: bad index: " << sindex << endl);
248
        LOGERR("OHProduct::source: bad index: " << sindex << endl);