/** * DbWriter for RecordingManagement * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include #include #include #include #include #include "logger.h" namespace LtsPluginManager { struct PluginInstance; } namespace RecordingManagement { class DatabaseInterface; class DbWriterSnapshot; class DbWriterSnapshotThread; class DbWriter : public QObject { Q_OBJECT public: explicit DbWriter(const std::shared_ptr &ddsConnector); ~DbWriter(); bool init(const std::shared_ptr &db); protected: bool initSnapshot(); bool loadPlugin(const LtsPluginManager::PluginInstance &pi); private Q_SLOTS: void ddsTopicsToDatabase(); private: NSqlQuery *m_query{nullptr}; QTimer *m_recordTimer{nullptr}; std::shared_ptr m_ddsConnector; QVector m_plugins; DbWriterSnapshot *m_dbWriterSnapshot{nullptr}; DbWriterSnapshotThread *m_dbWriterSnapshotThread{nullptr}; std::shared_ptr m_db; LOGGER_T m_logger; }; } // namespace RecordingManagement