///
/// HybridDepthSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `CameraOrientation` to properly resolve imports.
namespace margelo::nitro::camera { enum class CameraOrientation; }
// Forward declaration of `DepthPixelFormat` to properly resolve imports.
namespace margelo::nitro::camera { enum class DepthPixelFormat; }
// Forward declaration of `DepthDataAccuracy` to properly resolve imports.
namespace margelo::nitro::camera { enum class DepthDataAccuracy; }
// Forward declaration of `DepthDataQuality` to properly resolve imports.
namespace margelo::nitro::camera { enum class DepthDataQuality; }
// Forward declaration of `HybridCameraCalibrationDataSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridCameraCalibrationDataSpec; }
// Forward declaration of `NativeBuffer` to properly resolve imports.
namespace margelo::nitro::camera { struct NativeBuffer; }
// Forward declaration of `HybridDepthSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridDepthSpec; }
// Forward declaration of `Point` to properly resolve imports.
namespace margelo::nitro::camera { struct Point; }
// Forward declaration of `HybridFrameSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridFrameSpec; }

#include "CameraOrientation.hpp"
#include "DepthPixelFormat.hpp"
#include "DepthDataAccuracy.hpp"
#include "DepthDataQuality.hpp"
#include <vector>
#include <memory>
#include "HybridCameraCalibrationDataSpec.hpp"
#include <optional>
#include <NitroModules/ArrayBuffer.hpp>
#include "NativeBuffer.hpp"
#include "HybridDepthSpec.hpp"
#include <NitroModules/Promise.hpp>
#include "Point.hpp"
#include "HybridFrameSpec.hpp"

namespace margelo::nitro::camera {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `Depth`
   * Inherit this class to create instances of `HybridDepthSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridDepth: public HybridDepthSpec {
   * public:
   *   HybridDepth(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridDepthSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridDepthSpec(): HybridObject(TAG) { }

      // Destructor
      ~HybridDepthSpec() override = default;

    public:
      // Properties
      virtual CameraOrientation getOrientation() = 0;
      virtual bool getIsMirrored() = 0;
      virtual double getTimestamp() = 0;
      virtual double getWidth() = 0;
      virtual double getHeight() = 0;
      virtual double getBytesPerRow() = 0;
      virtual DepthPixelFormat getPixelFormat() = 0;
      virtual bool getIsValid() = 0;
      virtual bool getIsDepthDataFiltered() = 0;
      virtual DepthDataAccuracy getDepthDataAccuracy() = 0;
      virtual DepthDataQuality getDepthDataQuality() = 0;
      virtual std::vector<DepthPixelFormat> getAvailableDepthPixelFormats() = 0;
      virtual std::optional<std::shared_ptr<HybridCameraCalibrationDataSpec>> getCameraCalibrationData() = 0;

    public:
      // Methods
      virtual std::shared_ptr<ArrayBuffer> getDepthData() = 0;
      virtual NativeBuffer getNativeBuffer() = 0;
      virtual std::shared_ptr<HybridDepthSpec> rotate(CameraOrientation orientation, bool isMirrored) = 0;
      virtual std::shared_ptr<Promise<std::shared_ptr<HybridDepthSpec>>> rotateAsync(CameraOrientation orientation, bool isMirrored) = 0;
      virtual std::shared_ptr<HybridDepthSpec> convert(DepthPixelFormat pixelFormat) = 0;
      virtual std::shared_ptr<Promise<std::shared_ptr<HybridDepthSpec>>> convertAsync(DepthPixelFormat pixelFormat) = 0;
      virtual Point convertCameraPointToDepthPoint(const Point& cameraPoint) = 0;
      virtual Point convertDepthPointToCameraPoint(const Point& depthPoint) = 0;
      virtual std::shared_ptr<HybridFrameSpec> toFrame() = 0;
      virtual std::shared_ptr<Promise<std::shared_ptr<HybridFrameSpec>>> toFrameAsync() = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "Depth";
  };

} // namespace margelo::nitro::camera
