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

#include "NativeMotionData.hpp"  // my header
#include "NativeImuData.hpp"

namespace djinni_generated {

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

NativeMotionData::~NativeMotionData() = default;


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

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

}  // namespace djinni_generated
