libzypp  17.14.0
HistoryLogReader.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
9 
13 #ifndef ZYPP_PARSER_HISTORYLOGREADER_H_
14 #define ZYPP_PARSER_HISTORYLOGREADER_H_
15 
16 #include "zypp/base/PtrTypes.h"
17 #include "zypp/base/Flags.h"
18 #include "zypp/ProgressData.h"
19 #include "zypp/Pathname.h"
20 
21 #include "zypp/HistoryLogData.h"
22 
24 namespace zypp
25 {
26 
27  class Date;
28 
30  namespace parser
31  {
32 
67  {
68  public:
69 
70  enum OptionBits
71  {
73  };
74  ZYPP_DECLARE_FLAGS( Options, OptionBits );
75 
76  public:
80  typedef function< bool( const HistoryLogData::Ptr & )> ProcessData;
81 
86  HistoryLogReader( const Pathname & historyFile_r, const Options & options_r, const ProcessData & callback_r );
87 
89 
95  void readAll( const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
96 
105  void readFrom( const Date & date, const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
106 
126  void readFromTo( const Date & fromDate, const Date & toDate, const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
127 
133  void setIgnoreInvalidItems( bool ignoreInvalid = false );
134 
140  bool ignoreInvalidItems() const;
141 
142  private:
144  struct Impl;
146  };
147 
149  ZYPP_DECLARE_OPERATORS_FOR_FLAGS( HistoryLogReader::Options );
150 
152 
153  } // namespace parser
155 } // namespace zypp
157 
158 #endif /* ZYPP_PARSER_HISTORYLOGREADER_H_ */