libzypp
12.16.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
23
#if defined(WITH_DEPRECATED_HISTORYITEM_API)
24
#warning Support for HistoryItem based parsing will be removed in the future.
25
#warning Switch to the new HistoryLogData based HistoryLogReader API.
26
#endif // WITH_DEPRECATED_HISTORYITEM_API
27
29
namespace
zypp
30
{
31
32
class
Date;
33
35
namespace
parser
36
{
37
70
#if defined(WITH_DEPRECATED_HISTORYITEM_API)
71
72
73
74
75
76
77
78
79
80
81
82
83
#endif // WITH_DEPRECATED_HISTORYITEM_API
84
85
class
HistoryLogReader
86
{
87
public
:
88
89
enum
OptionBits
90
{
91
IGNORE_INVALID_ITEMS
= (1 << 0)
92
};
93
ZYPP_DECLARE_FLAGS
( Options,
OptionBits
);
94
95
public
:
99
typedef
function< bool( const HistoryLogData::Ptr & )>
ProcessData
;
100
105
HistoryLogReader
(
const
Pathname & historyFile_r,
const
Options & options_r,
const
ProcessData & callback_r );
106
107
~HistoryLogReader
();
108
114
void
readAll
(
const
ProgressData::ReceiverFnc
& progress =
ProgressData::ReceiverFnc
() );
115
124
void
readFrom
(
const
Date
& date,
const
ProgressData::ReceiverFnc
& progress =
ProgressData::ReceiverFnc
() );
125
145
void
readFromTo
(
const
Date
& fromDate,
const
Date
& toDate,
const
ProgressData::ReceiverFnc
& progress =
ProgressData::ReceiverFnc
() );
146
152
void
setIgnoreInvalidItems
(
bool
ignoreInvalid =
false
);
153
159
bool
ignoreInvalidItems
()
const
;
160
161
private
:
163
class
Impl
;
164
RW_pointer<Impl,rw_pointer::Scoped<Impl>
>
_pimpl
;
165
166
#if defined(WITH_DEPRECATED_HISTORYITEM_API)
167
public
:
169
typedef
function< bool( const HistoryItem::Ptr & )> ProcessItem;
174
HistoryLogReader
(
const
Pathname & repo_file,
const
ProcessItem & callback )
ZYPP_DEPRECATED
;
175
#endif // WITH_DEPRECATED_HISTORYITEM_API
176
};
177
179
ZYPP_DECLARE_OPERATORS_FOR_FLAGS
( HistoryLogReader::Options );
180
182
183
}
// namespace parser
185
}
// namespace zypp
187
188
#endif
/* ZYPP_PARSER_HISTORYLOGREADER_H_ */
zypp
parser
HistoryLogReader.h
Generated by
1.8.2