///
/// HybridNativeDfuNitroSpec.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 `DfuOptions` to properly resolve imports.
namespace margelo::nitro::co::zyke::dfu { struct DfuOptions; }
// Forward declaration of `DfuState` to properly resolve imports.
namespace margelo::nitro::co::zyke::dfu { enum class DfuState; }
// Forward declaration of `DfuError` to properly resolve imports.
namespace margelo::nitro::co::zyke::dfu { enum class DfuError; }

#include "DfuOptions.hpp"
#include "DfuState.hpp"
#include <functional>
#include "DfuError.hpp"
#include <string>

namespace margelo::nitro::co::zyke::dfu {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridNativeDfuNitroSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual void startDfu(const DfuOptions& options, const std::function<void(DfuState /* state */)>& stateCallback, const std::function<void(double /* part */, double /* totalParts */, double /* progress */, double /* currentSpeed */, double /* avgSpeed */)>& progressCallback, const std::function<void(DfuError /* error */, const std::string& /* message */)>& errorCallback) = 0;
      virtual void pauseDfu() = 0;
      virtual void resumeDfu() = 0;
      virtual void abortDfu() = 0;

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

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

} // namespace margelo::nitro::co::zyke::dfu
