#include <jni.h>
#include <string>
#include<android/log.h>

#include "inc/mgsasl/mgs_main.h"

#define TAG    "JEDGE" // 这个是自定义的LOG的标识
#define LOGD(...)  __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) // 定义LOGD类型

extern "C" JNIEXPORT void JNICALL
Java_com_ch_jedge_demo_glm_service_MgsService_handleStartService (
        JNIEnv* env,
        jobject /* this */, jstring dir , jstring dir_cache) {
    const char* local_dir, *local_dir_cache;
    local_dir = env->GetStringUTFChars(dir, JNI_FALSE);
    local_dir_cache = env->GetStringUTFChars(dir_cache, JNI_FALSE);
    LOGD("local_dir is %s, local_dir_cache is %s\n",local_dir, local_dir_cache);
    LOGD("go to mgsasl_main\n");
    mgsasl_main(local_dir, local_dir_cache);
}
