mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
EncryptionMethod.NONE constant has gone
This commit is contained in:
parent
cb08c3bc3c
commit
d0305d5733
4 changed files with 9 additions and 8 deletions
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
#include "FileEncryptionInfo.h"
|
#include "FileEncryptionInfo.h"
|
||||||
|
|
||||||
const std::string EncryptionMethod::NONE = "none";
|
|
||||||
const std::string EncryptionMethod::UNSUPPORTED = "unsupported";
|
const std::string EncryptionMethod::UNSUPPORTED = "unsupported";
|
||||||
const std::string EncryptionMethod::EMBEDDING = "embedding";
|
const std::string EncryptionMethod::EMBEDDING = "embedding";
|
||||||
const std::string EncryptionMethod::MARLIN = "marlin";
|
const std::string EncryptionMethod::MARLIN = "marlin";
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
class EncryptionMethod {
|
class EncryptionMethod {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const std::string NONE;
|
|
||||||
static const std::string UNSUPPORTED;
|
static const std::string UNSUPPORTED;
|
||||||
static const std::string EMBEDDING;
|
static const std::string EMBEDDING;
|
||||||
static const std::string MARLIN;
|
static const std::string MARLIN;
|
||||||
|
|
|
@ -284,7 +284,7 @@ public final class FBReaderApp extends ZLApplication {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (FileEncryptionInfo info : book.getPlugin().readEncryptionInfos(book)) {
|
for (FileEncryptionInfo info : book.getPlugin().readEncryptionInfos(book)) {
|
||||||
if (!EncryptionMethod.NONE.equals(info.Method)) {
|
if (info != null && !EncryptionMethod.isSupported(info.Method)) {
|
||||||
showErrorMessage("unsupportedEncryptionMethod", book.File.getPath());
|
showErrorMessage("unsupportedEncryptionMethod", book.File.getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,12 @@
|
||||||
|
|
||||||
package org.geometerplus.zlibrary.core.drm;
|
package org.geometerplus.zlibrary.core.drm;
|
||||||
|
|
||||||
public interface EncryptionMethod {
|
public abstract class EncryptionMethod {
|
||||||
String NONE = "none";
|
public static final String UNSUPPORTED = "unsupported";
|
||||||
String UNSUPPORTED = "unsupported";
|
public static final String EMBEDDING = "embedding";
|
||||||
String EMBEDDING = "embedding";
|
public static final String MARLIN = "marlin";
|
||||||
String MARLIN = "marlin";
|
|
||||||
|
public static boolean isSupported(String method) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue