mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
controlapi: add possibility to check for updates
Origin commit data
------------------
Branch: ni/coolstream
Commit: 4183335244
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-24 (Sat, 24 Dec 2016)
Origin message was:
------------------
- controlapi: add possibility to check for updates
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -61,6 +61,9 @@ extern cVideo * videoDecoder;
|
|||||||
#include "gui/infoicons.h"
|
#include "gui/infoicons.h"
|
||||||
extern CInfoIcons *InfoIcons; /* neutrino.cpp */
|
extern CInfoIcons *InfoIcons; /* neutrino.cpp */
|
||||||
|
|
||||||
|
//NI
|
||||||
|
#include "gui/update.h"
|
||||||
|
|
||||||
extern CPlugins *g_PluginList;//for relodplugins
|
extern CPlugins *g_PluginList;//for relodplugins
|
||||||
extern CBouquetManager *g_bouquetManager;
|
extern CBouquetManager *g_bouquetManager;
|
||||||
#define EVENTDEV "/dev/input/input0"
|
#define EVENTDEV "/dev/input/input0"
|
||||||
@@ -237,7 +240,8 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
|
|||||||
{"getdir", &CControlAPI::getDirCGI, "+xml"},
|
{"getdir", &CControlAPI::getDirCGI, "+xml"},
|
||||||
{"getmovies", &CControlAPI::getMoviesCGI, "+xml"},
|
{"getmovies", &CControlAPI::getMoviesCGI, "+xml"},
|
||||||
//NI
|
//NI
|
||||||
{"infoicons", &CControlAPI::InfoIconsCGI, "text/plain"}
|
{"infoicons", &CControlAPI::InfoIconsCGI, "text/plain"},
|
||||||
|
{"updateinfo", &CControlAPI::UpdateInfoCGI, ""}
|
||||||
};
|
};
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Main Dispatcher
|
// Main Dispatcher
|
||||||
@@ -3962,3 +3966,31 @@ void CControlAPI::InfoIconsCGI(CyhookHandler *hh)
|
|||||||
|
|
||||||
hh->SendOk();
|
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);
|
||||||
|
}
|
||||||
|
@@ -138,6 +138,7 @@ private:
|
|||||||
std::string getSubdirectories(CyhookHandler *hh, std::string path, std::string result);
|
std::string getSubdirectories(CyhookHandler *hh, std::string path, std::string result);
|
||||||
|
|
||||||
void InfoIconsCGI(CyhookHandler *hh); //NI
|
void InfoIconsCGI(CyhookHandler *hh); //NI
|
||||||
|
void UpdateInfoCGI(CyhookHandler *hh); //NI
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CNeutrinoAPI *NeutrinoAPI;
|
CNeutrinoAPI *NeutrinoAPI;
|
||||||
|
Reference in New Issue
Block a user