diff --git a/jni/NativeFormats/util/AndroidUtil.cpp b/jni/NativeFormats/util/AndroidUtil.cpp index 9235b2ce1..a1bc25965 100644 --- a/jni/NativeFormats/util/AndroidUtil.cpp +++ b/jni/NativeFormats/util/AndroidUtil.cpp @@ -36,6 +36,7 @@ JavaClass AndroidUtil::Class_java_io_InputStream("java/io/InputStream"); JavaClass AndroidUtil::Class_ZLibrary("org/geometerplus/zlibrary/core/library/ZLibrary"); JavaClass AndroidUtil::Class_ZLFile("org/geometerplus/zlibrary/core/filesystem/ZLFile"); +JavaClass AndroidUtil::Class_FileEncryptionInfo("org/geometerplus/zlibrary/core/enryption/FileEncryptionInfo"); JavaClass AndroidUtil::Class_ZLFileImage("org/geometerplus/zlibrary/core/image/ZLFileImage"); JavaClass AndroidUtil::Class_ZLTextModel("org/geometerplus/zlibrary/text/model/ZLTextModel"); JavaClass AndroidUtil::Class_CachedCharStorageException("org/geometerplus/zlibrary/text/model/CachedCharStorageException"); @@ -93,6 +94,8 @@ shared_ptr AndroidUtil::Method_ZLFile_getPath; shared_ptr AndroidUtil::Method_ZLFile_isDirectory; shared_ptr AndroidUtil::Method_ZLFile_size; +shared_ptr AndroidUtil::Constructor_FileEncryptionInfo; + shared_ptr AndroidUtil::Constructor_ZLFileImage; shared_ptr AndroidUtil::StaticMethod_Paths_cacheDirectory; @@ -172,6 +175,8 @@ bool AndroidUtil::init(JavaVM* jvm) { Method_ZLFile_getPath = new StringMethod(Class_ZLFile, "getPath", "()"); Method_ZLFile_size = new LongMethod(Class_ZLFile, "size", "()"); + Constructor_FileEncryptionInfo = new Constructor(Class_FileEncryptionInfo, "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + Constructor_ZLFileImage = new Constructor(Class_ZLFileImage, "(Ljava/lang/String;Lorg/geometerplus/zlibrary/core/filesystem/ZLFile;Ljava/lang/String;[I[I)V"); StaticMethod_Paths_cacheDirectory = new StaticObjectMethod(Class_Paths, "cacheDirectory", Class_java_lang_String, "()"); diff --git a/jni/NativeFormats/util/AndroidUtil.h b/jni/NativeFormats/util/AndroidUtil.h index ae6c9e742..773b4a8e7 100644 --- a/jni/NativeFormats/util/AndroidUtil.h +++ b/jni/NativeFormats/util/AndroidUtil.h @@ -59,6 +59,7 @@ public: static JavaClass Class_java_io_InputStream; static JavaClass Class_ZLibrary; static JavaClass Class_ZLFile; + static JavaClass Class_FileEncryptionInfo; static JavaClass Class_ZLFileImage; static JavaClass Class_ZLTextModel; static JavaClass Class_CachedCharStorageException; @@ -99,6 +100,8 @@ public: static shared_ptr Method_ZLFile_isDirectory; static shared_ptr Method_ZLFile_size; + static shared_ptr Constructor_FileEncryptionInfo; + static shared_ptr Constructor_ZLFileImage; static shared_ptr StaticMethod_NativeFormatPlugin_create; diff --git a/src/org/geometerplus/zlibrary/core/encryption/FileEncryptionInfo.java b/src/org/geometerplus/zlibrary/core/encryption/FileEncryptionInfo.java new file mode 100644 index 000000000..6e3a0b881 --- /dev/null +++ b/src/org/geometerplus/zlibrary/core/encryption/FileEncryptionInfo.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2007-2014 Geometer Plus + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +package org.geometerplus.zlibrary.core.encryption; + +public class FileEncryptionInfo { + public final String Uri; + public final String Method; + public final String Algorithm; + public final String ContentId; + + public FileEncryptionInfo(String uri, String method, String algorithm, String contentId) { + Uri = uri; + Method = method; + Algorithm = algorithm; + ContentId = contentId; + } +}