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

Origin commit data
------------------
Branch: ni/coolstream
Commit: defe6a99bd
Author: [CST] Focus <focus.cst@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:
[CST] Focus
2012-10-22 18:05:51 +04:00
4 changed files with 61 additions and 20 deletions

View File

@@ -38,6 +38,7 @@
#include <gui/widget/stringinput.h>
const std::string CRCLock::NO_USER_INPUT = "noUserInput";
bool CRCLock::locked = false;
// -- Menue Handler Interface
// -- Infinite Loop to lock remote control (until release lock key pressed)
@@ -45,6 +46,9 @@ const std::string CRCLock::NO_USER_INPUT = "noUserInput";
int CRCLock::exec(CMenuTarget* parent, const std::string &actionKey)
{
if(locked)
return menu_return::RETURN_EXIT_ALL;
if (parent)
parent->hide();
@@ -55,7 +59,9 @@ int CRCLock::exec(CMenuTarget* parent, const std::string &actionKey)
return menu_return::RETURN_EXIT_ALL;
// -- Lockup Box
locked = true;
lockBox();
locked = false;
ShowLocalizedMessage(LOCALE_RCLOCK_TITLE, LOCALE_RCLOCK_UNLOCKMSG, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO,450, no_input ? 5 : -1);
return menu_return::RETURN_EXIT_ALL;

View File

@@ -36,12 +36,13 @@
//
class CRCLock: public CMenuTarget
{
private:
void lockBox();
public:
static const std::string NO_USER_INPUT;
int exec(CMenuTarget* parent, const std::string & actionKey);
void lockBox();
static bool locked;
};
#endif

View File

@@ -3197,6 +3197,9 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
if(mode == mode_radio && g_Radiotext)
g_Radiotext->radiotext_stop();
lastMode = mode;
mode = mode_standby;
if(!fromDeepStandby && !CRecordManager::getInstance()->RecordingStatus()) {
g_Zapit->setStandby(true);
} else {
@@ -3232,8 +3235,6 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
if(!CRecordManager::getInstance()->RecordingStatus())
cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000);
lastMode = mode;
mode = mode_standby;
//fan speed
if (g_info.has_fan) {
int fspeed = 1;

View File

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