Merge branch 'uncool/dvbsi++' commit '890b4f2c0a3'

...needs buildfixing...

Conflicts:
	data/icons/shutdown.jpg
	data/icons/start.jpg
	lib/libtuxtxt/tuxtxt.h
	src/driver/Makefile.am
	src/driver/audiodec/Makefile.am
	src/driver/framebuffer.cpp
	src/driver/record.cpp
	src/driver/volume.cpp
	src/gui/audio_setup.cpp
	src/gui/audioplayer.cpp
	src/gui/epgview.cpp
	src/gui/eventlist.cpp
	src/gui/filebrowser.cpp
	src/gui/infoviewer.cpp
	src/gui/keybind_setup.cpp
	src/gui/miscsettings_menu.cpp
	src/gui/movieplayer.cpp
	src/gui/osd_setup.cpp
	src/gui/scan.cpp
	src/gui/scan_setup.cpp
	src/gui/streaminfo2.cpp
	src/gui/update.cpp
	src/gui/videosettings.cpp
	src/gui/widget/menue.cpp
	src/neutrino.cpp
	src/neutrino_menue.cpp
	src/system/Makefile.am
	src/system/configure_network.cpp
	src/system/httptool.cpp
	src/system/setting_helpers.cpp
	src/timerd/timermanager.cpp
	src/zapit/include/zapit/frontend_c.h
	src/zapit/src/Makefile.am
	src/zapit/src/capmt.cpp
	src/zapit/src/frontend.cpp
	src/zapit/src/zapit.cpp


Origin commit data
------------------
Commit: adb23b23ee
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-10-14 (Sun, 14 Oct 2012)
This commit is contained in:
Stefan Seyfried
2012-10-14 12:51:07 +02:00
442 changed files with 7648 additions and 4167 deletions

View File

@@ -29,12 +29,15 @@
#include <neutrino.h>
#include <gui/widget/icons.h>
#include "gui/network_service.h"
#include "mymenu.h"
#include "network_service.h"
#include <mymenu.h>
#include <driver/screen_max.h>
#include <system/debug.h>
#include <system/helpers.h>
#include <unistd.h>
#define TOUCH_BASE "/var/etc/."
@@ -43,16 +46,18 @@ struct network_service
std::string name;
std::string cmd;
std::string options;
neutrino_locale_t hint;
std::string icon;
int enabled;
};
#define SERVICE_COUNT 4
static struct network_service services[SERVICE_COUNT] =
{
{ "FTP", "vsftpd", "", 0 },
{ "Telnet", "telnetd", "-l/bin/login", 0 },
{ "DjMount", "djmount", "-o iocharset=utf8 /media/00upnp/", 0 },
{ "uShare", "ushare", "-D", 0 }
{ "FTP", "vsftpd", "", LOCALE_MENU_HINT_NET_FTPD, "", 0 },
{ "Telnet", "telnetd", "-l/bin/login", LOCALE_MENU_HINT_NET_TELNET, "", 0 },
{ "DjMount", "djmount", "-o iocharset=utf8 /media/00upnp/", LOCALE_MENU_HINT_NET_DJMOUNT, "", 0 },
{ "uShare", "ushare", "-D", LOCALE_MENU_HINT_NET_USHARE, "", 0 }
};
CNetworkService::CNetworkService(std::string cmd, std::string opts)
@@ -68,18 +73,17 @@ CNetworkService::CNetworkService(std::string cmd, std::string opts)
void CNetworkService::Start()
{
std::string cmd = command + " " + options;
printf("CNetworkService::Start: %s\n", cmd.c_str());
system(cmd.c_str());
printf("CNetworkService::Start: %s %s\n", command.c_str(), options.c_str());
my_system( command.c_str(), options.c_str());
enabled = true;
TouchFile();
}
void CNetworkService::Stop()
{
std::string cmd = "killall " + command;
printf("CNetworkService::Stop: %s\n", cmd.c_str());
system(cmd.c_str());
const char killall []= "killall";
printf("CNetworkService::Stop: %s %s\n", killall, command.c_str());
my_system(killall, command.c_str());
enabled = false;
TouchFile();
}
@@ -140,10 +144,53 @@ int CNetworkServiceSetup::showNetworkServiceSetup()
CNetworkService * items[SERVICE_COUNT];
//telnetd used inetd
bool useinetd = false;
char *buf=NULL;
size_t len = 0;
FILE* fd = fopen("/etc/inetd.conf", "r");
if(fd)
{
while(!feof(fd))
{
if(getline(&buf, &len, fd)!=-1)
{
if (strstr(buf, "telnetd") != NULL)
{
useinetd = true;
break;
}
}
}
fclose(fd);
if(buf)
free(buf);
}
//set active when found
bool active;
for(unsigned i = 0; i < SERVICE_COUNT; i++) {
items[i] = new CNetworkService(services[i].cmd, services[i].options);
services[i].enabled = items[i]->Enabled();
setup->addItem(new CMenuOptionChooser(services[i].name.c_str(), &services[i].enabled, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, items[i], CRCInput::convertDigitToKey(shortcut++), ""));
std::string execute1 = "/bin/" + services[i].cmd;
std::string execute2 = "/sbin/" + services[i].cmd;
active = false;
if ( !(access(execute1.c_str(), F_OK)) || !(access(execute2.c_str(), F_OK)) )
active = true;
if ( (services[i].name == "Telnet") && useinetd)
active = false;
CMenuOptionChooser * mc = new CMenuOptionChooser(services[i].name.c_str(), &services[i].enabled, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, active, items[i], CRCInput::convertDigitToKey(shortcut), "");
if (active)
shortcut++;
mc->setHint(services[i].icon, services[i].hint);
setup->addItem(mc);
}
int res = setup->exec (NULL, "");