2025-12-19 15:53:41 +01:00
|
|
|
#ifndef LOGOS_BLOCKCHAIN_MODULE_API_H
|
|
|
|
|
#define LOGOS_BLOCKCHAIN_MODULE_API_H
|
2025-12-17 10:55:13 +01:00
|
|
|
|
|
|
|
|
#include <core/interface.h>
|
2025-12-18 11:47:59 +01:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
2025-12-17 10:55:13 +01:00
|
|
|
#include <libnomos.h>
|
2025-12-18 11:47:59 +01:00
|
|
|
#ifdef __cplusplus
|
2025-12-19 15:53:41 +01:00
|
|
|
}
|
2025-12-18 11:47:59 +01:00
|
|
|
#endif
|
2025-12-17 10:55:13 +01:00
|
|
|
|
2025-12-19 15:53:41 +01:00
|
|
|
class LogosBlockchainModuleAPI : public QObject, public PluginInterface {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
2025-12-17 10:55:13 +01:00
|
|
|
public:
|
2025-12-19 15:53:41 +01:00
|
|
|
using QObject::QObject;
|
|
|
|
|
~LogosBlockchainModuleAPI() override = default;
|
2025-12-17 10:55:13 +01:00
|
|
|
|
2025-12-19 15:53:41 +01:00
|
|
|
Q_INVOKABLE virtual int start(const QString& config_path) = 0;
|
2025-12-17 10:55:13 +01:00
|
|
|
Q_INVOKABLE virtual void stop() = 0;
|
2025-12-19 15:53:41 +01:00
|
|
|
Q_INVOKABLE virtual void initLogos(LogosAPI* logosAPIInstance) = 0;
|
2025-12-17 10:55:13 +01:00
|
|
|
|
|
|
|
|
signals:
|
2025-12-19 15:53:41 +01:00
|
|
|
void eventResponse(const QString& eventName, const QVariantList& data);
|
2025-12-17 10:55:13 +01:00
|
|
|
};
|
2025-12-19 15:53:41 +01:00
|
|
|
|
2025-12-17 10:55:13 +01:00
|
|
|
#define LogosBlockchainModuleInterface_iid "org.logos.blockchaininterface"
|
|
|
|
|
Q_DECLARE_INTERFACE(LogosBlockchainModuleAPI, LogosBlockchainModuleInterface_iid)
|
2025-12-19 15:53:41 +01:00
|
|
|
|
|
|
|
|
#endif
|