// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from mynteye.djinni

#include "NativeDevice.hpp"  // my header
#include "Marshal.hpp"
#include "NativeAddon.hpp"
#include "NativeCapability.hpp"
#include "NativeDeviceUsbInfo.hpp"
#include "NativeExtrinsics.hpp"
#include "NativeInfo.hpp"
#include "NativeIntrinsics.hpp"
#include "NativeModel.hpp"
#include "NativeMotionData.hpp"
#include "NativeMotionIntrinsics.hpp"
#include "NativeOption.hpp"
#include "NativeOptionInfo.hpp"
#include "NativeSource.hpp"
#include "NativeStream.hpp"
#include "NativeStreamData.hpp"
#include "NativeStreamRequest.hpp"

namespace djinni_generated {

NativeDevice::NativeDevice() : ::djinni::JniInterface<::mynteye_jni::Device, NativeDevice>("com/slightech/mynteye/Device$CppProxy") {}

NativeDevice::~NativeDevice() = default;


CJNIEXPORT void JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_nativeDestroy(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        delete reinterpret_cast<::djinni::CppProxyHandle<::mynteye_jni::Device>*>(nativeRef);
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT jobject JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_create(JNIEnv* jniEnv, jobject /*this*/, ::djinni_generated::NativeDeviceUsbInfo::JniType j_info)
{
    try {
        DJINNI_FUNCTION_PROLOGUE0(jniEnv);
        auto r = ::mynteye_jni::Device::Create(::djinni_generated::NativeDeviceUsbInfo::toCpp(jniEnv, j_info));
        return ::djinni::release(::djinni_generated::NativeDevice::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT ::djinni_generated::NativeModel::JniType JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getModel(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetModel();
        return ::djinni::release(::djinni_generated::NativeModel::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jboolean JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1supportsStream(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeStream::JniType j_stream)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->SupportsStream(::djinni_generated::NativeStream::toCpp(jniEnv, j_stream));
        return ::djinni::release(::djinni::Bool::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jboolean JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1supportsCapability(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeCapability::JniType j_capabilities)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->SupportsCapability(::djinni_generated::NativeCapability::toCpp(jniEnv, j_capabilities));
        return ::djinni::release(::djinni::Bool::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jboolean JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1supportsOption(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeOption::JniType j_option)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->SupportsOption(::djinni_generated::NativeOption::toCpp(jniEnv, j_option));
        return ::djinni::release(::djinni::Bool::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jboolean JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1supportsAddon(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeAddon::JniType j_addon)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->SupportsAddon(::djinni_generated::NativeAddon::toCpp(jniEnv, j_addon));
        return ::djinni::release(::djinni::Bool::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jobject JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getStreamRequests(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetStreamRequests();
        return ::djinni::release(::djinni::List<::djinni_generated::NativeStreamRequest>::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT void JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1configStreamRequest(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeStreamRequest::JniType j_request)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        ref->ConfigStreamRequest(::djinni_generated::NativeStreamRequest::toCpp(jniEnv, j_request));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT jstring JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getInfo(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeInfo::JniType j_info)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetInfo(::djinni_generated::NativeInfo::toCpp(jniEnv, j_info));
        return ::djinni::release(::djinni::String::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT ::djinni_generated::NativeIntrinsics::JniType JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getIntrinsics(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeStream::JniType j_stream)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetIntrinsics(::djinni_generated::NativeStream::toCpp(jniEnv, j_stream));
        return ::djinni::release(::djinni_generated::NativeIntrinsics::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT ::djinni_generated::NativeExtrinsics::JniType JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getExtrinsics(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeStream::JniType j_from, ::djinni_generated::NativeStream::JniType j_to)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetExtrinsics(::djinni_generated::NativeStream::toCpp(jniEnv, j_from),
                                    ::djinni_generated::NativeStream::toCpp(jniEnv, j_to));
        return ::djinni::release(::djinni_generated::NativeExtrinsics::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT ::djinni_generated::NativeMotionIntrinsics::JniType JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getMotionIntrinsics(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetMotionIntrinsics();
        return ::djinni::release(::djinni_generated::NativeMotionIntrinsics::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT ::djinni_generated::NativeExtrinsics::JniType JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getMotionExtrinsics(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeStream::JniType j_from)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetMotionExtrinsics(::djinni_generated::NativeStream::toCpp(jniEnv, j_from));
        return ::djinni::release(::djinni_generated::NativeExtrinsics::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT ::djinni_generated::NativeOptionInfo::JniType JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getOptionInfo(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeOption::JniType j_option)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetOptionInfo(::djinni_generated::NativeOption::toCpp(jniEnv, j_option));
        return ::djinni::release(::djinni_generated::NativeOptionInfo::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jint JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getOptionValue(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeOption::JniType j_option)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetOptionValue(::djinni_generated::NativeOption::toCpp(jniEnv, j_option));
        return ::djinni::release(::djinni::I32::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT void JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1setOptionValue(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeOption::JniType j_option, jint j_value)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        ref->SetOptionValue(::djinni_generated::NativeOption::toCpp(jniEnv, j_option),
                            ::djinni::I32::toCpp(jniEnv, j_value));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT jboolean JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1runOptionAction(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeOption::JniType j_option)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->RunOptionAction(::djinni_generated::NativeOption::toCpp(jniEnv, j_option));
        return ::djinni::release(::djinni::Bool::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT void JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1start(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeSource::JniType j_source)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        ref->Start(::djinni_generated::NativeSource::toCpp(jniEnv, j_source));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT void JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1stop(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeSource::JniType j_source)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        ref->Stop(::djinni_generated::NativeSource::toCpp(jniEnv, j_source));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT void JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1waitForStreams(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        ref->WaitForStreams();
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT ::djinni_generated::NativeStreamData::JniType JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getStreamData(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeStream::JniType j_stream)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetStreamData(::djinni_generated::NativeStream::toCpp(jniEnv, j_stream));
        return ::djinni::release(::djinni_generated::NativeStreamData::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jobject JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getStreamDatas(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, ::djinni_generated::NativeStream::JniType j_stream)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetStreamDatas(::djinni_generated::NativeStream::toCpp(jniEnv, j_stream));
        return ::djinni::release(::djinni::List<::djinni_generated::NativeStreamData>::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT void JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1enableMotionDatas(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, jint j_maxSize)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        ref->EnableMotionDatas(::djinni::I32::toCpp(jniEnv, j_maxSize));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT jobject JNICALL Java_com_slightech_mynteye_Device_00024CppProxy_native_1getMotionDatas(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::mynteye_jni::Device>(nativeRef);
        auto r = ref->GetMotionDatas();
        return ::djinni::release(::djinni::List<::djinni_generated::NativeMotionData>::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

}  // namespace djinni_generated
