libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Patch.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_PATCH_H
13
#define ZYPP_PATCH_H
14
15
#include "
zypp/base/Flags.h
"
16
#include "
zypp/sat/SolvAttr.h
"
17
#include "
zypp/ResObject.h
"
18
20
namespace
zypp
21
{
22
23
24
DEFINE_PTR_TYPE
(Patch);
25
26
36
class
Patch
:
public
ResObject
37
{
38
public
:
39
typedef
Patch
Self
;
40
typedef
ResTraits<Self>
TraitsType
;
41
typedef
TraitsType::PtrType
Ptr
;
42
typedef
TraitsType::constPtrType
constPtr
;
43
44
public
:
45
typedef
sat::SolvableSet
Contents
;
46
47
enum
Category
{
48
CAT_OTHER
,
49
CAT_YAST
,
50
CAT_SECURITY
,
51
CAT_RECOMMENDED
,
52
CAT_OPTIONAL
,
53
CAT_DOCUMENT
54
};
55
60
enum
InteractiveFlag
{
61
NoFlags
= 0x0000,
62
Reboot
= 0x0001,
63
Message
= 0x0002,
64
License
= 0x0004
65
};
66
ZYPP_DECLARE_FLAGS
(InteractiveFlags,
InteractiveFlag
);
67
74
enum
SeverityFlag
{
75
SEV_NONE
= 0,
76
SEV_OTHER
= 1,
77
SEV_LOW
= 1<<1,
78
SEV_MODERATE
= 1<<2,
79
SEV_IMPORTANT
= 1<<3,
80
SEV_CRITICAL
= 1<<4
81
};
82
ZYPP_DECLARE_FLAGS
(SeverityFlags,
SeverityFlag
);
83
84
public
:
89
Date
timestamp
()
const
90
{
return
buildtime
(); }
91
95
std::string
category
()
const
;
96
100
Category
categoryEnum
()
const
;
101
106
std::string
severity
()
const
;
107
112
SeverityFlag
severityFlag
()
const
;
113
117
bool
rebootSuggested
()
const
;
118
123
bool
restartSuggested
()
const
;
124
129
bool
reloginSuggested
()
const
;
130
134
std::string
message
(
const
Locale
& lang_r =
Locale
() )
const
;
135
139
InteractiveFlags
interactiveFlags
()
const
;
140
144
bool
interactiveWhenIgnoring
( InteractiveFlags flags_r =
NoFlags
)
const
;
145
156
bool
interactive
()
const
;
157
158
public
:
162
Contents
contents
()
const
;
163
164
public
:
165
167
class
ReferenceIterator;
172
ReferenceIterator
referencesBegin
()
const
;
177
ReferenceIterator
referencesEnd
()
const
;
178
179
protected
:
180
friend
Ptr
make<Self>(
const
sat::Solvable
& solvable_r );
182
Patch
(
const
sat::Solvable
& solvable_r );
184
virtual
~Patch
();
185
};
186
ZYPP_DECLARE_OPERATORS_FOR_FLAGS
(Patch::InteractiveFlags);
187
ZYPP_DECLARE_OPERATORS_FOR_FLAGS
(Patch::SeverityFlags);
188
190
std::string
asString
(
const
Patch::SeverityFlag
& obj );
191
212
class
Patch::ReferenceIterator
:
public
boost::iterator_adaptor<
213
Patch::ReferenceIterator
// Derived
214
, sat::LookupAttr::iterator
// Base
215
, int
// Value
216
, boost::forward_traversal_tag
// CategoryOrTraversal
217
, int
// Reference
218
>
219
{
220
public
:
221
ReferenceIterator
() {}
222
explicit
ReferenceIterator
(
const
sat::Solvable
& val_r );
223
228
std::string
id
()
const
;
232
std::string
href
()
const
;
236
std::string
title
()
const
;
241
std::string
type
()
const
;
242
243
private
:
244
friend
class
boost::iterator_core_access
;
245
int
dereference
()
const
{
return
0; }
246
};
247
248
inline
Patch::ReferenceIterator
Patch::referencesBegin
()
const
249
{
return
ReferenceIterator
(
satSolvable
()); }
250
251
inline
Patch::ReferenceIterator
Patch::referencesEnd
()
const
252
{
return
ReferenceIterator
(); }
253
255
256
}
// namespace zypp
258
#endif // ZYPP_PATCH_H
zypp
Patch.h
Generated by
1.8.1