00001 /* 00002 * File Name: plugin_error.h 00003 */ 00004 00005 /* 00006 * This file is part of uds-plugin-common. 00007 * 00008 * uds-plugin-common is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * uds-plugin-common is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 /** 00023 * Copyright (C) 2008 iRex Technologies B.V. 00024 * All rights reserved. 00025 */ 00026 00027 #ifndef PLUGIN_ERROR_H_ 00028 #define PLUGIN_ERROR_H_ 00029 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif 00033 00034 #include "config.h" 00035 00036 /** 00037 * @brief Definition of error code for specific functions 00038 */ 00039 00040 /** 00041 * @brief PluginStatus Function return code definition 00042 */ 00043 #define GENERIC_STATUS_START 0 00044 #define RENDER_SETTINGS_STATUS_START 30 00045 00046 /// @brief Plugin status 00047 /// Please keep these entries as generic as possible, plugin specific names should be avoided. 00048 /// https://tracker.irexnet.com/view.php?id=2913 describes future improvements for the error 00049 /// handling. 00050 /// Please note when adding entries, to also update ViewCtrl::get_error_message 00051 /// @see ViewCtrl::get_error_message 00052 typedef enum 00053 { 00054 // Generic 00055 PLUGIN_OK = GENERIC_STATUS_START, 00056 PLUGIN_FAIL, 00057 PLUGIN_OUT_OF_BUFFER, 00058 PLUGIN_NOT_SUPPORTED, 00059 PLUGIN_ERROR_OPEN_FILE, 00060 PLUGIN_OUT_OF_MEMORY, 00061 PLUGIN_UNSUPPORTED_ENCODING, 00062 PLUGIN_ANCHOR_NOT_AVAILABLE, 00063 00064 // Licensing problem 00065 PLUGIN_LIC_ERROR_OPENING, // Document not licensed correctly or belongs to other user. Reported during opening of document. 00066 PLUGIN_LIC_NOT_ACTIVATED_ADOBE, // The user has not been activated yet. Reported during opening of document. 00067 PLUGIN_LIC_EXPIRED, // License for this document has expired 00068 PLUGIN_NO_LOAN_INFO_FOUND, // No loan information found. 00069 00070 PLUGIN_DOCUMENT_CORRUPT, 00071 00072 PLUGIN_PDF_PASSWORD_NEEDED, // (Adobe PDF) password needed 00073 PLUGIN_EPUB_USERNAMEPASSWORD_NEEDED, // EPUB Username/password combination needed 00074 PLUGIN_BN_EPUB_CREDITCARDINFO_NEEDED, // B&N EPUB DRM creditcard info needed 00075 PLUGIN_BN_PDB_CREDITCARDINFO_NEEDED, // B&N legacy PDB DRM creditcard info needed 00076 00077 PLUGIN_CREDENTIALS_AUTHORIZATION_FAILED, // Credential authorization failed 00078 PLUGIN_CREDENTIALS_AUTHORIZATION_PENDING, // Credentials could not be verified, UDS has to reopen the document 00079 00080 PLUGIN_CORRUPT_ACTIVATION_FILE, // (Adobe DRM) corrupt activation file, maybe tampering 00081 00082 // Render settings 00083 PLUGIN_MAX_ZOOM_ALREADY = RENDER_SETTINGS_STATUS_START, 00084 PLUGIN_MIN_ZOOM_ALREADY, 00085 } PluginStatus; 00086 00087 #ifdef __cplusplus 00088 } 00089 #endif 00090 00091 #endif 00092