Origin commit data
------------------
Branch: ni/coolstream
Commit: b87ad3b5ea
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-15 (Thu, 15 Jun 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-06-15 17:32:05 +02:00
4 changed files with 83 additions and 0 deletions

View File

@@ -217,6 +217,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"crypt", &CControlAPI::CryptCGI, "text/plain"},
// timer
{"timer", &CControlAPI::TimerCGI, "text/plain"},
{"sendalltimers", &CControlAPI::TimerSendCGI, "text/plain"},
// bouquet editing
{"setbouquet", &CControlAPI::setBouquetCGI, "text/plain"},
{"savebouquet", &CControlAPI::saveBouquetCGI, "text/plain"},
@@ -346,7 +347,34 @@ void CControlAPI::TimerCGI(CyhookHandler *hh)
hh->SendError();
}
void CControlAPI::TimerSendCGI(CyhookHandler *hh)
{
hh->outStart();
if (NeutrinoAPI->Timerd->isTimerdAvailable())
{
if (!hh->ParamList.empty())
{
bool force = (hh->ParamList["force"] == "1") || (hh->ParamList["force"] == "true");
if(!hh->ParamList["ip"].empty())
{
NeutrinoAPI->SendAllTimers(hh->ParamList["ip"],force);
hh->SendOk();
}
else if(!hh->ParamList["name"].empty())
{
NeutrinoAPI->SendAllTimers(NeutrinoAPI->GetRemoteBoxIP(decodeString(hh->ParamList["name"])),force);
hh->SendOk();
}
else
hh->SendError();
}
}
else
hh->SendError();
}
//-----------------------------------------------------------------------------
void CControlAPI::SetModeCGI(CyhookHandler *hh)
{
if (!(hh->ParamList.empty()))