mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
Merge branch 'dvbsi++' of coolstreamtech.de:cst-private-neutrino into neutrino-apollo
Conflicts: src/neutrino.cpp
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
#include "gui/plugins.h"//for relodplugins
|
||||
#include <neutrino.h>
|
||||
#include <driver/screenshot.h>
|
||||
#include "gui/rc_lock.h"
|
||||
|
||||
// yhttpd
|
||||
#include "yhttpd.h"
|
||||
#include "ytypes_globals.h"
|
||||
@@ -425,12 +427,14 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList["1"] == "on") // standby mode on
|
||||
{
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_ON, CEventServer::INITID_HTTPD);
|
||||
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
|
||||
{
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD);
|
||||
if(CNeutrinoApp::getInstance()->getMode() == 4)
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD);
|
||||
hh->SendOk();
|
||||
}
|
||||
else
|
||||
@@ -448,12 +452,18 @@ void CControlAPI::RCCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (!(hh->ParamList.empty()))
|
||||
{
|
||||
if (hh->ParamList["1"] == "lock") // lock remote control
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD);
|
||||
else if (hh->ParamList["1"] == "unlock")// unlock remote control
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD);
|
||||
else
|
||||
if (hh->ParamList["1"] == "lock"){ // lock remote control
|
||||
if(!CRCLock::locked)
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD);
|
||||
}
|
||||
else if (hh->ParamList["1"] == "unlock"){// unlock remote control
|
||||
if(CRCLock::locked)
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD);
|
||||
|
||||
}
|
||||
else{
|
||||
hh->SendError();
|
||||
}
|
||||
}
|
||||
hh->SendOk();
|
||||
}
|
||||
@@ -1472,15 +1482,19 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
|
||||
SendAllCurrentVAPid(hh);
|
||||
else if (hh->ParamList["1"] == "stopplayback")
|
||||
{
|
||||
NeutrinoAPI->Zapit->stopPlayBack();
|
||||
NeutrinoAPI->Sectionsd->setPauseScanning(true);
|
||||
if(NeutrinoAPI->Zapit->isPlayBackActive()){
|
||||
NeutrinoAPI->Zapit->stopPlayBack();
|
||||
NeutrinoAPI->Sectionsd->setPauseScanning(true);
|
||||
}
|
||||
hh->SendOk();
|
||||
}
|
||||
else if (hh->ParamList["1"] == "startplayback")
|
||||
{
|
||||
NeutrinoAPI->Zapit->startPlayBack();
|
||||
NeutrinoAPI->Sectionsd->setPauseScanning(false);
|
||||
dprintf("start playback requested..\n");
|
||||
if(!NeutrinoAPI->Zapit->isPlayBackActive()){
|
||||
NeutrinoAPI->Zapit->startPlayBack();
|
||||
NeutrinoAPI->Sectionsd->setPauseScanning(false);
|
||||
dprintf("start playback requested..\n");
|
||||
}
|
||||
hh->SendOk();
|
||||
}
|
||||
else if (hh->ParamList["1"] == "statusplayback")
|
||||
|
@@ -5,9 +5,13 @@
|
||||
//<![CDATA[
|
||||
function rcsim(_key)
|
||||
{
|
||||
if(_key == "KEY_POWER")
|
||||
if(confirm("{=L:bc.control.shutdown.ask=}") != true)
|
||||
if(_key == "KEY_POWER"){
|
||||
var __result = trim(loadSyncURL("/control/standby"));
|
||||
if (__result == "off") {
|
||||
if(confirm("{=L:bc.control.shutdown.ask=}") != true)
|
||||
return;
|
||||
}
|
||||
}
|
||||
loadSyncURL("/control/rcem?"+_key);
|
||||
}
|
||||
//]]>
|
||||
|
@@ -44,6 +44,7 @@ void correctTime(struct tm *zt) {
|
||||
zt->tm_hour = minmax(zt->tm_hour, 0, 23);
|
||||
zt->tm_min = minmax(zt->tm_min, 0, 59);
|
||||
zt->tm_sec = minmax(zt->tm_sec, 0, 59);
|
||||
zt->tm_isdst = -1;
|
||||
}
|
||||
//=============================================================================
|
||||
// Strings
|
||||
|
@@ -22,6 +22,11 @@ long CWebserverConnection::GConnectionNumber = 0;
|
||||
// Constructor & Destructor & Initialization
|
||||
//=============================================================================
|
||||
CWebserverConnection::CWebserverConnection(CWebserver *pWebserver) {
|
||||
sock = 0;
|
||||
ConnectionNumber = 0;
|
||||
enlapsed_request = 0;
|
||||
enlapsed_response = 0;
|
||||
|
||||
Webserver = pWebserver;
|
||||
Request.Webserver = pWebserver;
|
||||
Request.Connection = this;
|
||||
@@ -39,6 +44,12 @@ CWebserverConnection::CWebserverConnection(CWebserver *pWebserver) {
|
||||
//-------------------------------------------------------------------------
|
||||
CWebserverConnection::CWebserverConnection() {
|
||||
// aprintf("test CWebserverConnection::CWebserverConnection()\n");
|
||||
sock = 0;
|
||||
RequestCanceled = 0;
|
||||
keep_alive = 0;
|
||||
HttpStatus = 0;
|
||||
enlapsed_request = 0;
|
||||
enlapsed_response = 0;
|
||||
ConnectionNumber = ++GConnectionNumber;
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
|
@@ -141,7 +141,7 @@ public:
|
||||
CStringList HookVarList; // Variables in Hook-Handling passing to other Hooks
|
||||
THttp_Method Method; // HTTP Method (requested)
|
||||
// constructor & deconstructor
|
||||
CyhookHandler(){};
|
||||
CyhookHandler(){ContentLength = 0; keep_alive = 0; _outIndent = 0;};
|
||||
virtual ~CyhookHandler(){};
|
||||
|
||||
// hook slot handler
|
||||
|
Reference in New Issue
Block a user