mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-05 05:36:17 +00:00
189 lines
12 KiB
C++
Generated
189 lines
12 KiB
C++
Generated
///
|
|
/// JHybridOmniEventMapSpec.cpp
|
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
/// https://github.com/mrousavy/nitro
|
|
/// Copyright © Marc Rousavy @ Margelo
|
|
///
|
|
|
|
#include "JHybridOmniEventMapSpec.hpp"
|
|
|
|
// Forward declaration of `NumberProperty` to properly resolve imports.
|
|
namespace margelo::nitro::omni { enum class NumberProperty; }
|
|
// Forward declaration of `BoolProperty` to properly resolve imports.
|
|
namespace margelo::nitro::omni { enum class BoolProperty; }
|
|
// Forward declaration of `PlayerStatus` to properly resolve imports.
|
|
namespace margelo::nitro::omni { enum class PlayerStatus; }
|
|
// Forward declaration of `CastStatus` to properly resolve imports.
|
|
namespace margelo::nitro::omni { enum class CastStatus; }
|
|
// Forward declaration of `Track` to properly resolve imports.
|
|
namespace margelo::nitro::omni { struct Track; }
|
|
// Forward declaration of `Rendition` to properly resolve imports.
|
|
namespace margelo::nitro::omni { struct Rendition; }
|
|
|
|
#include "NumberProperty.hpp"
|
|
#include "JNumberProperty.hpp"
|
|
#include <functional>
|
|
#include "JFunc_void_double.hpp"
|
|
#include <NitroModules/JNICallable.hpp>
|
|
#include "BoolProperty.hpp"
|
|
#include "JBoolProperty.hpp"
|
|
#include "JFunc_void_bool.hpp"
|
|
#include "PlayerStatus.hpp"
|
|
#include "JFunc_void_PlayerStatus.hpp"
|
|
#include "JPlayerStatus.hpp"
|
|
#include "CastStatus.hpp"
|
|
#include "JFunc_void_CastStatus.hpp"
|
|
#include "JCastStatus.hpp"
|
|
#include "JFunc_void.hpp"
|
|
#include <string>
|
|
#include "JFunc_void_std__string_std__string.hpp"
|
|
#include "JFunc_void_std__string.hpp"
|
|
#include "Track.hpp"
|
|
#include "JFunc_void_Track.hpp"
|
|
#include "JTrack.hpp"
|
|
#include <optional>
|
|
#include "JFunc_void_std__optional_Track_.hpp"
|
|
#include "Rendition.hpp"
|
|
#include "JFunc_void_Rendition.hpp"
|
|
#include "JRendition.hpp"
|
|
|
|
namespace margelo::nitro::omni {
|
|
|
|
std::shared_ptr<JHybridOmniEventMapSpec> JHybridOmniEventMapSpec::JavaPart::getJHybridOmniEventMapSpec() {
|
|
auto hybridObject = JHybridObject::JavaPart::getJHybridObject();
|
|
auto castHybridObject = std::dynamic_pointer_cast<JHybridOmniEventMapSpec>(hybridObject);
|
|
if (castHybridObject == nullptr) [[unlikely]] {
|
|
throw std::runtime_error("Failed to downcast JHybridObject to JHybridOmniEventMapSpec!");
|
|
}
|
|
return castHybridObject;
|
|
}
|
|
|
|
jni::local_ref<JHybridOmniEventMapSpec::CxxPart::jhybriddata> JHybridOmniEventMapSpec::CxxPart::initHybrid(jni::alias_ref<jhybridobject> jThis) {
|
|
return makeCxxInstance(jThis);
|
|
}
|
|
|
|
std::shared_ptr<JHybridObject> JHybridOmniEventMapSpec::CxxPart::createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) {
|
|
auto castJavaPart = jni::dynamic_ref_cast<JHybridOmniEventMapSpec::JavaPart>(javaPart);
|
|
if (castJavaPart == nullptr) [[unlikely]] {
|
|
throw std::runtime_error("Failed to cast JHybridObject::JavaPart to JHybridOmniEventMapSpec::JavaPart!");
|
|
}
|
|
return std::make_shared<JHybridOmniEventMapSpec>(castJavaPart);
|
|
}
|
|
|
|
void JHybridOmniEventMapSpec::CxxPart::registerNatives() {
|
|
registerHybrid({
|
|
makeNativeMethod("initHybrid", JHybridOmniEventMapSpec::CxxPart::initHybrid),
|
|
});
|
|
}
|
|
|
|
// Properties
|
|
|
|
|
|
// Methods
|
|
void JHybridOmniEventMapSpec::addStateListener(NumberProperty key, const std::function<void(double /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNumberProperty> /* key */, jni::alias_ref<JFunc_void_double::javaobject> /* cb */)>("addStateListener_cxx");
|
|
method(_javaPart, JNumberProperty::fromCpp(key), JFunc_void_double_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeStateListener(NumberProperty key, const std::function<void(double /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNumberProperty> /* key */, jni::alias_ref<JFunc_void_double::javaobject> /* cb */)>("removeStateListener_cxx");
|
|
method(_javaPart, JNumberProperty::fromCpp(key), JFunc_void_double_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addStateBoolListener(BoolProperty key, const std::function<void(bool /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JBoolProperty> /* key */, jni::alias_ref<JFunc_void_bool::javaobject> /* cb */)>("addStateBoolListener_cxx");
|
|
method(_javaPart, JBoolProperty::fromCpp(key), JFunc_void_bool_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeStateBoolListener(BoolProperty key, const std::function<void(bool /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JBoolProperty> /* key */, jni::alias_ref<JFunc_void_bool::javaobject> /* cb */)>("removeStateBoolListener_cxx");
|
|
method(_javaPart, JBoolProperty::fromCpp(key), JFunc_void_bool_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addPlayerStatusListener(const std::function<void(PlayerStatus /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_PlayerStatus::javaobject> /* cb */)>("addPlayerStatusListener_cxx");
|
|
method(_javaPart, JFunc_void_PlayerStatus_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removePlayerStatusListener(const std::function<void(PlayerStatus /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_PlayerStatus::javaobject> /* cb */)>("removePlayerStatusListener_cxx");
|
|
method(_javaPart, JFunc_void_PlayerStatus_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addCastStatusListener(const std::function<void(CastStatus /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_CastStatus::javaobject> /* cb */)>("addCastStatusListener_cxx");
|
|
method(_javaPart, JFunc_void_CastStatus_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeCastStatusListener(const std::function<void(CastStatus /* value */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_CastStatus::javaobject> /* cb */)>("removeCastStatusListener_cxx");
|
|
method(_javaPart, JFunc_void_CastStatus_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnEndListener(const std::function<void()>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void::javaobject> /* cb */)>("addOnEndListener_cxx");
|
|
method(_javaPart, JFunc_void_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnEndListener(const std::function<void()>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void::javaobject> /* cb */)>("removeOnEndListener_cxx");
|
|
method(_javaPart, JFunc_void_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnPrevListener(const std::function<void()>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void::javaobject> /* cb */)>("addOnPrevListener_cxx");
|
|
method(_javaPart, JFunc_void_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnPrevListener(const std::function<void()>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void::javaobject> /* cb */)>("removeOnPrevListener_cxx");
|
|
method(_javaPart, JFunc_void_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnNextListener(const std::function<void()>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void::javaobject> /* cb */)>("addOnNextListener_cxx");
|
|
method(_javaPart, JFunc_void_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnNextListener(const std::function<void()>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void::javaobject> /* cb */)>("removeOnNextListener_cxx");
|
|
method(_javaPart, JFunc_void_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnErrorListener(const std::function<void(const std::string& /* type */, const std::string& /* message */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__string_std__string::javaobject> /* cb */)>("addOnErrorListener_cxx");
|
|
method(_javaPart, JFunc_void_std__string_std__string_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnErrorListener(const std::function<void(const std::string& /* type */, const std::string& /* message */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__string_std__string::javaobject> /* cb */)>("removeOnErrorListener_cxx");
|
|
method(_javaPart, JFunc_void_std__string_std__string_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnAudioFocusChangeListener(const std::function<void(const std::string& /* status */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__string::javaobject> /* cb */)>("addOnAudioFocusChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_std__string_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnAudioFocusChangeListener(const std::function<void(const std::string& /* status */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__string::javaobject> /* cb */)>("removeOnAudioFocusChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_std__string_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnVideoTrackChangeListener(const std::function<void(const Track& /* track */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_Track::javaobject> /* cb */)>("addOnVideoTrackChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_Track_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnVideoTrackChangeListener(const std::function<void(const Track& /* track */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_Track::javaobject> /* cb */)>("removeOnVideoTrackChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_Track_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnAudioTrackChangeListener(const std::function<void(const Track& /* track */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_Track::javaobject> /* cb */)>("addOnAudioTrackChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_Track_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnAudioTrackChangeListener(const std::function<void(const Track& /* track */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_Track::javaobject> /* cb */)>("removeOnAudioTrackChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_Track_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnSubtitleChangeListener(const std::function<void(const std::optional<Track>& /* track */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_Track_::javaobject> /* cb */)>("addOnSubtitleChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_std__optional_Track__cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnSubtitleChangeListener(const std::function<void(const std::optional<Track>& /* track */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_Track_::javaobject> /* cb */)>("removeOnSubtitleChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_std__optional_Track__cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::addOnRenditionChangeListener(const std::function<void(const Rendition& /* rendition */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_Rendition::javaobject> /* cb */)>("addOnRenditionChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_Rendition_cxx::fromCpp(cb));
|
|
}
|
|
void JHybridOmniEventMapSpec::removeOnRenditionChangeListener(const std::function<void(const Rendition& /* rendition */)>& cb) {
|
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_Rendition::javaobject> /* cb */)>("removeOnRenditionChangeListener_cxx");
|
|
method(_javaPart, JFunc_void_Rendition_cxx::fromCpp(cb));
|
|
}
|
|
|
|
} // namespace margelo::nitro::omni
|