#pragma once

#include <QGeoCoordinate>
#include <QObject>

#include <memory>

class TileData;

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 publishTileData(const TileData &tileData);
  bool hasTileData(const TileData &tileData) const;

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

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

private:
  PImpl pImpl;
};
