21 lines
678 B
C++
21 lines
678 B
C++
#include <nlohmannJson.hpp>
|
|
#include <qtBridge.h>
|
|
#include <sql/qSqlBase.h>
|
|
class IBackend :public QObject{
|
|
Q_OBJECT
|
|
public:
|
|
virtual ~IBackend() = default;
|
|
virtual void test() = 0;
|
|
virtual void init(SQLiteDB* ,qtFuncBridge*,nlohmann::ordered_json& json) = 0;
|
|
virtual void cleanup() = 0;
|
|
virtual bool excuteCliCommand(const QString& command) = 0;
|
|
virtual bool excuteCliCommandPreset(const QString& uuid) = 0;
|
|
};
|
|
|
|
extern "C" {
|
|
__declspec(dllexport) IBackend* CreateBackend();
|
|
__declspec(dllexport) void ReleaseBackend(IBackend* backend);
|
|
}
|
|
typedef IBackend* (*CreateBackendFunc)();
|
|
typedef void (*ReleaseBackendFunc)(IBackend*);
|
|
#pragma once |