2026-04-16 22:57:41 +02:00
|
|
|
#ifndef BLOCKCHAIN_PLUGIN_H
|
|
|
|
|
#define BLOCKCHAIN_PLUGIN_H
|
2026-02-11 20:39:32 +01:00
|
|
|
|
|
|
|
|
#include <QObject>
|
2026-04-16 22:57:41 +02:00
|
|
|
#include <QString>
|
|
|
|
|
#include <QtPlugin> // for Q_PLUGIN_METADATA, Q_INTERFACES
|
|
|
|
|
#include "BlockchainPluginInterface.h"
|
|
|
|
|
#include "LogosViewPluginBase.h"
|
2026-02-11 20:39:32 +01:00
|
|
|
|
2026-04-16 22:57:41 +02:00
|
|
|
class LogosAPI;
|
|
|
|
|
class BlockchainBackend;
|
|
|
|
|
|
|
|
|
|
// Thin plugin entry point. Holds a BlockchainBackend and lets the
|
|
|
|
|
// generated view-plugin base expose it to ui-host.
|
|
|
|
|
class BlockchainPlugin : public QObject,
|
|
|
|
|
public BlockchainPluginInterface,
|
|
|
|
|
public BlockchainBackendViewPluginBase
|
|
|
|
|
{
|
2026-02-11 20:39:32 +01:00
|
|
|
Q_OBJECT
|
2026-04-16 22:57:41 +02:00
|
|
|
Q_PLUGIN_METADATA(IID BlockchainPluginInterface_iid FILE "../metadata.json")
|
|
|
|
|
Q_INTERFACES(BlockchainPluginInterface)
|
2026-02-11 20:39:32 +01:00
|
|
|
|
|
|
|
|
public:
|
2026-04-16 22:57:41 +02:00
|
|
|
explicit BlockchainPlugin(QObject* parent = nullptr);
|
|
|
|
|
~BlockchainPlugin() override;
|
|
|
|
|
|
|
|
|
|
QString name() const override { return "blockchain_ui"; }
|
|
|
|
|
QString version() const override { return "1.0.0"; }
|
|
|
|
|
|
|
|
|
|
// Called by ui-host after plugin load. Creates the backend and wires
|
|
|
|
|
// it up with the provided LogosAPI.
|
|
|
|
|
Q_INVOKABLE void initLogos(LogosAPI* api);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
BlockchainBackend* m_backend = nullptr;
|
2026-02-11 20:39:32 +01:00
|
|
|
};
|
2026-04-16 22:57:41 +02:00
|
|
|
|
|
|
|
|
#endif // BLOCKCHAIN_PLUGIN_H
|