mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
controlapi.cpp: add possibility to get boxinfo
This commit is contained in:
@@ -63,6 +63,10 @@
|
|||||||
<td><a href="#info">Allgemeine Informationen</a></td>
|
<td><a href="#info">Allgemeine Informationen</a></td>
|
||||||
<td><a href="http://box_ip/control/info">http://box_ip/control/info</a></td>
|
<td><a href="http://box_ip/control/info">http://box_ip/control/info</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="#boxinfo">Box Informationen</a></td>
|
||||||
|
<td><a href="http://box_ip/control/info">http://box_ip/control/boxinfo</a></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#getonidsid">Aktuellen Kanal abfragen</a></td>
|
<td><a href="#getonidsid">Aktuellen Kanal abfragen</a></td>
|
||||||
<td><a href="http://box_ip/control/getonidsid">
|
<td><a href="http://box_ip/control/getonidsid">
|
||||||
@@ -1100,6 +1104,25 @@ Beispiel:<br>
|
|||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ----------------------------------------------------------- -->
|
||||||
|
<div class="title1"><a name="boxinfo"></a><b>Boxinfo abfragen</b></div>
|
||||||
|
<div class="URL">Handler: http://box_ip/control/boxinfo</div>
|
||||||
|
<br>
|
||||||
|
<b>Parameter:</b> <br>
|
||||||
|
<b>Rückgabe:</b><br>
|
||||||
|
<br>
|
||||||
|
Es wird der Hersteller, der Boxname und die Boxarchitektur zurückgegeben.<br>
|
||||||
|
<br>
|
||||||
|
<div class="example">
|
||||||
|
Beispiel:<br>
|
||||||
|
<br>
|
||||||
|
>>>http://box_ip/control/boxinfo<br>
|
||||||
|
vendor=AX<br>
|
||||||
|
boxname=H51<br>
|
||||||
|
boxarch=BCM7251S<br>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- ----------------------------------------------------------- -->
|
<!-- ----------------------------------------------------------- -->
|
||||||
<div class="title1"><a name="getonidsid"></a><b>Aktuellen Kanal abfragen</b></div>
|
<div class="title1"><a name="getonidsid"></a><b>Aktuellen Kanal abfragen</b></div>
|
||||||
<div class="URL">Handler: http://box_ip/control/getonidsid</div>
|
<div class="URL">Handler: http://box_ip/control/getonidsid</div>
|
||||||
|
@@ -217,6 +217,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
|
|||||||
{"getdate", &CControlAPI::GetDateCGI, "text/plain"},
|
{"getdate", &CControlAPI::GetDateCGI, "text/plain"},
|
||||||
{"gettime", &CControlAPI::GetTimeCGI, "text/plain"},
|
{"gettime", &CControlAPI::GetTimeCGI, "text/plain"},
|
||||||
{"info", &CControlAPI::InfoCGI, "text/plain"},
|
{"info", &CControlAPI::InfoCGI, "text/plain"},
|
||||||
|
{"boxinfo", &CControlAPI::BoxInfoCGI, "text/plain"},
|
||||||
{"version", &CControlAPI::VersionCGI, ""},
|
{"version", &CControlAPI::VersionCGI, ""},
|
||||||
{"reloadsetup", &CControlAPI::ReloadNeutrinoSetupCGI, ""},
|
{"reloadsetup", &CControlAPI::ReloadNeutrinoSetupCGI, ""},
|
||||||
{"reloadplugins", &CControlAPI::ReloadPluginsCGI, ""},
|
{"reloadplugins", &CControlAPI::ReloadPluginsCGI, ""},
|
||||||
@@ -868,6 +869,38 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CControlAPI::BoxInfoCGI(CyhookHandler *hh)
|
||||||
|
{
|
||||||
|
std::string boxinfo(g_info.hw_caps->boxvendor);
|
||||||
|
/*
|
||||||
|
I don't know the current legal situation.
|
||||||
|
So better let's change the vendor's name to CST.
|
||||||
|
|
||||||
|
After change this, you'll have to align code in Y_Blocks.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (boxinfo.compare("Coolstream") == 0) {
|
||||||
|
boxinfo = "CST";
|
||||||
|
}
|
||||||
|
std::string boxname(g_info.hw_caps->boxname);
|
||||||
|
if (strcmp(boxname.c_str(), "Neo") == 0)
|
||||||
|
{
|
||||||
|
// detecting Neo Twin by counting frontends
|
||||||
|
if (CFEManager::getInstance()->getFrontendCount() > 1)
|
||||||
|
boxname = "Neo Twin";
|
||||||
|
}
|
||||||
|
|
||||||
|
boxinfo = "vendor=" + boxinfo;
|
||||||
|
boxinfo += "\n";
|
||||||
|
boxinfo += "boxname=";
|
||||||
|
boxinfo += boxname;
|
||||||
|
boxinfo += "\n";
|
||||||
|
boxinfo += "boxarch=";
|
||||||
|
boxinfo += g_info.hw_caps->boxarch;
|
||||||
|
|
||||||
|
hh->printf("%s\n", boxinfo.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
||||||
{
|
{
|
||||||
static CNetAdapter netadapter;
|
static CNetAdapter netadapter;
|
||||||
|
@@ -91,6 +91,7 @@ private:
|
|||||||
void GetTPChannel_IDCGI(CyhookHandler *hh);
|
void GetTPChannel_IDCGI(CyhookHandler *hh);
|
||||||
void MessageCGI(CyhookHandler *hh);
|
void MessageCGI(CyhookHandler *hh);
|
||||||
void InfoCGI(CyhookHandler *hh);
|
void InfoCGI(CyhookHandler *hh);
|
||||||
|
void BoxInfoCGI(CyhookHandler *hh);
|
||||||
void HWInfoCGI(CyhookHandler *hh);
|
void HWInfoCGI(CyhookHandler *hh);
|
||||||
void ShutdownCGI(CyhookHandler *hh);
|
void ShutdownCGI(CyhookHandler *hh);
|
||||||
void VolumeCGI(CyhookHandler *hh);
|
void VolumeCGI(CyhookHandler *hh);
|
||||||
|
Reference in New Issue
Block a user