mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
-add hwinfo to httpd info
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@976 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -31,6 +31,8 @@
|
|||||||
#include <zapit/channel.h>
|
#include <zapit/channel.h>
|
||||||
#include <zapit/bouquets.h>
|
#include <zapit/bouquets.h>
|
||||||
#include <configfile.h>
|
#include <configfile.h>
|
||||||
|
#include <cs_api.h>
|
||||||
|
#include <global.h>
|
||||||
// yhttpd
|
// yhttpd
|
||||||
#include "yhttpd.h"
|
#include "yhttpd.h"
|
||||||
#include "ytypes_globals.h"
|
#include "ytypes_globals.h"
|
||||||
@@ -559,7 +561,7 @@ void CControlAPI::MessageCGI(CyhookHandler *hh)
|
|||||||
void CControlAPI::InfoCGI(CyhookHandler *hh)
|
void CControlAPI::InfoCGI(CyhookHandler *hh)
|
||||||
{
|
{
|
||||||
if (hh->ParamList.empty())
|
if (hh->ParamList.empty())
|
||||||
hh->Write("Neutrino\n");
|
hh->Write("Neutrino HD\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
|
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
|
||||||
@@ -570,10 +572,47 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
|
|||||||
hh->Write("3");
|
hh->Write("3");
|
||||||
else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version
|
else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version
|
||||||
hh->printf("%s\n", HTTPD_VERSION);
|
hh->printf("%s\n", HTTPD_VERSION);
|
||||||
|
else if (hh->ParamList["1"] == "hwinfo")// print nhttpd version
|
||||||
|
HWInfoCGI(hh);
|
||||||
else
|
else
|
||||||
hh->SendError();
|
hh->SendError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
||||||
|
{
|
||||||
|
unsigned int system_rev = cs_get_revision();
|
||||||
|
std::string boxname;
|
||||||
|
boxname = "Coolstream ";
|
||||||
|
switch(system_rev)
|
||||||
|
{
|
||||||
|
case 6:
|
||||||
|
boxname += "HD1";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
boxname += "BSE";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
case 9:
|
||||||
|
boxname += "Neo";
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
boxname += "Zee";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: {
|
||||||
|
char buffer[10];
|
||||||
|
snprintf(buffer, sizeof(buffer), "%u\n", system_rev);
|
||||||
|
boxname += "Unknown nr. ";
|
||||||
|
boxname += buffer;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
boxname += (g_info.delivery_system == DVB_S) ? " SAT":" CABLE";
|
||||||
|
hh->printf("%s\n", boxname.c_str());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
||||||
{
|
{
|
||||||
@@ -1185,8 +1224,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh)
|
|||||||
|
|
||||||
if(hh->ParamList["bouquetnr"] == "all")
|
if(hh->ParamList["bouquetnr"] == "all")
|
||||||
all_bouquets = true;
|
all_bouquets = true;
|
||||||
else
|
else if (!(hh->ParamList["bouquetnr"].empty()))
|
||||||
if (!(hh->ParamList["bouquetnr"].empty()))
|
|
||||||
{
|
{
|
||||||
bouquetnr = atoi( hh->ParamList["bouquetnr"].c_str() );
|
bouquetnr = atoi( hh->ParamList["bouquetnr"].c_str() );
|
||||||
bouquetnr--;
|
bouquetnr--;
|
||||||
@@ -1775,7 +1813,8 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:{}
|
default:
|
||||||
|
{}
|
||||||
}
|
}
|
||||||
hh->WriteLn("\t\t</timer>\n");
|
hh->WriteLn("\t\t</timer>\n");
|
||||||
}
|
}
|
||||||
|
@@ -70,6 +70,7 @@ private:
|
|||||||
void GetChannel_IDCGI(CyhookHandler *hh);
|
void GetChannel_IDCGI(CyhookHandler *hh);
|
||||||
void MessageCGI(CyhookHandler *hh);
|
void MessageCGI(CyhookHandler *hh);
|
||||||
void InfoCGI(CyhookHandler *hh);
|
void InfoCGI(CyhookHandler *hh);
|
||||||
|
void HWInfoCGI(CyhookHandler *hh);
|
||||||
void ShutdownCGI(CyhookHandler *hh);
|
void ShutdownCGI(CyhookHandler *hh);
|
||||||
void VolumeCGI(CyhookHandler *hh);
|
void VolumeCGI(CyhookHandler *hh);
|
||||||
void ChannellistCGI(CyhookHandler *hh);
|
void ChannellistCGI(CyhookHandler *hh);
|
||||||
|
Reference in New Issue
Block a user