mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-14 00:43:42 +02:00
add neutrino restart to webif
Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
@@ -188,6 +188,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
|
||||
{"standby", &CControlAPI::StandbyCGI, "text/plain"},
|
||||
{"shutdown", &CControlAPI::ShutdownCGI, "text/plain"},
|
||||
{"reboot", &CControlAPI::RebootCGI, "text/plain"},
|
||||
{"restart", &CControlAPI::RestartCGI, "text/plain"},
|
||||
{"getdate", &CControlAPI::GetDateCGI, "text/plain"},
|
||||
{"gettime", &CControlAPI::GetTimeCGI, "text/plain"},
|
||||
{"info", &CControlAPI::InfoCGI, "text/plain"},
|
||||
@@ -879,6 +880,18 @@ void CControlAPI::RebootCGI(CyhookHandler *hh)
|
||||
hh->SendError();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void CControlAPI::RestartCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList.empty())
|
||||
{
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::RESTART, CEventServer::INITID_HTTPD);
|
||||
hh->SendOk();
|
||||
}
|
||||
else
|
||||
hh->SendError();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
unsigned int revert_translate(unsigned int code)
|
||||
{
|
||||
|
@@ -111,6 +111,7 @@ private:
|
||||
void LCDAction(CyhookHandler *hh);
|
||||
void YWebCGI(CyhookHandler *hh);
|
||||
void RebootCGI(CyhookHandler *hh);
|
||||
void RestartCGI(CyhookHandler *hh);
|
||||
void RCEmCGI(CyhookHandler *hh);
|
||||
void AspectRatioCGI(CyhookHandler *hh);
|
||||
void VideoFormatCGI(CyhookHandler *hh);
|
||||
|
@@ -131,6 +131,7 @@ CNeutrinoAPI::CNeutrinoAPI()
|
||||
EventServer = new CEventServer;
|
||||
EventServer->registerEvent2( NeutrinoMessages::SHUTDOWN, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::REBOOT, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::RESTART, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::STANDBY_ON, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::STANDBY_TOGGLE, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
|
Reference in New Issue
Block a user