Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into dvbsi++

This commit is contained in:
[CST] Focus
2012-10-23 13:44:55 +04:00

View File

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