qmlfrontend/engine_instance.h
changeset 14393 b6824a53d4b1
parent 14311 92e5682810d4
child 14394 4409344db447
--- a/qmlfrontend/engine_instance.h	Fri Dec 07 13:35:08 2018 +0100
+++ b/qmlfrontend/engine_instance.h	Fri Dec 07 13:56:45 2018 +0100
@@ -1,31 +1,48 @@
 #ifndef ENGINEINSTANCE_H
 #define ENGINEINSTANCE_H
 
-#include "engine_interface.h"
-
 #include <QObject>
 #include <QOpenGLContext>
 
+#include "engine_interface.h"
 #include "game_config.h"
 
 class EngineInstance : public QObject {
   Q_OBJECT
  public:
-  explicit EngineInstance(QObject* parent = nullptr);
+  explicit EngineInstance(const QString& libraryPath,
+                          QObject* parent = nullptr);
   ~EngineInstance();
 
+  Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged)
+
   void sendConfig(const GameConfig& config);
   void advance(quint32 ticks);
   void renderFrame();
   void setOpenGLContext(QOpenGLContext* context);
   Engine::PreviewInfo generatePreview();
 
+  bool isValid() const;
+
  signals:
+  void isValidChanged(bool isValid);
 
  public slots:
 
  private:
   Engine::EngineInstance* m_instance;
+
+  Engine::hedgewars_engine_protocol_version_t*
+      hedgewars_engine_protocol_version;
+  Engine::start_engine_t* start_engine;
+  Engine::generate_preview_t* generate_preview;
+  Engine::cleanup_t* cleanup;
+  Engine::send_ipc_t* send_ipc;
+  Engine::read_ipc_t* read_ipc;
+  Engine::setup_current_gl_context_t* setup_current_gl_context;
+  Engine::render_frame_t* render_frame;
+  Engine::advance_simulation_t* advance_simulation;
+  bool m_isValid;
 };
 
 #endif  // ENGINEINSTANCE_H