|
a/upmpd/ohproduct.cxx |
|
b/upmpd/ohproduct.cxx |
|
... |
|
... |
170 |
}
|
170 |
}
|
171 |
|
171 |
|
172 |
int OHProduct::setStandby(const SoapArgs& sc, SoapData& data)
|
172 |
int OHProduct::setStandby(const SoapArgs& sc, SoapData& data)
|
173 |
{
|
173 |
{
|
174 |
LOGDEB("OHProduct::setStandby" << endl);
|
174 |
LOGDEB("OHProduct::setStandby" << endl);
|
|
|
175 |
bool standby;
|
|
|
176 |
if (!sc.getBool("Value", &standby)) {
|
|
|
177 |
return UPNP_E_INVALID_PARAM;
|
|
|
178 |
}
|
|
|
179 |
return UPNP_E_SUCCESS;
|
|
|
180 |
}
|
|
|
181 |
|
|
|
182 |
int OHProduct::sourceCount(const SoapArgs& sc, SoapData& data)
|
|
|
183 |
{
|
|
|
184 |
LOGDEB("OHProduct::sourceCount" << endl);
|
|
|
185 |
data.addarg("Value", "1");
|
|
|
186 |
return UPNP_E_SUCCESS;
|
|
|
187 |
}
|
|
|
188 |
|
|
|
189 |
int OHProduct::sourceXML(const SoapArgs& sc, SoapData& data)
|
|
|
190 |
{
|
|
|
191 |
LOGDEB("OHProduct::sourceXML" << endl);
|
|
|
192 |
data.addarg("Value", csxml);
|
|
|
193 |
return UPNP_E_SUCCESS;
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
int OHProduct::sourceIndex(const SoapArgs& sc, SoapData& data)
|
|
|
197 |
{
|
|
|
198 |
LOGDEB("OHProduct::sourceIndex" << endl);
|
|
|
199 |
data.addarg("Value", "0");
|
|
|
200 |
return UPNP_E_SUCCESS;
|
|
|
201 |
}
|
|
|
202 |
|
|
|
203 |
int OHProduct::setSourceIndex(const SoapArgs& sc, SoapData& data)
|
|
|
204 |
{
|
|
|
205 |
LOGDEB("OHProduct::setSourceIndex" << endl);
|
|
|
206 |
int sindex;
|
|
|
207 |
if (!sc.getInt("Value", &sindex)) {
|
|
|
208 |
return UPNP_E_INVALID_PARAM;
|
|
|
209 |
}
|
|
|
210 |
LOGDEB("OHProduct::setSourceIndex: " << sindex << endl);
|
|
|
211 |
return UPNP_E_SUCCESS;
|
|
|
212 |
}
|
|
|
213 |
|
|
|
214 |
int OHProduct::setSourceIndexByName(const SoapArgs& sc, SoapData& data)
|
|
|
215 |
{
|
|
|
216 |
LOGDEB("OHProduct::setSourceIndexByName" << endl);
|
175 |
map<string, string>::const_iterator it;
|
217 |
map<string, string>::const_iterator it;
|
176 |
|
218 |
|
177 |
it = sc.args.find("Value");
|
219 |
it = sc.args.find("Value");
|
178 |
if (it == sc.args.end() || it->second.empty()) {
|
220 |
if (it == sc.args.end() || it->second.empty()) {
|
179 |
return UPNP_E_INVALID_PARAM;
|
221 |
return UPNP_E_INVALID_PARAM;
|
180 |
}
|
222 |
}
|
181 |
if (it->second[0] == 'F' || it->second[0] == '0') {
|
|
|
182 |
LOGDEB("OHProduct::setStandby-> standby off" << endl);
|
|
|
183 |
} else if (it->second[0] == 'T' || it->second[0] == '1') {
|
|
|
184 |
LOGDEB("OHProduct::setStandby-> standby on" << endl);
|
|
|
185 |
} else {
|
|
|
186 |
return UPNP_E_INVALID_PARAM;
|
|
|
187 |
}
|
|
|
188 |
m_dev->loopWakeup();
|
|
|
189 |
return UPNP_E_SUCCESS;
|
|
|
190 |
}
|
|
|
191 |
|
|
|
192 |
int OHProduct::sourceCount(const SoapArgs& sc, SoapData& data)
|
|
|
193 |
{
|
|
|
194 |
LOGDEB("OHProduct::sourceCount" << endl);
|
|
|
195 |
data.addarg("Value", "1");
|
|
|
196 |
return UPNP_E_SUCCESS;
|
|
|
197 |
}
|
|
|
198 |
|
|
|
199 |
int OHProduct::sourceXML(const SoapArgs& sc, SoapData& data)
|
|
|
200 |
{
|
|
|
201 |
LOGDEB("OHProduct::sourceXML" << endl);
|
|
|
202 |
data.addarg("Value", csxml);
|
|
|
203 |
return UPNP_E_SUCCESS;
|
|
|
204 |
}
|
|
|
205 |
|
|
|
206 |
int OHProduct::sourceIndex(const SoapArgs& sc, SoapData& data)
|
|
|
207 |
{
|
|
|
208 |
LOGDEB("OHProduct::sourceIndex" << endl);
|
|
|
209 |
data.addarg("Value", "0");
|
|
|
210 |
return UPNP_E_SUCCESS;
|
|
|
211 |
}
|
|
|
212 |
|
|
|
213 |
int OHProduct::setSourceIndex(const SoapArgs& sc, SoapData& data)
|
|
|
214 |
{
|
|
|
215 |
LOGDEB("OHProduct::setSourceIndex" << endl);
|
|
|
216 |
map<string, string>::const_iterator it;
|
|
|
217 |
|
|
|
218 |
it = sc.args.find("Value");
|
|
|
219 |
if (it == sc.args.end() || it->second.empty()) {
|
|
|
220 |
return UPNP_E_INVALID_PARAM;
|
|
|
221 |
}
|
|
|
222 |
LOGDEB("OHProduct::setSourceIndex: " << it->second << endl);
|
|
|
223 |
m_dev->loopWakeup();
|
|
|
224 |
return UPNP_E_SUCCESS;
|
|
|
225 |
}
|
|
|
226 |
|
|
|
227 |
int OHProduct::setSourceIndexByName(const SoapArgs& sc, SoapData& data)
|
|
|
228 |
{
|
|
|
229 |
LOGDEB("OHProduct::setSourceIndexByName" << endl);
|
|
|
230 |
map<string, string>::const_iterator it;
|
|
|
231 |
|
|
|
232 |
it = sc.args.find("Value");
|
|
|
233 |
if (it == sc.args.end() || it->second.empty()) {
|
|
|
234 |
return UPNP_E_INVALID_PARAM;
|
|
|
235 |
}
|
|
|
236 |
LOGDEB("OHProduct::setSourceIndexByName: " << it->second << endl);
|
223 |
LOGDEB("OHProduct::setSourceIndexByName: " << it->second << endl);
|
237 |
m_dev->loopWakeup();
|
224 |
m_dev->loopWakeup();
|
238 |
return UPNP_E_SUCCESS;
|
225 |
return UPNP_E_SUCCESS;
|
239 |
}
|
226 |
}
|
240 |
|
227 |
|
241 |
int OHProduct::source(const SoapArgs& sc, SoapData& data)
|
228 |
int OHProduct::source(const SoapArgs& sc, SoapData& data)
|
242 |
{
|
229 |
{
|
243 |
LOGDEB("OHProduct::source" << endl);
|
230 |
LOGDEB("OHProduct::source" << endl);
|
244 |
map<string, string>::const_iterator it;
|
231 |
int sindex;
|
245 |
|
232 |
if (!sc.getInt("Index", &sindex)) {
|
246 |
it = sc.args.find("Index");
|
|
|
247 |
if (it == sc.args.end() || it->second.empty()) {
|
|
|
248 |
return UPNP_E_INVALID_PARAM;
|
233 |
return UPNP_E_INVALID_PARAM;
|
249 |
}
|
234 |
}
|
250 |
string sindex(it->second);
|
|
|
251 |
LOGDEB("OHProduct::setSourceIndex: " << sindex << endl);
|
235 |
LOGDEB("OHProduct::setSourceIndex: " << sindex << endl);
|
252 |
if (sindex.compare("0")) {
|
236 |
if (sindex != 0) {
|
253 |
return UPNP_E_INVALID_PARAM;
|
237 |
return UPNP_E_INVALID_PARAM;
|
254 |
}
|
238 |
}
|
255 |
data.addarg("SystemName", "Default");
|
239 |
data.addarg("SystemName", "Default");
|
256 |
data.addarg("Type", "PlayList");
|
240 |
data.addarg("Type", "PlayList");
|
257 |
data.addarg("Name", "PlayList");
|
241 |
data.addarg("Name", "PlayList");
|