Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Conflicts:
	lib/libdvbsub/dvbsubtitle.cpp
	src/neutrino.cpp
	src/nhttpd/tuxboxapi/neutrinoyparser.cpp


Origin commit data
------------------
Commit: 69d8616a91
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-03-12 (Sun, 12 Mar 2017)
This commit is contained in:
vanhofen
2017-03-12 22:03:03 +01:00
32 changed files with 593 additions and 317 deletions

View File

@@ -799,18 +799,18 @@ void CControlAPI::MessageCGI(CyhookHandler *hh)
void CControlAPI::InfoCGI(CyhookHandler *hh)
{
if (hh->ParamList.empty())
hh->Write("Neutrino HD\n");
hh->Write(PACKAGE_NAME " " PACKAGE_VERSION "\n");
else
{
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
SendStreamInfo(hh);
else if (hh->ParamList["1"] == "version") // send version file
hh->SendFile(TARGET_PREFIX "/.version");
else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (only ffor comptibility)
else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (just for compatibility)
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 hwinfo
else if (hh->ParamList["1"] == "hwinfo") // print hwinfo
HWInfoCGI(hh);
else
hh->SendError();
@@ -819,14 +819,11 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
{
std::string boxname = NeutrinoAPI->NeutrinoYParser->func_get_boxtype(hh, "");
std::string boxmodel = NeutrinoAPI->NeutrinoYParser->func_get_boxmodel(hh, "");
static CNetAdapter netadapter;
std::string eth_id = netadapter.getMacAddr();
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
hh->printf("%s (%s)\nMAC:%s\n", boxname.c_str(), boxmodel.c_str(), eth_id.c_str());
hh->printf("%s %s (%s)\nMAC:%s\n", g_info.hw_caps->boxvendor, g_info.hw_caps->boxname, g_info.hw_caps->boxarch, eth_id.c_str());
}
//-----------------------------------------------------------------------------
void CControlAPI::ShutdownCGI(CyhookHandler *hh)

View File

@@ -850,115 +850,21 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *, std::str
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
{
#if 0
unsigned int system_rev = cs_get_revision();
std::string boxname = "CST ";
std::string boxvendor(g_info.hw_caps->boxvendor);
std::string boxname(g_info.hw_caps->boxname);
#if HAVE_TRIPLEDRAGON
boxname = "Armas ";
#endif
switch(system_rev)
{
case 1:
if( boxname == "Armas ")
boxname += "TripleDragon";
break;
#ifdef BOXMODEL_CS_HD1
case 6:
boxname += "HD1";
break;
case 7:
boxname += "BSE";
break;
case 8:
boxname += "Neo";
if (CFEManager::getInstance()->getFrontendCount() > 1)
boxname += " Twin";
break;
case 10:
boxname += "Zee";
break;
#endif
#ifdef BOXMODEL_CS_HD2
case 9:
boxname += "Tank";
break;
case 11:
boxname += "Trinity";
if (cs_get_chip_type() != 33904 /*0x8470*/)
boxname += " V2";
break;
case 12:
boxname += "Zee2";
break;
case 13:
boxname += "Link";
break;
case 14:
boxname += "Trinity Duo";
break;
#endif
default:
char buffer[10];
snprintf(buffer, sizeof(buffer), "%u\n", system_rev);
boxname += "Unknown nr. ";
boxname += buffer;
break;
}
#else
std::string boxname = g_info.hw_caps->boxvendor;
if (boxname.compare("Coolstream") == 0)
boxname = "CST"; /* that's more or less an external API... */
boxname += " " + std::string(g_info.hw_caps->boxname);
if (!strcmp(g_info.hw_caps->boxname, "Neo") &&
CFEManager::getInstance()->getFrontendCount() > 1)
/* workaround for Neo2 */
if ((boxname.compare("Neo") == 0) && (CFEManager::getInstance()->getFrontendCount() > 1))
boxname += " Twin";
#endif
return boxname;
return boxvendor + " " + boxname;
}
//-------------------------------------------------------------------------
// y-func : get boxmodel
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_get_boxmodel(CyhookHandler *, std::string)
{
#if 0
unsigned int system_rev = cs_get_revision();
std::string boxmodel = "Unknown";
switch(system_rev)
{
#ifdef BOXMODEL_CS_HD1
case 6:
case 7:
case 8:
case 10:
boxmodel = "Nevis";
break;
#endif
#ifdef BOXMODEL_CS_HD2
case 9:
boxmodel = "Apollo";
break;
case 11:
if (cs_get_chip_type() == 33904 /*0x8470*/)
boxmodel = "Shiner";
else
boxmodel = "Kronos";
break;
case 12:
case 13:
case 14:
boxmodel = "Kronos";
break;
#endif
default:
break;
}
#else
std::string boxmodel = std::string(g_info.hw_caps->boxarch);
#endif
return boxmodel;
return g_info.hw_caps->boxarch;
}
//-------------------------------------------------------------------------
// y-func : get stream info