Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

InstSrcError.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       InstSrcError.h
00014 
00015   Author:     Michael Andres <ma@suse.de>
00016   Maintainer: Michael Andres <ma@suse.de>
00017 
00018   Purpose: Definition of "InstSrc" error values.
00019 
00020 /-*/
00021 
00022 #ifndef InstSrcError_h
00023 #define InstSrcError_h
00024 
00025 #include <iosfwd>
00026 
00027 #include <y2pm/PMError.h>
00028 
00030 //
00031 //      CLASS NAME : InstSrcError
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,                  // no error
00050       E_error = PMError::C_InstSrcError,        // some error
00051       // more specific errors start here:
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,           // media change: user wants to cancel installation
00063       E_skip_media,             // media change: user wants to skip this media
00064       // InstSrc creation
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       // InstSrcMgr
00073       E_bad_id,
00074       E_isrc_cache_invalid,
00075       E_isrc_cache_duplicate,
00076       // InstSrcData
00077       E_data_bad_packages,
00078       E_data_bad_packages_lang,
00079       E_data_bad_packages_du,
00080       E_data_bad_selection,
00081       // DataProvider
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

Generated on Fri Nov 9 14:30:31 2007 for yast2-packagemanager by doxygen 1.3.6