///
/// HybridTorSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2025 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 `TorConfig` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct TorConfig; }
// Forward declaration of `HiddenServiceResponse` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct HiddenServiceResponse; }
// Forward declaration of `HiddenServiceParams` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct HiddenServiceParams; }
// Forward declaration of `StartTorResponse` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct StartTorResponse; }
// Forward declaration of `StartTorParams` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct StartTorParams; }
// Forward declaration of `HttpResponse` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct HttpResponse; }
// Forward declaration of `HttpGetParams` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct HttpGetParams; }
// Forward declaration of `HttpPostParams` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct HttpPostParams; }
// Forward declaration of `HttpPutParams` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct HttpPutParams; }
// Forward declaration of `HttpDeleteParams` to properly resolve imports.
namespace margelo::nitro::nitrotor { struct HttpDeleteParams; }

#include <NitroModules/Promise.hpp>
#include "TorConfig.hpp"
#include "HiddenServiceResponse.hpp"
#include "HiddenServiceParams.hpp"
#include "StartTorResponse.hpp"
#include "StartTorParams.hpp"
#include <string>
#include "HttpResponse.hpp"
#include "HttpGetParams.hpp"
#include "HttpPostParams.hpp"
#include "HttpPutParams.hpp"
#include "HttpDeleteParams.hpp"

namespace margelo::nitro::nitrotor {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridTorSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual std::shared_ptr<Promise<bool>> initTorService(const TorConfig& config) = 0;
      virtual std::shared_ptr<Promise<HiddenServiceResponse>> createHiddenService(const HiddenServiceParams& params) = 0;
      virtual std::shared_ptr<Promise<StartTorResponse>> startTorIfNotRunning(const StartTorParams& params) = 0;
      virtual std::shared_ptr<Promise<double>> getServiceStatus() = 0;
      virtual std::shared_ptr<Promise<bool>> deleteHiddenService(const std::string& onionAddress) = 0;
      virtual std::shared_ptr<Promise<bool>> shutdownService() = 0;
      virtual std::shared_ptr<Promise<HttpResponse>> httpGet(const HttpGetParams& params) = 0;
      virtual std::shared_ptr<Promise<HttpResponse>> httpPost(const HttpPostParams& params) = 0;
      virtual std::shared_ptr<Promise<HttpResponse>> httpPut(const HttpPutParams& params) = 0;
      virtual std::shared_ptr<Promise<HttpResponse>> httpDelete(const HttpDeleteParams& params) = 0;

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

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

} // namespace margelo::nitro::nitrotor
