aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpplugin.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-28 23:40:42 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-28 23:40:42 +0800
commit13fca5100f1e28a538e7900d011714d94f6b1b10 (patch)
tree2034d837473c14f600987134d98f51f0a5ab3c5d /qmidiplayer-desktop/qmpplugin.cpp
parent8eac5088101595422753030b1b259411d63f83a8 (diff)
downloadQMidiPlayer-13fca5100f1e28a538e7900d011714d94f6b1b10.tar.xz
Now it is possible to disable plugins in the plugin list.
Diffstat (limited to 'qmidiplayer-desktop/qmpplugin.cpp')
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index 837f4db..3db7b08 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -58,12 +58,18 @@ qmpPluginManager::qmpPluginManager()
}
qmpPluginManager::~qmpPluginManager()
{
+ for(unsigned i=0;i<plugins.size();++i)delete plugins[i].interface;
qmw=NULL;qsw=NULL;
}
+std::vector<qmpPlugin> *qmpPluginManager::getPlugins()
+{
+ return &plugins;
+}
void qmpPluginManager::initPlugins()
{
for(unsigned i=0;i<plugins.size();++i)
{
+ if(!plugins[i].enabled)continue;
printf("Loaded plugin: %s\n",plugins[i].path.c_str());
plugins[i].interface->init();
}
@@ -111,9 +117,9 @@ int qmpPluginAPI::registerVisualizationIntf(qmpVisualizationIntf* intf)
{return qmw->registerVisualizationIntf(intf);}
void qmpPluginAPI::unregisterVisualizationIntf(int intfhandle)
{qmw->unregisterVisualizationIntf(intfhandle);}
-void qmpPluginAPI::registerOptionInt(std::string,std::string,int){}
+void qmpPluginAPI::registerOptionInt(std::string,std::string,int,int,int){}
int qmpPluginAPI::getOptionInt(std::string){return 0;}
-void qmpPluginAPI::registerOptionDouble(std::string,std::string,double){}
+void qmpPluginAPI::registerOptionDouble(std::string,std::string,double,double,double){}
double qmpPluginAPI::getOptionDouble(std::string){return 0;}
void qmpPluginAPI::registerOptionString(std::string,std::string,std::string){}
std::string qmpPluginAPI::getOptionString(std::string){return "";}