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

MediaError.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:       MediaError.h
00014 
00015   Author:     Michael Andres <ma@suse.de>
00016   Maintainer: Michael Andres <ma@suse.de>
00017 
00018   Purpose: Definition of "Media" error values.
00019 
00020 /-*/
00021 #ifndef MediaError_h
00022 #define MediaError_h
00023 
00024 #include <iosfwd>
00025 
00026 #include <y2pm/PMError.h>
00027 
00029 //
00030 //      CLASS NAME : MediaError
00035 class MediaError {
00036 
00037   private:
00038 
00039     friend class PMError;
00040 
00041     static const std::string errclass;
00042 
00043     static std::string errtext( const unsigned e );
00044 
00045   public:
00046 
00047     enum Error {
00048       E_ok    = PMError::E_ok,          // no error
00049       E_error = PMError::C_MediaError,  // some error
00050       // more specific errors start here:
00051       E_system,         // see errno
00052       E_not_a_directory,
00053       E_not_a_file,
00054       E_no_access,
00055       E_no_permission,
00056       E_no_space,
00057       E_bad_url,
00058       E_bad_media_type,
00059       E_bad_filename,
00060       E_already_attached,
00061       E_not_attached,
00062       E_bad_attachpoint,
00063       E_not_open,
00064       E_no_destination,
00065       E_no_source,
00066       E_invalid_device,
00067       E_invalid_filesystem,
00068       E_no_host_specified,
00069       // wget errors
00070       E_file_not_found,
00071       E_login_failed,
00072       E_connection_failed,
00073       E_proxyauth_failed,
00074       //mount
00075       E_mount_failed,
00076       E_umount_failed,
00077       E_already_mounted,
00078       E_busy,
00079       //
00080       E_attachpoint_fixed,
00081       E_not_supported_by_media,
00082       // libcurl errors
00083       E_curl_setopt_failed,
00084       E_write_error,
00085       E_user_abort
00086     };
00087 
00088     friend std::ostream & operator<<( std::ostream & str, const Error & obj ) {
00089       return str << PMError( obj );
00090     }
00091 };
00092 
00094 
00095 #endif // MediaError_h
00096 

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