1
0

- non functional

This commit is contained in:
Daniel Tartavel 2023-05-13 21:04:08 +02:00
parent 9d51646260
commit a032bc3f04
5 changed files with 12 additions and 7 deletions

View File

@ -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[])
{

View File

@ -0,0 +1 @@
/home/daniel/develop/zigbee/build-zigatebackend-Qt_5_15_7_qt5-Debug/libzigatebackend.so.1.0.0

View File

@ -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

View File

@ -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();

View File

@ -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;
};