2017-11-13 16:25:34 -05:00
|
|
|
#include <cassert>
|
|
|
|
#include "android/JavaVM.h"
|
|
|
|
#include "com_virtualapplications_play_Bootable.h"
|
|
|
|
|
|
|
|
using namespace com::virtualapplications::play;
|
|
|
|
|
|
|
|
void Bootable_ClassInfo::PrepareClassInfo()
|
|
|
|
{
|
|
|
|
auto env = Framework::CJavaVM::GetEnv();
|
2018-08-29 13:53:51 -04:00
|
|
|
|
2017-11-13 16:25:34 -05:00
|
|
|
jclass tmpClazz = env->FindClass("com/virtualapplications/play/Bootable");
|
|
|
|
Framework::CJavaVM::CheckException(env);
|
|
|
|
assert(tmpClazz != NULL);
|
|
|
|
clazz = reinterpret_cast<jclass>(env->NewGlobalRef(tmpClazz));
|
|
|
|
assert(clazz != NULL);
|
2018-08-29 13:53:51 -04:00
|
|
|
|
2017-11-13 16:25:34 -05:00
|
|
|
init = env->GetMethodID(clazz, "<init>", "()V");
|
|
|
|
Framework::CJavaVM::CheckException(env);
|
|
|
|
assert(init != NULL);
|
2018-08-29 13:53:51 -04:00
|
|
|
|
2017-11-13 16:25:34 -05:00
|
|
|
path = env->GetFieldID(clazz, "path", "Ljava/lang/String;");
|
|
|
|
Framework::CJavaVM::CheckException(env);
|
|
|
|
assert(path != NULL);
|
2018-08-29 13:53:51 -04:00
|
|
|
|
2017-11-13 16:25:34 -05:00
|
|
|
title = env->GetFieldID(clazz, "title", "Ljava/lang/String;");
|
|
|
|
Framework::CJavaVM::CheckException(env);
|
|
|
|
assert(title != NULL);
|
2018-08-29 13:53:51 -04:00
|
|
|
|
2017-11-30 11:29:13 -05:00
|
|
|
coverUrl = env->GetFieldID(clazz, "coverUrl", "Ljava/lang/String;");
|
|
|
|
Framework::CJavaVM::CheckException(env);
|
|
|
|
assert(coverUrl != NULL);
|
2019-01-05 23:56:19 +00:00
|
|
|
|
|
|
|
discId = env->GetFieldID(clazz, "discId", "Ljava/lang/String;");
|
|
|
|
Framework::CJavaVM::CheckException(env);
|
|
|
|
assert(discId != NULL);
|
|
|
|
|
|
|
|
overview = env->GetFieldID(clazz, "overview", "Ljava/lang/String;");
|
|
|
|
Framework::CJavaVM::CheckException(env);
|
|
|
|
assert(overview != NULL);
|
2017-11-13 16:25:34 -05:00
|
|
|
}
|