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

Origin commit data
------------------
Branch: ni/coolstream
Commit: d39dc75c6d
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-29 (Thu, 29 Dec 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-12-29 15:15:34 +01:00
51 changed files with 509 additions and 177 deletions

View File

@@ -61,6 +61,9 @@ extern cVideo * videoDecoder;
#include "gui/infoicons.h"
extern CInfoIcons *InfoIcons; /* neutrino.cpp */
//NI
#include "gui/update.h"
extern CPlugins *g_PluginList;//for relodplugins
extern CBouquetManager *g_bouquetManager;
#define EVENTDEV "/dev/input/input0"
@@ -239,7 +242,8 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"getdir", &CControlAPI::getDirCGI, "+xml"},
{"getmovies", &CControlAPI::getMoviesCGI, "+xml"},
//NI
{"infoicons", &CControlAPI::InfoIconsCGI, "text/plain"}
{"infoicons", &CControlAPI::InfoIconsCGI, "text/plain"},
{"updateinfo", &CControlAPI::UpdateInfoCGI, ""}
};
//-----------------------------------------------------------------------------
// Main Dispatcher
@@ -3970,3 +3974,31 @@ void CControlAPI::InfoIconsCGI(CyhookHandler *hh)
hh->SendOk();
}
//NI
//-------------------------------------------------------------------------
/** Display update info
*
* @param hh CyhookHandler
*
* @par nhttpd-usage
* @code
* /control/updateinfo[?format=plain|json|xml]
* @endcode
*
*/
//-----------------------------------------------------------------------------
void CControlAPI::UpdateInfoCGI(CyhookHandler *hh)
{
hh->outStart();
std::string result = "";
CFlashUpdate update;
if (update.checkOnlineVersion())
result = hh->outPair("available", "yes", false);
else
result = hh->outPair("available", "no", false);
result = hh->outObject("update", result);
hh->SendResult(result);
}