mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
some more proto support for files encryption
This commit is contained in:
parent
87423183dd
commit
c2b41adb38
3 changed files with 42 additions and 0 deletions
|
@ -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<StringMethod> AndroidUtil::Method_ZLFile_getPath;
|
|||
shared_ptr<BooleanMethod> AndroidUtil::Method_ZLFile_isDirectory;
|
||||
shared_ptr<LongMethod> AndroidUtil::Method_ZLFile_size;
|
||||
|
||||
shared_ptr<Constructor> AndroidUtil::Constructor_FileEncryptionInfo;
|
||||
|
||||
shared_ptr<Constructor> AndroidUtil::Constructor_ZLFileImage;
|
||||
|
||||
shared_ptr<StaticObjectMethod> 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, "()");
|
||||
|
|
|
@ -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<BooleanMethod> Method_ZLFile_isDirectory;
|
||||
static shared_ptr<LongMethod> Method_ZLFile_size;
|
||||
|
||||
static shared_ptr<Constructor> Constructor_FileEncryptionInfo;
|
||||
|
||||
static shared_ptr<Constructor> Constructor_ZLFileImage;
|
||||
|
||||
static shared_ptr<StaticObjectMethod> StaticMethod_NativeFormatPlugin_create;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2014 Geometer Plus <contact@geometerplus.com>
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue