controlapi.cpp:revert to standard output

Origin commit data
------------------
Branch: ni/coolstream
Commit: cf1dfdad7c
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-10-22 (Mon, 22 Oct 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-10-22 21:28:38 +02:00
parent bb097d5d95
commit 6d7ffeadd1

View File

@@ -427,22 +427,16 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh)
{
if (hh->ParamList["1"] == "on") // standby mode on
{
if(CNeutrinoApp::getInstance()->getMode() == 4){
hh->WriteLn("standby is already on");
}else {
if(CNeutrinoApp::getInstance()->getMode() != 4)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_ON, CEventServer::INITID_HTTPD);
hh->SendOk();
}
}
else if (hh->ParamList["1"] == "off")// standby mode off
{
if(CNeutrinoApp::getInstance()->getMode() != 4){
hh->WriteLn("standby is already off");
}else {
if(CNeutrinoApp::getInstance()->getMode() == 4)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD);
hh->SendOk();
}
}
else
hh->SendError();
}
@@ -459,21 +453,13 @@ void CControlAPI::RCCGI(CyhookHandler *hh)
if (!(hh->ParamList.empty()))
{
if (hh->ParamList["1"] == "lock"){ // lock remote control
if(!CRCLock::locked){
if(!CRCLock::locked)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD);
}else{
hh->WriteLn("remote is already locked");
return;
}
}
else if (hh->ParamList["1"] == "unlock"){// unlock remote control
if(CRCLock::locked){
if(CRCLock::locked)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD);
}else{
hh->WriteLn("remote is already unlocked");
return;
}
}
else{
hh->SendError();
@@ -1496,25 +1482,20 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
SendAllCurrentVAPid(hh);
else if (hh->ParamList["1"] == "stopplayback")
{
if(!NeutrinoAPI->Zapit->isPlayBackActive()){
hh->WriteLn("playback is already off");
}else{
if(NeutrinoAPI->Zapit->isPlayBackActive()){
NeutrinoAPI->Zapit->stopPlayBack();
NeutrinoAPI->Sectionsd->setPauseScanning(true);
hh->SendOk();
}
hh->SendOk();
}
else if (hh->ParamList["1"] == "startplayback")
{
if(NeutrinoAPI->Zapit->isPlayBackActive()){
hh->WriteLn("playback is already on");
}else{
if(!NeutrinoAPI->Zapit->isPlayBackActive()){
NeutrinoAPI->Zapit->startPlayBack();
NeutrinoAPI->Sectionsd->setPauseScanning(false);
dprintf("start playback requested..\n");
hh->SendOk();
}
hh->SendOk();
}
else if (hh->ParamList["1"] == "statusplayback")
hh->Write((char *) (NeutrinoAPI->Zapit->isPlayBackActive() ? "1" : "0"));