mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
synchronization with native branch
This commit is contained in:
parent
b9e9dda107
commit
925975f7e3
3 changed files with 14 additions and 4 deletions
|
@ -23,14 +23,15 @@
|
|||
|
||||
#include <AndroidUtil.h>
|
||||
|
||||
#include "fbreader/src/formats/FormatPlugin.h"
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jobjectArray JNICALL Java_org_geometerplus_fbreader_formats_PluginCollection_nativePlugins(JNIEnv* env, jobject thiz) {
|
||||
//const std::vector<shared_ptr<FormatPlugin> > plugins = PluginCollection::Instance().plugins();
|
||||
const size_t size = 0;//plugins.size();
|
||||
const std::vector<shared_ptr<FormatPlugin> > plugins = PluginCollection::Instance().plugins();
|
||||
const size_t size = plugins.size();
|
||||
jclass cls = env->FindClass(AndroidUtil::Class_NativeFormatPlugin);
|
||||
jobjectArray javaPlugins = env->NewObjectArray(size, cls, 0);
|
||||
|
||||
/*
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
jstring fileType = AndroidUtil::createJavaString(env, plugins[i]->supportedFileType());
|
||||
env->SetObjectArrayElement(
|
||||
|
@ -38,7 +39,6 @@ JNIEXPORT jobjectArray JNICALL Java_org_geometerplus_fbreader_formats_PluginColl
|
|||
env->NewObject(cls, AndroidUtil::MID_NativeFormatPlugin_init, fileType)
|
||||
);
|
||||
}
|
||||
*/
|
||||
return javaPlugins;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue