///
/// HybridCameraDeviceSpec.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 `DeviceType` to properly resolve imports.
namespace margelo::nitro::camera { enum class DeviceType; }
// Forward declaration of `CameraPosition` to properly resolve imports.
namespace margelo::nitro::camera { enum class CameraPosition; }
// Forward declaration of `HybridCameraDeviceSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridCameraDeviceSpec; }
// Forward declaration of `PixelFormat` to properly resolve imports.
namespace margelo::nitro::camera { enum class PixelFormat; }
// Forward declaration of `DynamicRange` to properly resolve imports.
namespace margelo::nitro::camera { struct DynamicRange; }
// Forward declaration of `Range` to properly resolve imports.
namespace margelo::nitro::camera { struct Range; }
// Forward declaration of `MediaType` to properly resolve imports.
namespace margelo::nitro::camera { enum class MediaType; }
// Forward declaration of `Size` to properly resolve imports.
namespace margelo::nitro::camera { struct Size; }
// Forward declaration of `OutputStreamType` to properly resolve imports.
namespace margelo::nitro::camera { enum class OutputStreamType; }
// Forward declaration of `HybridCameraOutputSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridCameraOutputSpec; }
// Forward declaration of `TargetStabilizationMode` to properly resolve imports.
namespace margelo::nitro::camera { enum class TargetStabilizationMode; }
// Forward declaration of `HybridCameraSessionConfigSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridCameraSessionConfigSpec; }

#include <string>
#include "DeviceType.hpp"
#include "CameraPosition.hpp"
#include <memory>
#include "HybridCameraDeviceSpec.hpp"
#include <vector>
#include "PixelFormat.hpp"
#include "DynamicRange.hpp"
#include "Range.hpp"
#include <optional>
#include "MediaType.hpp"
#include "Size.hpp"
#include "OutputStreamType.hpp"
#include "HybridCameraOutputSpec.hpp"
#include "TargetStabilizationMode.hpp"
#include "HybridCameraSessionConfigSpec.hpp"

namespace margelo::nitro::camera {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridCameraDeviceSpec() override = default;

    public:
      // Properties
      virtual std::string getId() = 0;
      virtual std::string getModelID() = 0;
      virtual std::string getLocalizedName() = 0;
      virtual std::string getManufacturer() = 0;
      virtual DeviceType getType() = 0;
      virtual CameraPosition getPosition() = 0;
      virtual std::vector<std::shared_ptr<HybridCameraDeviceSpec>> getPhysicalDevices() = 0;
      virtual bool getIsVirtualDevice() = 0;
      virtual std::vector<PixelFormat> getSupportedPixelFormats() = 0;
      virtual bool getSupportsPhotoHDR() = 0;
      virtual std::vector<DynamicRange> getSupportedVideoDynamicRanges() = 0;
      virtual std::vector<Range> getSupportedFPSRanges() = 0;
      virtual bool getSupportsPreviewImage() = 0;
      virtual bool getSupportsSpeedQualityPrioritization() = 0;
      virtual std::optional<double> getFocalLength() = 0;
      virtual double getLensAperture() = 0;
      virtual bool getIsContinuityCamera() = 0;
      virtual std::optional<std::shared_ptr<HybridCameraDeviceSpec>> getCompanionDeskViewCamera() = 0;
      virtual std::vector<MediaType> getMediaTypes() = 0;
      virtual bool getSupportsFocusMetering() = 0;
      virtual bool getSupportsFocusLocking() = 0;
      virtual bool getSupportsSmoothAutoFocus() = 0;
      virtual bool getSupportsExposureMetering() = 0;
      virtual bool getSupportsExposureLocking() = 0;
      virtual bool getSupportsExposureBias() = 0;
      virtual double getMinExposureBias() = 0;
      virtual double getMaxExposureBias() = 0;
      virtual bool getSupportsWhiteBalanceMetering() = 0;
      virtual double getMaxWhiteBalanceGain() = 0;
      virtual bool getSupportsWhiteBalanceLocking() = 0;
      virtual bool getHasFlash() = 0;
      virtual bool getHasTorch() = 0;
      virtual bool getSupportsTorchStrength() = 0;
      virtual double getMinTorchStrength() = 0;
      virtual double getMaxTorchStrength() = 0;
      virtual bool getSupportsLowLightBoost() = 0;
      virtual double getMinZoom() = 0;
      virtual double getMaxZoom() = 0;
      virtual std::vector<double> getZoomLensSwitchFactors() = 0;
      virtual bool getSupportsDistortionCorrection() = 0;

    public:
      // Methods
      virtual std::vector<Size> getSupportedResolutions(OutputStreamType outputStreamType) = 0;
      virtual bool supportsOutput(const std::shared_ptr<HybridCameraOutputSpec>& output) = 0;
      virtual bool supportsFPS(double fps) = 0;
      virtual bool supportsVideoStabilizationMode(TargetStabilizationMode videoStabilizationMode) = 0;
      virtual bool supportsPreviewStabilizationMode(TargetStabilizationMode previewStabilizationMode) = 0;
      virtual bool isSessionConfigSupported(const std::shared_ptr<HybridCameraSessionConfigSpec>& config) = 0;

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

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

} // namespace margelo::nitro::camera
