- rc_lock: rework class; switch to singleton; add icon; vfd-support

This commit is contained in:
svenhoefer
2016-01-20 20:00:00 +01:00
parent 7783ee684f
commit 2eb0aed5db
14 changed files with 115 additions and 64 deletions

View File

@@ -498,14 +498,15 @@ void CControlAPI::RCCGI(CyhookHandler *hh)
{
if (!(hh->ParamList.empty()))
{
bool locked = CRCLock::getInstance()->isLocked();
if (hh->ParamList["1"] == "lock"){ // lock remote control
if(!CRCLock::locked)
if (!locked)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD);
}
else if (hh->ParamList["1"] == "unlock"){// unlock remote control
if(CRCLock::locked)
if (locked)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD);
}
else{
hh->SendError();