00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef InstTargetError_h
00023 #define InstTargetError_h
00024
00025 #include <iosfwd>
00026
00027 #include <y2pm/PMError.h>
00028
00030
00031
00036 class InstTargetError {
00037
00038 private:
00039
00040 friend class PMError;
00041
00042 static const std::string errclass;
00043
00044 static std::string errtext( const unsigned e );
00045
00046 public:
00047
00048 enum Error {
00049 E_ok = PMError::E_ok,
00050 E_error = PMError::C_InstTargetError,
00051
00052 E_system,
00053 E_invalid_argument,
00054 E_already_initialized,
00055 E_not_initialized,
00056
00057 E_RpmDB_global_init_failed,
00058 E_RpmDB_already_open,
00059 E_RpmDB_init_failed,
00060 E_RpmDB_open_failed,
00061 E_RpmDB_convert_failed,
00062 E_RpmDB_rebuild_failed,
00063 E_RpmDB_access_blocked,
00064 E_RpmDB_not_open,
00065
00066 E_RpmDB_subprocess_failed,
00067
00068 E_SelDB_already_open,
00069 E_SelDB_open_failed,
00070 E_SelDB_not_open,
00071 E_SelDB_file_not_found,
00072 E_SelDB_file_bad_magic,
00073 E_SelDB_install_failed,
00074 E_SelDB_not_installed,
00075
00076 E_ProdDB_already_open,
00077 E_ProdDB_open_failed,
00078 E_ProdDB_not_open,
00079 E_ProdDB_file_bad_magic,
00080 E_ProdDB_install_failed,
00081 E_ProdDB_not_installed,
00082
00083 E_UpdateInf_not_found,
00084 E_UpdateInf_malformed,
00085
00086 E_user_abort
00087 };
00088
00089 friend std::ostream & operator<<( std::ostream & str, const Error & obj ) {
00090 return str << PMError( obj );
00091 }
00092 };
00093
00095
00096 #endif // InstTargetError_h
00097