add reloadsetup (neutrino.conf) to nhttpd controlapi

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@849 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 3bf282f8d4
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-10-21 (Thu, 21 Oct 2010)

Origin message was:
------------------
-add reloadsetup (neutrino.conf) to nhttpd controlapi

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@849 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2010-10-21 06:27:59 +00:00
parent a58cbd650e
commit 4bc3849e21
6 changed files with 23 additions and 0 deletions

View File

@@ -817,6 +817,10 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
*msg = NeutrinoMessages::UNLOCK_RC;
*data = 0;
break;
case NeutrinoMessages::RELOAD_SETUP :
*msg = NeutrinoMessages::RELOAD_SETUP;
*data = 0;
break;
default:
printf("[neutrino] event INITID_HTTPD - unknown eventID 0x%x\n", emsg.eventID );
}

View File

@@ -3570,6 +3570,14 @@ printf("NeutrinoMessages::EVT_BOUQUETSCHANGED\n");fflush(stdout);
standbyMode( true );
return messages_return::handled;
}
else if( msg == NeutrinoMessages::RELOAD_SETUP ) {
bool tmp = g_settings.make_hd_list;
loadSetup(NEUTRINO_SETTINGS_FILE);
if(tmp != g_settings.make_hd_list)
g_Zapit->reinitChannels();
return messages_return::handled;
}
else if( msg == NeutrinoMessages::STANDBY_TOGGLE ) {
standbyMode( !(mode & mode_standby) );
g_RCInput->clearRCMsg();

View File

@@ -72,6 +72,7 @@ struct NeutrinoMessages {
LOCK_RC = CRCInput::RC_Messages + 19,
UNLOCK_RC = CRCInput::RC_Messages + 20,
REBOOT = CRCInput::RC_Messages + 21,
RELOAD_SETUP = CRCInput::RC_Messages + 22,
EVT_VOLCHANGED = CRCInput::RC_Events + 1,
EVT_MUTECHANGED = CRCInput::RC_Events + 2,

View File

@@ -170,6 +170,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"gettime", &CControlAPI::GetTimeCGI, "text/plain"},
{"info", &CControlAPI::InfoCGI, "text/plain"},
{"version", &CControlAPI::VersionCGI, ""},
{"reloadsetup", &CControlAPI::ReloadNutrinoSetupfCGI, ""},
// boxcontrol - devices
{"volume", &CControlAPI::VolumeCGI, "text/plain"},
{"lcd", &CControlAPI::LCDAction, "text/plain"},
@@ -1246,6 +1247,13 @@ void CControlAPI::VersionCGI(CyhookHandler *hh)
{
hh->SendFile("/.version");
}
//-----------------------------------------------------------------------------
void CControlAPI::ReloadNutrinoSetupfCGI(CyhookHandler *hh)
{
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD);
hh->SendOk();
}
//-----------------------------------------------------------------------------
void CControlAPI::ZaptoCGI(CyhookHandler *hh)

View File

@@ -77,6 +77,7 @@ private:
void GetBouquetsCGI(CyhookHandler *hh);
void EpgCGI(CyhookHandler *hh);
void VersionCGI(CyhookHandler *hh);
void ReloadNutrinoSetupfCGI(CyhookHandler *hh);
void ZaptoCGI(CyhookHandler *hh);
void StartPluginCGI(CyhookHandler *hh);
void LCDAction(CyhookHandler *hh);

View File

@@ -128,6 +128,7 @@ CNeutrinoAPI::CNeutrinoAPI()
EventServer->registerEvent2( NeutrinoMessages::EVT_START_PLUGIN, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");//reload neutrino conf
}
//-------------------------------------------------------------------------