libzypp
12.16.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
User data as transaction id
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
misc
parser
pool
repo
sat
solver
target
hal
modalias
rpm
BinHeader.cc
BinHeader.h
librpm.h
librpmDb.cc
librpmDb.cv3.cc
librpmDb.h
RpmCallbacks.cc
RpmCallbacks.h
RpmDb.cc
RpmDb.h
RpmException.cc
RpmException.h
RpmFlags.h
RpmHeader.cc
RpmHeader.h
CommitPackageCache.cc
CommitPackageCache.h
CommitPackageCacheImpl.cc
CommitPackageCacheImpl.h
CommitPackageCacheReadAhead.cc
CommitPackageCacheReadAhead.h
HardLocksFile.cc
HardLocksFile.h
RequestedLocalesFile.cc
RequestedLocalesFile.h
SoftLocksFile.cc
SoftLocksFile.h
TargetCallbackReceiver.cc
TargetCallbackReceiver.h
TargetException.cc
TargetException.h
TargetImpl.cc
TargetImpl.h
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
BinHeader.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_TARGET_RPM_BINHEADER_H
13
#define ZYPP_TARGET_RPM_BINHEADER_H
14
15
extern
"C"
16
{
17
#include <stdint.h>
18
}
19
20
#include <iosfwd>
21
#include <string>
22
#include <vector>
23
#include <list>
24
25
#include "
zypp/base/ReferenceCounted.h
"
26
#include "
zypp/base/NonCopyable.h
"
27
#include "
zypp/base/PtrTypes.h
"
28
#include "
zypp/target/rpm/librpm.h
"
29
30
namespace
zypp
31
{
32
namespace
target
33
{
34
namespace
rpm
35
{
37
//
38
// CLASS NAME : BinHeader
42
class
BinHeader
:
public
base::ReferenceCounted
,
private
base::NonCopyable
43
{
44
45
public
:
46
47
typedef
intrusive_ptr<BinHeader>
Ptr
;
48
49
typedef
intrusive_ptr<const BinHeader>
constPtr
;
50
51
typedef
rpmTag
tag
;
52
53
class
intList
;
54
55
class
stringList
;
56
57
private
:
58
59
Header
_h
;
60
61
bool
assertHeader
();
62
63
public
:
64
65
BinHeader
( Header h_r = 0 );
66
71
BinHeader
(
BinHeader::Ptr
& rhs );
72
73
virtual
~BinHeader
();
74
75
public
:
76
77
bool
empty
()
const
78
{
79
return
(
_h
== NULL );
80
}
81
82
bool
has_tag
(
tag
tag_r )
const
;
83
84
unsigned
int_list
(
tag
tag_r, intList & lst_r )
const
;
85
86
unsigned
string_list
(
tag
tag_r, stringList & lst_r )
const
;
87
88
int
int_val
(
tag
tag_r )
const
;
89
90
std::string
string_val
(
tag
tag_r )
const
;
91
92
public
:
93
94
std::list<std::string>
stringList_val
(
tag
tag_r )
const
;
95
96
public
:
97
98
virtual
std::ostream &
dumpOn
( std::ostream & str )
const
;
99
};
100
102
104
//
105
// CLASS NAME : BinHeader::intList
109
class
BinHeader::intList
:
private
base::NonCopyable
110
{
111
public
:
112
intList
()
113
:
_type
( RPM_NULL_TYPE )
114
{}
115
116
bool
empty
()
const
117
{
return
_data
.empty(); }
118
119
unsigned
size
()
const
120
{
return
_data
.size(); }
121
122
long
operator[]
(
const
unsigned
idx_r )
const
123
{
return
idx_r <
_data
.size() ?
_data
[idx_r] : 0; }
124
125
private
:
126
friend
class
BinHeader
;
127
unsigned
set
(
void
* val_r,
unsigned
cnt_r, rpmTagType type_r );
128
129
private
:
130
std::vector<long>
_data
;
131
rpmTagType
_type
;
132
};
133
135
137
//
138
// CLASS NAME : BinHeader::stringList
142
class
BinHeader::stringList
:
private
base::NonCopyable
143
{
144
public
:
145
bool
empty
()
const
146
{
return
_data
.empty(); }
147
148
unsigned
size
()
const
149
{
return
_data
.size(); }
150
151
std::string
operator[]
(
const
unsigned
idx_r )
const
152
{
return
idx_r <
_data
.size() ?
_data
[idx_r] : std::string(); }
153
154
private
:
155
friend
class
BinHeader
;
156
unsigned
set
(
char
** val_r,
unsigned
cnt_r );
157
158
private
:
159
std::vector<std::string>
_data
;
160
};
161
163
164
}
// namespace rpm
165
}
// namespace target
166
}
// namespace zypp
167
168
#endif // ZYPP_TARGET_RPM_BINHEADER_H
zypp
target
rpm
BinHeader.h
Generated by
1.8.2