PatchImplIf.cc

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #include "zypp/detail/PatchImplIf.h"
00013 
00015 namespace zypp
00016 { 
00017 
00018   namespace detail
00019   { 
00020 
00022     // Default implementation of PatchImplIf attributes,
00023     // as far as resonable.
00025 
00026     std::string PatchImplIf::id() const
00027     { return std::string(); }
00028 
00029     Date PatchImplIf::timestamp() const
00030     { return Date(); }
00031 
00032     std::string PatchImplIf::category() const
00033     { return std::string(); }
00034 
00035     bool PatchImplIf::reboot_needed() const
00036     { return false; }
00037 
00038     bool PatchImplIf::affects_pkg_manager() const
00039     { return false; }
00040 
00041     ByteCount PatchImplIf::size() const
00042     { return ByteCount(); }
00043 
00044     bool PatchImplIf::interactive() const
00045     {
00046       if ( reboot_needed() )
00047         {
00048           return true;
00049         }
00050 
00051       AtomList atoms = all_atoms();
00052       for ( AtomList::const_iterator it = atoms.begin(); it != atoms.end(); it++)
00053         {
00054           if (    isKind<Message>( *it )
00055                || ! licenseToConfirm().empty() )
00056             {
00057               return true;
00058             }
00059         }
00060 
00061       return false;
00062     }
00063 
00064     PatchImplIf::AtomList PatchImplIf::all_atoms() const
00065     { return AtomList(); }
00066 
00068   } // namespace detail
00071 } // namespace zypp

Generated on Tue Nov 28 16:49:29 2006 for zypp by  doxygen 1.5.0