- non functional
This commit is contained in:
parent
9d51646260
commit
a032bc3f04
2
main.cpp
2
main.cpp
@ -4,7 +4,7 @@
|
||||
using namespace std;
|
||||
|
||||
//int debugLevel = DEBUG | INFO | WARNING | ERROR;
|
||||
QMap <QString, BackEnds> backends;
|
||||
QMap <QString, Plugins> plugins;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
1
plugins/libzigatebackend.so.1.0.0
Symbolic link
1
plugins/libzigatebackend.so.1.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
/home/daniel/develop/zigbee/build-zigatebackend-Qt_5_15_7_qt5-Debug/libzigatebackend.so.1.0.0
|
@ -3,13 +3,13 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QtPlugin>
|
||||
|
||||
class ZigbeeManagerInterface
|
||||
{
|
||||
public:
|
||||
virtual ~ZigbeeManagerInterface() = default;
|
||||
virtual bool initBackend();
|
||||
|
||||
virtual bool initPlugin();
|
||||
};
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -1,8 +1,10 @@
|
||||
#include "zigbeemanager.h"
|
||||
#include "zigbeeManagerinterface.h"
|
||||
#include <QDir>
|
||||
#include <QPluginLoader>
|
||||
|
||||
using namespace std;
|
||||
class ZigbeeManagerInterface;
|
||||
|
||||
ZigbeeManager::ZigbeeManager()
|
||||
{
|
||||
@ -27,7 +29,7 @@ bool ZigbeeManager::loadPlugins()
|
||||
zigbeeManagerInterface = qobject_cast<ZigbeeManagerInterface *>(plugin);
|
||||
if (zigbeeManagerInterface)
|
||||
{
|
||||
zigbeeManagerInterface->initBackend();
|
||||
zigbeeManagerInterface->initPlugin();
|
||||
return true;
|
||||
}
|
||||
pluginLoader.unload();
|
||||
|
@ -18,6 +18,8 @@
|
||||
//#include "library.h"
|
||||
#include "zigbeeManagerinterface.h"
|
||||
|
||||
class ZigbeeManagerInterface;
|
||||
|
||||
class ZigbeeManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -26,17 +28,17 @@ public:
|
||||
ZigbeeManager();
|
||||
|
||||
private:
|
||||
ZigbeeManagerInterface *zigbeeManagerInterface;
|
||||
bool loadPlugins();
|
||||
|
||||
ZigbeeManagerInterface *zigbeeManagerInterface;
|
||||
};
|
||||
|
||||
class BackEnds
|
||||
class Plugins
|
||||
{
|
||||
public:
|
||||
QString name;
|
||||
QString device;
|
||||
QVariant backend;
|
||||
QVariant plugin;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user