2025-06-05 11:30:12 +08:00
|
|
|
#include <nlohmannJson.hpp>
|
|
|
|
|
#include <qtBridge.h>
|
2025-07-25 00:29:52 +08:00
|
|
|
#include <sql/qSqlBase.h>
|
2025-06-05 11:30:12 +08:00
|
|
|
class IBackend {
|
2025-03-27 18:36:54 +08:00
|
|
|
public:
|
|
|
|
|
virtual ~IBackend() = default;
|
|
|
|
|
virtual void test() = 0;
|
2025-08-31 16:51:18 +08:00
|
|
|
virtual void init(SQLiteDB* ,qtFuncBridge*,nlohmann::ordered_json& json) = 0;
|
2025-03-28 18:33:43 +08:00
|
|
|
virtual void cleanup() = 0;
|
2025-09-19 12:38:05 +08:00
|
|
|
virtual bool excuteCliCommand(const QString& command) = 0;
|
2025-08-20 16:57:03 +08:00
|
|
|
virtual bool excuteCliCommandPreset(const QString& uuid) = 0;
|
2025-03-27 18:36:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
__declspec(dllexport) IBackend* CreateBackend();
|
|
|
|
|
__declspec(dllexport) void ReleaseBackend(IBackend* backend);
|
|
|
|
|
}
|
|
|
|
|
typedef IBackend* (*CreateBackendFunc)();
|
|
|
|
|
typedef void (*ReleaseBackendFunc)(IBackend*);
|
|
|
|
|
#pragma once
|