mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +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
Origin commit data
------------------
Branch: ni/coolstream
Commit: 96e7af8070
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-12-30 (Thu, 30 Dec 2010)
Origin message was:
------------------
-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 was generated by Migit
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include <zapit/channel.h>
|
||||
#include <zapit/bouquets.h>
|
||||
#include <configfile.h>
|
||||
#include <cs_api.h>
|
||||
#include <global.h>
|
||||
// yhttpd
|
||||
#include "yhttpd.h"
|
||||
#include "ytypes_globals.h"
|
||||
@@ -559,7 +561,7 @@ void CControlAPI::MessageCGI(CyhookHandler *hh)
|
||||
void CControlAPI::InfoCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList.empty())
|
||||
hh->Write("Neutrino\n");
|
||||
hh->Write("Neutrino HD\n");
|
||||
else
|
||||
{
|
||||
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
|
||||
@@ -570,10 +572,47 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
|
||||
hh->Write("3");
|
||||
else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version
|
||||
hh->printf("%s\n", HTTPD_VERSION);
|
||||
else if (hh->ParamList["1"] == "hwinfo")// print nhttpd version
|
||||
HWInfoCGI(hh);
|
||||
else
|
||||
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)
|
||||
{
|
||||
@@ -1185,8 +1224,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh)
|
||||
|
||||
if(hh->ParamList["bouquetnr"] == "all")
|
||||
all_bouquets = true;
|
||||
else
|
||||
if (!(hh->ParamList["bouquetnr"].empty()))
|
||||
else if (!(hh->ParamList["bouquetnr"].empty()))
|
||||
{
|
||||
bouquetnr = atoi( hh->ParamList["bouquetnr"].c_str() );
|
||||
bouquetnr--;
|
||||
@@ -1775,7 +1813,8 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh)
|
||||
}
|
||||
break;
|
||||
|
||||
default:{}
|
||||
default:
|
||||
{}
|
||||
}
|
||||
hh->WriteLn("\t\t</timer>\n");
|
||||
}
|
||||
|
@@ -70,6 +70,7 @@ private:
|
||||
void GetChannel_IDCGI(CyhookHandler *hh);
|
||||
void MessageCGI(CyhookHandler *hh);
|
||||
void InfoCGI(CyhookHandler *hh);
|
||||
void HWInfoCGI(CyhookHandler *hh);
|
||||
void ShutdownCGI(CyhookHandler *hh);
|
||||
void VolumeCGI(CyhookHandler *hh);
|
||||
void ChannellistCGI(CyhookHandler *hh);
|
||||
|
Reference in New Issue
Block a user