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

#include "JHybridVideoPlayerSourceFactorySpec.hpp"

// Forward declaration of `HybridVideoPlayerSourceSpec` to properly resolve imports.
namespace margelo::nitro::video { class HybridVideoPlayerSourceSpec; }
// Forward declaration of `NativeVideoConfig` to properly resolve imports.
namespace margelo::nitro::video { struct NativeVideoConfig; }
// Forward declaration of `NativeExternalSubtitle` to properly resolve imports.
namespace margelo::nitro::video { struct NativeExternalSubtitle; }
// Forward declaration of `SubtitleType` to properly resolve imports.
namespace margelo::nitro::video { enum class SubtitleType; }
// Forward declaration of `NativeDrmParams` to properly resolve imports.
namespace margelo::nitro::video { struct NativeDrmParams; }
// Forward declaration of `OnGetLicensePayload` to properly resolve imports.
namespace margelo::nitro::video { struct OnGetLicensePayload; }
// Forward declaration of `BufferConfig` to properly resolve imports.
namespace margelo::nitro::video { struct BufferConfig; }
// Forward declaration of `LivePlaybackParams` to properly resolve imports.
namespace margelo::nitro::video { struct LivePlaybackParams; }
// Forward declaration of `Resolution` to properly resolve imports.
namespace margelo::nitro::video { struct Resolution; }

#include <memory>
#include "HybridVideoPlayerSourceSpec.hpp"
#include "JHybridVideoPlayerSourceSpec.hpp"
#include <string>
#include "NativeVideoConfig.hpp"
#include "JNativeVideoConfig.hpp"
#include "NativeExternalSubtitle.hpp"
#include <vector>
#include <optional>
#include "JNativeExternalSubtitle.hpp"
#include "SubtitleType.hpp"
#include "JSubtitleType.hpp"
#include "NativeDrmParams.hpp"
#include "JNativeDrmParams.hpp"
#include <unordered_map>
#include <NitroModules/Promise.hpp>
#include "OnGetLicensePayload.hpp"
#include <functional>
#include "JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.hpp"
#include <NitroModules/JPromise.hpp>
#include "JOnGetLicensePayload.hpp"
#include "BufferConfig.hpp"
#include "JBufferConfig.hpp"
#include "LivePlaybackParams.hpp"
#include "JLivePlaybackParams.hpp"
#include "Resolution.hpp"
#include "JResolution.hpp"

namespace margelo::nitro::video {

  jni::local_ref<JHybridVideoPlayerSourceFactorySpec::jhybriddata> JHybridVideoPlayerSourceFactorySpec::initHybrid(jni::alias_ref<jhybridobject> jThis) {
    return makeCxxInstance(jThis);
  }

  void JHybridVideoPlayerSourceFactorySpec::registerNatives() {
    registerHybrid({
      makeNativeMethod("initHybrid", JHybridVideoPlayerSourceFactorySpec::initHybrid),
    });
  }

  size_t JHybridVideoPlayerSourceFactorySpec::getExternalMemorySize() noexcept {
    static const auto method = javaClassStatic()->getMethod<jlong()>("getMemorySize");
    return method(_javaPart);
  }

  void JHybridVideoPlayerSourceFactorySpec::dispose() noexcept {
    static const auto method = javaClassStatic()->getMethod<void()>("dispose");
    method(_javaPart);
  }

  // Properties
  

  // Methods
  std::shared_ptr<HybridVideoPlayerSourceSpec> JHybridVideoPlayerSourceFactorySpec::fromUri(const std::string& uri) {
    static const auto method = javaClassStatic()->getMethod<jni::local_ref<JHybridVideoPlayerSourceSpec::javaobject>(jni::alias_ref<jni::JString> /* uri */)>("fromUri");
    auto __result = method(_javaPart, jni::make_jstring(uri));
    return __result->cthis()->shared_cast<JHybridVideoPlayerSourceSpec>();
  }
  std::shared_ptr<HybridVideoPlayerSourceSpec> JHybridVideoPlayerSourceFactorySpec::fromVideoConfig(const NativeVideoConfig& config) {
    static const auto method = javaClassStatic()->getMethod<jni::local_ref<JHybridVideoPlayerSourceSpec::javaobject>(jni::alias_ref<JNativeVideoConfig> /* config */)>("fromVideoConfig");
    auto __result = method(_javaPart, JNativeVideoConfig::fromCpp(config));
    return __result->cthis()->shared_cast<JHybridVideoPlayerSourceSpec>();
  }

} // namespace margelo::nitro::video
