13 #ifndef ZYPP_PARSER_HISTORYLOGREADER_H_ 14 #define ZYPP_PARSER_HISTORYLOGREADER_H_ 16 #include <zypp/base/PtrTypes.h> 17 #include <zypp/base/Flags.h> 18 #include <zypp-core/ui/ProgressData> 19 #include <zypp/Pathname.h> 80 typedef function< bool( const HistoryLogData::Ptr & )>
ProcessData;
Zypp history file parserReads a zypp history log file and calls the ProcessData callback passed in th...
void readAll(const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Read the whole log file.
void setIgnoreInvalidItems(bool ignoreInvalid=false)
Set the reader to ignore invalid log entries and continue with the rest.
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(DiskUsageCounter::MountPoint::HintFlags)
static const HistoryActionID NONE
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
void clearActionFilter()
Clear any HistoryActionIDs.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
function< bool(const HistoryLogData::Ptr &)> ProcessData
Callback type to consume a single history line split into fields.
Store and operate on date (time_t).
ZYPP_DECLARE_FLAGS(Options, OptionBits)
ignore invalid items and continue parsing
HistoryLogReader(const Pathname &historyFile_r, const Options &options_r, const ProcessData &callback_r)
Ctor taking file to parse and data consumer callback.
OptionBits
< Parser option flags
void readFrom(const Date &date, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Read log from specified date.
Wrapper for const correct access via Smart pointer types.
Enumeration of known history actions.
void readFromTo(const Date &fromDate, const Date &toDate, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Read log between fromDate and toDate.
Easy-to use interface to the ZYPP dependency resolver.
bool ignoreInvalidItems() const
Whether the reader is set to ignore invalid log entries.
void addActionFilter(const HistoryActionID &action_r)
Process only specific HistoryActionIDs.