mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
plugin-code: cleanup from many unused code; ...
* remove intergration conversion because we can use the integer as it is
* update headers
Do we need /src/plugin.h anymore? Maybe this code could be merged into src/gui/plugins.h.
Origin commit data
------------------
Branch: ni/coolstream
Commit: f0f0c1f55d
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-08 (Fri, 08 Sep 2017)
Origin message was:
------------------
- plugin-code: cleanup from many unused code; ...
* remove intergration conversion because we can use the integer as it is
* update headers
Do we need /src/plugin.h anymore? Maybe this code could be merged into src/gui/plugins.h.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -4,29 +4,20 @@
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Kommentar:
|
||||
|
||||
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
|
||||
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
|
||||
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
|
||||
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
|
||||
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -200,18 +191,10 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
plugin_data->key = CRCInput::RC_nokey;
|
||||
plugin_data->name = "";
|
||||
plugin_data->description = "";
|
||||
#if 0
|
||||
plugin_data->fb = false;
|
||||
plugin_data->rc = false;
|
||||
plugin_data->lcd = false;
|
||||
plugin_data->vtxtpid = false;
|
||||
plugin_data->showpig = false;
|
||||
plugin_data->needoffset = false;
|
||||
#endif
|
||||
plugin_data->shellwindow = false;
|
||||
plugin_data->hide = false;
|
||||
plugin_data->type = CPlugins::P_TYPE_DISABLED;
|
||||
plugin_data->integration = CPlugins::I_TYPE_DISABLED;
|
||||
plugin_data->integration = PLUGIN_INTEGRATION_DISABLED;
|
||||
plugin_data->hinticon = NEUTRINO_ICON_HINT_PLUGIN;
|
||||
|
||||
std::string _hintIcon = plugin_data->plugindir + "/" + plugin_data->filename + "_hint.png";
|
||||
@@ -267,34 +250,8 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
}
|
||||
else if (cmd == "integration")
|
||||
{
|
||||
plugin_data->integration = getPluginIntegration(atoi(parm));
|
||||
plugin_data->integration = atoi(parm);
|
||||
}
|
||||
#if 0
|
||||
else if (cmd == "needfb")
|
||||
{
|
||||
plugin_data->fb = atoi(parm);
|
||||
}
|
||||
else if (cmd == "needrc")
|
||||
{
|
||||
plugin_data->rc = atoi(parm);
|
||||
}
|
||||
else if (cmd == "needlcd")
|
||||
{
|
||||
plugin_data->lcd = atoi(parm);
|
||||
}
|
||||
else if (cmd == "needvtxtpid")
|
||||
{
|
||||
plugin_data->vtxtpid = atoi(parm);
|
||||
}
|
||||
else if (cmd == "pigon")
|
||||
{
|
||||
plugin_data->showpig = atoi(parm);
|
||||
}
|
||||
else if (cmd == "needoffsets")
|
||||
{
|
||||
plugin_data->needoffset = atoi(parm);
|
||||
}
|
||||
#endif
|
||||
else if (cmd == "shellwindow")
|
||||
{
|
||||
plugin_data->shellwindow = atoi(parm);
|
||||
@@ -307,7 +264,6 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
{
|
||||
reject = atoi(parm);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inFile.close();
|
||||
@@ -328,28 +284,6 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
return !reject;
|
||||
}
|
||||
|
||||
#if 0
|
||||
PluginParam * CPlugins::makeParam(const char * const id, const char * const value, PluginParam * const next)
|
||||
{
|
||||
PluginParam * startparam = new PluginParam;
|
||||
|
||||
startparam->next = next;
|
||||
startparam->id = id;
|
||||
startparam->val = strdup(value);
|
||||
|
||||
return startparam;
|
||||
}
|
||||
|
||||
PluginParam * CPlugins::makeParam(const char * const id, const int value, PluginParam * const next)
|
||||
{
|
||||
char aval[10];
|
||||
|
||||
sprintf(aval, "%d", value);
|
||||
|
||||
return makeParam(id, aval, next);
|
||||
}
|
||||
#endif
|
||||
|
||||
void CPlugins::startPlugin_by_name(const std::string & name)
|
||||
{
|
||||
for (int i = 0; i < (int) plugin_list.size(); i++)
|
||||
@@ -369,7 +303,6 @@ void CPlugins::startPlugin(const char * const filename)
|
||||
startPlugin(pluginnr);
|
||||
else
|
||||
printf("[CPlugins] could not find %s\n", filename);
|
||||
|
||||
}
|
||||
|
||||
void CPlugins::popenScriptPlugin(const char * script)
|
||||
@@ -558,38 +491,6 @@ CPlugins::p_type_t CPlugins::getPluginType(int type)
|
||||
}
|
||||
}
|
||||
|
||||
CPlugins::i_type_t CPlugins::getPluginIntegration(int integration)
|
||||
{
|
||||
switch (integration)
|
||||
{
|
||||
case INTEGRATION_TYPE_DISABLED:
|
||||
return I_TYPE_DISABLED;
|
||||
break;
|
||||
/*
|
||||
case INTEGRATION_TYPE_MAIN:
|
||||
return I_TYPE_MAIN;
|
||||
break;
|
||||
*/
|
||||
case INTEGRATION_TYPE_MULTIMEDIA:
|
||||
return I_TYPE_MULTIMEDIA;
|
||||
break;
|
||||
case INTEGRATION_TYPE_SETTING:
|
||||
return I_TYPE_SETTING;
|
||||
break;
|
||||
case INTEGRATION_TYPE_SERVICE:
|
||||
return I_TYPE_SERVICE;
|
||||
break;
|
||||
case INTEGRATION_TYPE_INFORMATION:
|
||||
return I_TYPE_INFORMATION;
|
||||
break;
|
||||
case INTEGRATION_TYPE_NI_MENU: //NI
|
||||
return I_TYPE_NI_MENU;
|
||||
break;
|
||||
default:
|
||||
return I_TYPE_DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
neutrino_msg_t CPlugins::getPluginKey(std::string key)
|
||||
{
|
||||
if (key == "red")
|
||||
|
Reference in New Issue
Block a user