mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
plugins: add new configuration item 'integration'
Integrate plugins in existing neutrino menues. Usage in plugin.cfg:
integration=0; disabled
integration=1; reserved
integration=2; multimedia menu
integration=3; settings menu
integration=4; service menu
integration=5; information menu
Origin commit data
------------------
Branch: ni/coolstream
Commit: f586552719
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-09-28 (Sun, 28 Sep 2014)
Origin message was:
------------------
- plugins: add new configuration item 'integration'
Integrate plugins in existing neutrino menues. Usage in plugin.cfg:
integration=0; disabled
integration=1; reserved
integration=2; multimedia menu
integration=3; settings menu
integration=4; service menu
integration=5; information menu
------------------
This commit was generated by Migit
This commit is contained in:
@@ -208,6 +208,7 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
|||||||
plugin_data->shellwindow = false;
|
plugin_data->shellwindow = false;
|
||||||
plugin_data->hide = false;
|
plugin_data->hide = false;
|
||||||
plugin_data->type = CPlugins::P_TYPE_DISABLED;
|
plugin_data->type = CPlugins::P_TYPE_DISABLED;
|
||||||
|
plugin_data->integration = CPlugins::I_TYPE_DISABLED;
|
||||||
|
|
||||||
for (int i = 0; i < linecount; i++)
|
for (int i = 0; i < linecount; i++)
|
||||||
{
|
{
|
||||||
@@ -242,6 +243,10 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
|||||||
{
|
{
|
||||||
plugin_data->type = getPluginType(atoi(parm));
|
plugin_data->type = getPluginType(atoi(parm));
|
||||||
}
|
}
|
||||||
|
else if (cmd == "integration")
|
||||||
|
{
|
||||||
|
plugin_data->integration = getPluginIntegration(atoi(parm));
|
||||||
|
}
|
||||||
else if (cmd == "needfb")
|
else if (cmd == "needfb")
|
||||||
{
|
{
|
||||||
plugin_data->fb = atoi(parm);
|
plugin_data->fb = atoi(parm);
|
||||||
@@ -518,3 +523,32 @@ CPlugins::p_type_t CPlugins::getPluginType(int type)
|
|||||||
return P_TYPE_DISABLED;
|
return P_TYPE_DISABLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
default:
|
||||||
|
return I_TYPE_DISABLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -56,6 +56,18 @@ class CPlugins
|
|||||||
}
|
}
|
||||||
p_type_t;
|
p_type_t;
|
||||||
|
|
||||||
|
typedef enum i_type
|
||||||
|
{
|
||||||
|
I_TYPE_DISABLED = 0x1,
|
||||||
|
/*
|
||||||
|
I_TYPE_MAIN = 0x2,
|
||||||
|
*/
|
||||||
|
I_TYPE_MULTIMEDIA = 0x4,
|
||||||
|
I_TYPE_SETTING = 0x8,
|
||||||
|
I_TYPE_SERVICE = 0x10,
|
||||||
|
I_TYPE_INFORMATION = 0x20
|
||||||
|
}
|
||||||
|
i_type_t;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -73,6 +85,7 @@ class CPlugins
|
|||||||
std::string description; // UTF-8 encoded
|
std::string description; // UTF-8 encoded
|
||||||
std::string depend;
|
std::string depend;
|
||||||
CPlugins::p_type_t type;
|
CPlugins::p_type_t type;
|
||||||
|
CPlugins::i_type_t integration;
|
||||||
|
|
||||||
bool fb;
|
bool fb;
|
||||||
bool rc;
|
bool rc;
|
||||||
@@ -100,6 +113,7 @@ class CPlugins
|
|||||||
bool plugin_exists(const std::string & filename);
|
bool plugin_exists(const std::string & filename);
|
||||||
int find_plugin(const std::string & filename);
|
int find_plugin(const std::string & filename);
|
||||||
CPlugins::p_type_t getPluginType(int type);
|
CPlugins::p_type_t getPluginType(int type);
|
||||||
|
CPlugins::i_type_t getPluginIntegration(int integration);
|
||||||
public:
|
public:
|
||||||
CPlugins();
|
CPlugins();
|
||||||
~CPlugins();
|
~CPlugins();
|
||||||
@@ -119,6 +133,7 @@ class CPlugins
|
|||||||
inline const char * getFileName (const int number) const { return plugin_list[number].filename.c_str() ; }
|
inline const char * getFileName (const int number) const { return plugin_list[number].filename.c_str() ; }
|
||||||
inline const std::string & getDescription (const int number) const { return plugin_list[number].description ; }
|
inline const std::string & getDescription (const int number) const { return plugin_list[number].description ; }
|
||||||
inline int getType (const int number) const { return plugin_list[number].type ; }
|
inline int getType (const int number) const { return plugin_list[number].type ; }
|
||||||
|
inline int getIntegration (const int number) const { return plugin_list[number].integration ; }
|
||||||
inline bool isHidden (const int number) const { return plugin_list[number].hide ; }
|
inline bool isHidden (const int number) const { return plugin_list[number].hide ; }
|
||||||
inline int getIndex (const int number) const { return plugin_list[number].index ; }
|
inline int getIndex (const int number) const { return plugin_list[number].index ; }
|
||||||
inline neutrino_msg_t getKey (const int number) const { return (neutrino_msg_t)plugin_list[number].key; }
|
inline neutrino_msg_t getKey (const int number) const { return (neutrino_msg_t)plugin_list[number].key; }
|
||||||
|
13
src/plugin.h
13
src/plugin.h
@@ -44,4 +44,17 @@ typedef enum plugin_type
|
|||||||
}
|
}
|
||||||
plugin_type_t;
|
plugin_type_t;
|
||||||
|
|
||||||
|
typedef enum integration_type
|
||||||
|
{
|
||||||
|
INTEGRATION_TYPE_DISABLED = 0,
|
||||||
|
/*
|
||||||
|
INTEGRATION_TYPE_MAIN = 1,
|
||||||
|
*/
|
||||||
|
INTEGRATION_TYPE_MULTIMEDIA = 2,
|
||||||
|
INTEGRATION_TYPE_SETTING = 3,
|
||||||
|
INTEGRATION_TYPE_SERVICE = 4,
|
||||||
|
INTEGRATION_TYPE_INFORMATION = 5
|
||||||
|
}
|
||||||
|
integration_type_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user