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

#include "NativeInterfaceUsingExtendedRecord.hpp"  // my header
#include "NativeExtendedRecord.hpp"
#include "NativeRecordUsingExtendedRecord.hpp"

namespace djinni_generated {

NativeInterfaceUsingExtendedRecord::NativeInterfaceUsingExtendedRecord() : ::djinni::JniInterface<::testsuite::InterfaceUsingExtendedRecord, NativeInterfaceUsingExtendedRecord>("com/dropbox/djinni/test/InterfaceUsingExtendedRecord$CppProxy") {}

NativeInterfaceUsingExtendedRecord::~NativeInterfaceUsingExtendedRecord() = default;


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

CJNIEXPORT jobject JNICALL Java_com_dropbox_djinni_test_InterfaceUsingExtendedRecord_00024CppProxy_native_1meth(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef, jobject j_er)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::testsuite::InterfaceUsingExtendedRecord>(nativeRef);
        auto r = ref->meth(::djinni_generated::NativeExtendedRecord::toCpp(jniEnv, j_er));
        return ::djinni::release(::djinni_generated::NativeExtendedRecord::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

}  // namespace djinni_generated
