From 0727e73f759c4aa818f764d85e9e8c69b593e2aa Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Thu, 18 May 2023 11:51:14 +0200 Subject: [PATCH] restarting from scratch --- main.cpp | 21 --------------- plugins/libzigatebackend.so.1.0.0 | 1 - version.h | 8 ------ zigbeeManagerinterface.h | 23 ---------------- zigbeemanager.cpp | 43 ----------------------------- zigbeemanager.h | 45 ------------------------------- zigbeemanager.pro | 29 -------------------- 7 files changed, 170 deletions(-) delete mode 100644 main.cpp delete mode 120000 plugins/libzigatebackend.so.1.0.0 delete mode 100644 version.h delete mode 100644 zigbeeManagerinterface.h delete mode 100644 zigbeemanager.cpp delete mode 100644 zigbeemanager.h delete mode 100644 zigbeemanager.pro diff --git a/main.cpp b/main.cpp deleted file mode 100644 index 664d5b8..0000000 --- a/main.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "zigbeemanager.h" -#include "zigbeeManagerinterface.h" - -using namespace std; - -//int debugLevel = DEBUG | INFO | WARNING | ERROR; -QMap plugins; - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - - QCoreApplication::setOrganizationName("zigbeemanager"); - QCoreApplication::setApplicationName("zigbeemanager"); - - ZigbeeManager zigbeeManager; - - return a.exec(); -} - - diff --git a/plugins/libzigatebackend.so.1.0.0 b/plugins/libzigatebackend.so.1.0.0 deleted file mode 120000 index 4ab0585..0000000 --- a/plugins/libzigatebackend.so.1.0.0 +++ /dev/null @@ -1 +0,0 @@ -/home/daniel/develop/zigbee/build-zigatebackend-Qt_5_15_7_qt5-Debug/libzigatebackend.so.1.0.0 \ No newline at end of file diff --git a/version.h b/version.h deleted file mode 100644 index 2c93008..0000000 --- a/version.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef VERSION_H -#define VERSION_H - -QString version = "0.1"; - - -#endif // VERSION_H - diff --git a/zigbeeManagerinterface.h b/zigbeeManagerinterface.h deleted file mode 100644 index 9a2772f..0000000 --- a/zigbeeManagerinterface.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef ZIGBEEMANAGERINTERFACE_H -#define ZIGBEEMANAGERINTERFACE_H - -#include -#include -#include - -class ZigbeeManagerInterface -{ -public: - virtual ~ZigbeeManagerInterface() = default; - virtual bool initPlugin(); -}; - -QT_BEGIN_NAMESPACE - -#define ZigbeeManagerInterface_iid "org.zigbeemanager" - -Q_DECLARE_INTERFACE(ZigbeeManagerInterface, ZigbeeManagerInterface_iid) -QT_END_NAMESPACE - - -#endif // ZIGBEEMANAGERINTERFACE_H diff --git a/zigbeemanager.cpp b/zigbeemanager.cpp deleted file mode 100644 index f4ebb9a..0000000 --- a/zigbeemanager.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "zigbeemanager.h" -#include "zigbeeManagerinterface.h" -#include -#include - -using namespace std; -class ZigbeeManagerInterface; - -ZigbeeManager::ZigbeeManager() -{ - if (!loadPlugins()) - { - cout << "no plugins found in " << QCoreApplication::applicationDirPath().toStdString() << "/plugins" <(plugin); - if (zigbeeManagerInterface) - { - zigbeeManagerInterface->initPlugin(); - return true; - } - pluginLoader.unload(); - }else - { - cout << pluginLoader.errorString().toStdString() << endl; - } - } - } - return false; -} diff --git a/zigbeemanager.h b/zigbeemanager.h deleted file mode 100644 index cf86290..0000000 --- a/zigbeemanager.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -//#include -#include -//#include "library.h" -#include "zigbeeManagerinterface.h" - -class ZigbeeManagerInterface; - -class ZigbeeManager : public QObject -{ - Q_OBJECT - -public: - ZigbeeManager(); - -private: - ZigbeeManagerInterface *zigbeeManagerInterface; - bool loadPlugins(); - -}; - -class Plugins -{ - public: - QString name; - QString device; - QVariant plugin; -}; - - -#endif // MAIN_H diff --git a/zigbeemanager.pro b/zigbeemanager.pro deleted file mode 100644 index a54f3ca..0000000 --- a/zigbeemanager.pro +++ /dev/null @@ -1,29 +0,0 @@ -QT += core -QT += serialport -QT += widgets -QT += KConfigCore KConfigGui -QT += KCoreAddons -QT += concurrent - -CONFIG += c++17 console -CONFIG -= app_bundle - -# You can make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp \ - zigbeemanager.cpp - - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /usr/bin -!isEmpty(target.path): INSTALLS += target - -HEADERS += \ - version.h \ - zigbeeManagerinterface.h \ - zigbeemanager.h -