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"
const std::string EncryptionMethod::NONE = "none";
const std::string EncryptionMethod::UNSUPPORTED = "unsupported";
const std::string EncryptionMethod::EMBEDDING = "embedding";
const std::string EncryptionMethod::MARLIN = "marlin";

View file

@ -29,7 +29,6 @@
class EncryptionMethod {
public:
static const std::string NONE;
static const std::string UNSUPPORTED;
static const std::string EMBEDDING;
static const std::string MARLIN;

View file

@ -284,7 +284,7 @@ public final class FBReaderApp extends ZLApplication {
try {
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());
break;
}

View file

@ -19,9 +19,12 @@
package org.geometerplus.zlibrary.core.drm;
public interface EncryptionMethod {
String NONE = "none";
String UNSUPPORTED = "unsupported";
String EMBEDDING = "embedding";
String MARLIN = "marlin";
public abstract class EncryptionMethod {
public static final String UNSUPPORTED = "unsupported";
public static final String EMBEDDING = "embedding";
public static final String MARLIN = "marlin";
public static boolean isSupported(String method) {
return false;
}
}