libzypp
10.5.0
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00009 00013 #ifndef ZYPP_PARSER_HISTORYLOGREADER_H_ 00014 #define ZYPP_PARSER_HISTORYLOGREADER_H_ 00015 00016 #include "zypp/base/PtrTypes.h" 00017 #include "zypp/ProgressData.h" 00018 #include "zypp/Pathname.h" 00019 00020 #include "zypp/HistoryLogData.h" 00021 00023 namespace zypp 00024 { 00025 00026 class Date; 00027 00029 namespace parser 00030 { 00031 00032 00034 // 00035 // CLASS NAME: HistoryLogReader 00036 // 00073 class HistoryLogReader 00074 { 00075 public: 00076 typedef function< bool( const HistoryItem::Ptr & )> ProcessItem; 00077 00078 public: 00079 HistoryLogReader( const Pathname & repo_file, 00080 const ProcessItem & callback ); 00081 ~HistoryLogReader(); 00082 00088 void readAll( 00089 const ProgressData::ReceiverFnc &progress = ProgressData::ReceiverFnc() ); 00090 00099 void readFrom( const Date & date, 00100 const ProgressData::ReceiverFnc &progress = ProgressData::ReceiverFnc() ); 00101 00121 void readFromTo( const Date & fromDate, const Date & toDate, 00122 const ProgressData::ReceiverFnc &progress = ProgressData::ReceiverFnc() ); 00123 00129 void setIgnoreInvalidItems( bool ignoreInvalid = false ); 00130 00136 bool ignoreInvalidItems() const; 00137 00138 private: 00140 class Impl; 00141 RW_pointer<Impl,rw_pointer::Scoped<Impl> > _pimpl; 00142 }; 00144 00145 00147 } // namespace parser 00150 } // namespace zypp 00152 00153 #endif /* ZYPP_PARSER_HISTORYLOGREADER_H_ */