00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef InstSrcError_h
00023 #define InstSrcError_h
00024
00025 #include <iosfwd>
00026
00027 #include <y2pm/PMError.h>
00028
00030
00031
00036 class InstSrcError {
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_InstSrcError,
00051
00052 E_TBD,
00053
00054 E_cache_dir_exists,
00055 E_cache_dir_create,
00056 E_bad_cache_dir,
00057 E_bad_cache_descr,
00058 E_open_file,
00059 E_create_file,
00060 E_write_file,
00061 E_no_media,
00062 E_cancel_media,
00063 E_skip_media,
00064
00065 E_bad_url,
00066 E_no_instsrc_on_media,
00067 E_no_instsrcdata_on_media,
00068 E_src_no_description,
00069 E_src_already_enabled,
00070 E_src_not_enabled,
00071 E_src_cache_disabled,
00072
00073 E_bad_id,
00074 E_isrc_cache_invalid,
00075 E_isrc_cache_duplicate,
00076
00077 E_data_bad_packages,
00078 E_data_bad_packages_lang,
00079 E_data_bad_packages_du,
00080 E_data_bad_selection,
00081
00082 E_no_source,
00083 E_corupted_file
00084 };
00085
00086 friend std::ostream & operator<<( std::ostream & str, const Error & obj ) {
00087 return str << PMError( obj );
00088 }
00089 };
00090
00092
00093 #endif // InstSrcError_h