ZYppCommitPolicy.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_ZYPPCOMMITPOLICY_H
00013 #define ZYPP_ZYPPCOMMITPOLICY_H
00014 
00015 #include <iosfwd>
00016 
00018 namespace zypp
00019 { 
00020 
00022   //
00023   //    CLASS NAME : ZYppCommitPolicy
00024   //
00026   class ZYppCommitPolicy
00027   {
00028   public:
00029     ZYppCommitPolicy()
00030     : _restrictToMedia( 0 )
00031     , _dryRun( false )
00032     , _rpmNoSignature( false )
00033     {}
00034 
00035   public:
00036     unsigned restrictToMedia() const
00037     { return _restrictToMedia; }
00038 
00039     bool dryRun() const
00040     { return _dryRun; }
00041 
00042     bool rpmNoSignature() const
00043     { return _rpmNoSignature; }
00044 
00045   public:
00049     ZYppCommitPolicy & restrictToMedia( unsigned mediaNr_r )
00050     { _restrictToMedia = mediaNr_r; return *this; }
00051 
00053     ZYppCommitPolicy & allMedia()
00054     { return restrictToMedia( 0 ); }
00055 
00057     ZYppCommitPolicy & dryRun( bool yesNo_r = true )
00058     { _dryRun = yesNo_r; return *this; }
00059 
00061     ZYppCommitPolicy & rpmNoSignature( bool yesNo_r = true )
00062     { _rpmNoSignature = yesNo_r; return *this; }
00063 
00064   private:
00065     unsigned _restrictToMedia;
00066     bool     _dryRun;
00067     bool     _rpmNoSignature;
00068   };
00070 
00072   std::ostream & operator<<( std::ostream & str, const ZYppCommitPolicy & obj );
00073 
00075 } // namespace zypp
00077 #endif // ZYPP_ZYPPCOMMITPOLICY_H

Generated on Thu Jul 6 00:07:29 2006 for zypp by  doxygen 1.4.6