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

#include "NativeListenerCaller.hpp"  // my header
#include "NativeFirstListener.hpp"
#include "NativeSecondListener.hpp"

namespace djinni_generated {

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

NativeListenerCaller::~NativeListenerCaller() = default;


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

CJNIEXPORT jobject JNICALL Java_com_dropbox_djinni_test_ListenerCaller_init(JNIEnv* jniEnv, jobject /*this*/, jobject j_firstL, jobject j_secondL)
{
    try {
        DJINNI_FUNCTION_PROLOGUE0(jniEnv);
        auto r = ::testsuite::ListenerCaller::init(::djinni_generated::NativeFirstListener::toCpp(jniEnv, j_firstL),
                                                   ::djinni_generated::NativeSecondListener::toCpp(jniEnv, j_secondL));
        return ::djinni::release(::djinni_generated::NativeListenerCaller::fromCpp(jniEnv, r));
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_ListenerCaller_00024CppProxy_native_1callFirst(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::testsuite::ListenerCaller>(nativeRef);
        ref->callFirst();
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_ListenerCaller_00024CppProxy_native_1callSecond(JNIEnv* jniEnv, jobject /*this*/, jlong nativeRef)
{
    try {
        DJINNI_FUNCTION_PROLOGUE1(jniEnv, nativeRef);
        const auto& ref = ::djinni::objectFromHandleAddress<::testsuite::ListenerCaller>(nativeRef);
        ref->callSecond();
    } JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, )
}

}  // namespace djinni_generated
