#pragma once

#include <QGeoCoordinate>
#include <QObject>

#include "SnakeTilesLocal.h"

#include <memory>

class NemoInterface : public QObject {
  Q_OBJECT
  class Impl;
  using PImpl = std::unique_ptr<Impl>;

public:
  enum class NemoStatus {
    NotConnected = 0,
    Connected = 1,
    Timeout = -1,
    InvalidHeartbeat = -2
  };

  explicit NemoInterface(QObject *parent = nullptr);
  ~NemoInterface() override;

  void start();
  void stop();

  void setTilesENU(const SnakeTilesLocal &tilesENU);
  void setENUOrigin(const QGeoCoordinate &ENUOrigin);

  NemoStatus status() const;
  QVector<int> progress() const;

signals:
  void statusChanged();
  void progressChanged();

private:
  PImpl pImpl;
};
