00001 /* 00002 Copyright (C) 2002 - 2003 the Strongroom project 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) any later version. 00008 00009 All system error messages. 00010 00011 @author Denis de Leeuw Duarte 00012 */ 00013 00014 #ifndef __ERROR_H_ 00015 #define __ERROR_H_ 00016 00017 #include <sys/types.h> 00018 00019 typedef int32_t Error; 00020 00024 enum CoreError 00025 { 00026 CORE_NO_ERROR = 0, 00027 CORE_AUTHENTICATION_ERROR, //Wrong user name or password 00028 CORE_ILLEGAL_CHARACTERS, //Illegal characters in user name and/or password 00029 CORE_PERMISSION_DENIED, //User has no permission to perform this operation. 00030 CORE_ACCESS_DENIED, //User has no permission to access this data. 00031 CORE_DOCUMENT_LOCKED, //The document is (already) locked, operation failed. 00032 CORE_FILE_LOCKED, //The file is locked, operation failed. 00033 CORE_NO_SUCH_DOCUMENT, //The document does not exist 00034 CORE_NO_SUCH_REVISION, //The revision does not exist within the document 00035 CORE_NO_SUCH_RENDITION, //The rendition does not exist within this revision 00036 CORE_NO_SUCH_USER, //User does not exist 00037 CORE_NO_SUCH_FILE, //File does not exist. 00038 CORE_MODULE_ERROR, //Critical error in one of the modules 00039 CORE_OFFLINE, //The core is not running. 00040 CORE_NOT_RUNNABLE, //The core is not ready to run. 00041 CORE_UNIMPLEMENTED, //A development module has an unimplemented feature. 00042 CORE_INVAL_PARAM, //An invalid parameter or defective object was given (for instance, a corrupt XML file). 00043 CORE_DATA_CORRUPTION //Data corruption or inconsistency detected in data storage. 00044 }; 00045 00046 enum DocumentError 00047 { 00048 DOCUMENT_NO_ERROR, 00049 DOCUMENT_NO_SUCH_REVISION, 00050 DOCUMENT_NO_SUCH_FIELD, 00051 DOCUMENT_NO_SUCH_RENDITION, 00052 DOCUMENT_XML_ERROR, 00053 DOCUMENT_NAMESPACE_ERROR 00054 }; 00055 00056 enum ConfigError 00057 { 00058 CONFIG_NO_ERROR, 00059 CONFIG_XML_ERROR, 00060 CONFIG_IO_ERROR // Couldn't load/save config file 00061 }; 00062 00063 #endif /*__ERROR_H_*/