libzypp
10.5.0
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #ifndef ZYPP_ZYPPCOMMITRESULT_H 00013 #define ZYPP_ZYPPCOMMITRESULT_H 00014 00015 #include <iosfwd> 00016 #include <vector> 00017 #include <list> 00018 00019 #include "zypp/PoolItem.h" 00020 #include "zypp/sat/Transaction.h" 00021 #include "zypp/base/DefaultIntegral.h" 00022 00024 namespace zypp 00025 { 00026 00027 namespace sat 00028 { 00029 class Transaction; 00030 } 00031 00033 class UpdateNotificationFile 00034 { 00035 public: 00036 UpdateNotificationFile( sat::Solvable solvable_r, const Pathname & file_r ) 00037 : _solvable( solvable_r ), _file( file_r ) 00038 {} 00039 public: 00040 sat::Solvable solvable() const { return _solvable; } 00041 const Pathname & file() const { return _file; } 00042 private: 00043 sat::Solvable _solvable; 00044 Pathname _file; 00045 }; 00046 00047 typedef std::list<UpdateNotificationFile> UpdateNotifications; 00048 00050 // 00051 // CLASS NAME : ZYppCommitResult 00052 // 00062 class ZYppCommitResult 00063 { 00064 public: 00065 typedef std::vector<sat::Transaction::Step> TransactionStepList; 00066 00067 public: 00068 ZYppCommitResult(); 00069 ZYppCommitResult( const ZYppCommitResult & lhs_r ); 00070 ZYppCommitResult( const Pathname & root_r ); 00071 ~ZYppCommitResult(); 00072 00073 public: 00078 const Pathname & root() const; 00079 00087 const sat::Transaction & transaction() const; 00088 00090 sat::Transaction & rTransaction(); 00091 00095 const TransactionStepList & transactionStepList() const; 00096 00098 TransactionStepList & rTransactionStepList(); 00099 00127 const UpdateNotifications & updateMessages() const; 00128 00132 UpdateNotifications & rUpdateMessages(); 00133 00134 public: 00135 00158 bool allDone() const 00159 { return transaction().actionEmpty( ~sat::Transaction::STEP_DONE ); } 00160 00162 bool noError() const 00163 { return transaction().actionEmpty( sat::Transaction::STEP_ERROR ); } 00165 00166 public: 00173 typedef std::list<PoolItem> PoolItemList; 00177 int _result ZYPP_DEPRECATED; 00181 PoolItemList _errors ZYPP_DEPRECATED; 00185 PoolItemList _remaining ZYPP_DEPRECATED; 00189 PoolItemList _srcremaining ZYPP_DEPRECATED; 00191 00192 public: 00194 class Impl; 00195 private: 00197 RWCOW_pointer<Impl> _pimpl; 00198 }; 00200 00202 std::ostream & operator<<( std::ostream & str, const ZYppCommitResult & obj ); 00203 00205 } // namespace zypp 00207 #endif // ZYPP_ZYPPCOMMITRESULT_H