mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
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:
@@ -427,21 +427,15 @@ 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"));
|
||||||
|
Reference in New Issue
Block a user