1
0
Fork 0
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:
Nikolay Pultsin 2014-04-06 10:47:41 +01:00
parent cb08c3bc3c
commit d0305d5733
4 changed files with 9 additions and 8 deletions

View file

@ -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";

View file

@ -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;

View file

@ -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;
} }

View file

@ -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;
}
} }