libzypp 17.37.10

Package.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_PACKAGE_H
13#define ZYPP_PACKAGE_H
14
15#include <zypp/Globals.h>
16#include <zypp/ResObject.h>
17#include <zypp/PackageKeyword.h>
18#include <zypp/Changelog.h>
19#include <zypp/VendorSupportOptions.h>
20
22 namespace zypp
23{
24
25 DEFINE_PTR_TYPE(Package);
26
28 //
29 // CLASS NAME : Package
30 //
33 class ZYPP_API Package : public ResObject
34 {
35 public:
36 using Self = Package;
37 using TraitsType = ResTraits<Self>;
38 using Ptr = TraitsType::PtrType;
39 using constPtr = TraitsType::constPtrType;
40
41 public:
42 using Keywords = sat::ArrayAttr<PackageKeyword, IdString>;
43 using FileList = sat::ArrayAttr<std::string, std::string>;
44
45 public:
46
57 VendorSupportOption vendorSupport() const;
58
63 bool maybeUnsupported() const;
64
70 std::vector<std::string> supersededBy() const;
71
84 std::pair<std::vector<IdString>,std::vector<std::string>> supersededByItems() const;
85
87 Changelog changelog() const;
89 std::string buildhost() const;
91 std::string distribution() const;
93 std::string license() const;
95 std::string packager() const;
97 std::string group() const;
99 Keywords keywords() const;
102 std::string url() const;
104 ByteCount sourcesize() const;
106 std::list<std::string> authors() const;
107
113 FileList filelist() const;
114
118
120 std::string sourcePkgName() const;
121
124 Edition sourcePkgEdition() const;
125
128 std::string sourcePkgType() const;
129
132 std::string sourcePkgLongName() const;
134
139 CheckSum checksum() const;
140
145 OnMediaLocation location() const;
146
148 Pathname cachedLocation() const;
149
151 bool isCached() const
152 { return ! cachedLocation().empty(); }
153
154 protected:
155 friend Ptr make<Self>( const sat::Solvable & solvable_r );
157 Package( const sat::Solvable & solvable_r );
159 ~Package() override;
160 };
161
163
165} // namespace zypp
167#endif // ZYPP_PACKAGE_H
Changelog.h
PackageKeyword.h
ResObject.h
VendorSupportOptions.h
zypp::ByteCount
Store and operate with byte count.
Definition ByteCount.h:32
zypp::CheckSum
Definition CheckSum.h:34
zypp::Edition
Edition represents [epoch:]version[-release]
Definition Edition.h:61
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition onmedialocation.h:37
zypp::Package
Package interface.
Definition Package.h:34
zypp::Package::packager
std::string packager() const
Definition Package.cc:248
zypp::Package::sourcePkgLongName
std::string sourcePkgLongName() const
The source rpms "name-version-release.type".
Definition Package.cc:299
zypp::Package::Keywords
sat::ArrayAttr< PackageKeyword, IdString > Keywords
Definition Package.h:42
zypp::Package::maybeUnsupported
bool maybeUnsupported() const
True if the vendor support for this package is unknown or explicitly unsupported.
Definition Package.cc:154
zypp::Package::keywords
Keywords keywords() const
Definition Package.cc:254
zypp::Package::cachedLocation
Pathname cachedLocation() const
Location of the downloaded package in cache or an empty path.
Definition Package.cc:279
zypp::Package::supersededBy
std::vector< std::string > supersededBy() const
The name(s) of the successor package if vendorSupport is VendorSupportSuperseded.
Definition Package.cc:172
zypp::Package::location
OnMediaLocation location() const
Location of the resolvable in the repository.
Definition Package.cc:276
zypp::Package::filelist
FileList filelist() const
Return the packages filelist (if available).
Definition Package.cc:270
zypp::Package::constPtr
TraitsType::constPtrType constPtr
Definition Package.h:39
zypp::Package::sourcePkgName
std::string sourcePkgName() const
Name of the source rpm this package was built from.
Definition Package.cc:282
zypp::Package::FileList
sat::ArrayAttr< std::string, std::string > FileList
Definition Package.h:43
zypp::Package::url
std::string url() const
Don't ship it as class Url, because it might be in fact anything but a legal Url.
Definition Package.cc:257
zypp::Package::sourcePkgType
std::string sourcePkgType() const
The type of the source rpm ("src" or "nosrc").
Definition Package.cc:296
zypp::Package::Ptr
TraitsType::PtrType Ptr
Definition Package.h:38
zypp::Package::TraitsType
ResTraits< Self > TraitsType
Definition Package.h:37
zypp::Package::Package
Package(const sat::Solvable &solvable_r)
Ctor.
Definition Package.cc:139
zypp::Package::sourcePkgEdition
Edition sourcePkgEdition() const
Edition of the source rpm this package was built from.
Definition Package.cc:289
zypp::Package::vendorSupport
VendorSupportOption vendorSupport() const
Returns the level of supportability the vendor gives to this package.
Definition Package.cc:151
zypp::Package::checksum
CheckSum checksum() const
Checksum the source says this package should have.
Definition Package.cc:273
zypp::Package::sourcesize
ByteCount sourcesize() const
Size of corresponding the source package.
Definition Package.cc:260
zypp::Package::isCached
bool isCached() const
Whether the package is cached.
Definition Package.h:151
zypp::Package::authors
std::list< std::string > authors() const
Definition Package.cc:263
zypp::Package::group
std::string group() const
Definition Package.cc:251
zypp::Package::buildhost
std::string buildhost() const
Definition Package.cc:239
zypp::Package::changelog
Changelog changelog() const
Get the package change log.
Definition Package.cc:220
zypp::Package::supersededByItems
std::pair< std::vector< IdString >, std::vector< std::string > > supersededByItems() const
The successor package(s) if vendorSupport is VendorSupportSuperseded.
Definition Package.cc:185
zypp::Package::distribution
std::string distribution() const
Definition Package.cc:242
zypp::Package::license
std::string license() const
Definition Package.cc:245
zypp::Package::Self
Package Self
Definition Package.h:36
zypp::ResObject::ResObject
ResObject(const sat::Solvable &solvable_r)
Ctor.
Definition ResObject.cc:23
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zypp::sat::ArrayAttr
LookupAttr::TransformIterator based container to retrieve list attributes.
Definition LookupAttrTools.h:157
zypp::sat::Solvable
A Solvable object within the sat Pool.
Definition Solvable.h:54
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::make
ResTraits< TRes >::PtrType make(const sat::Solvable &solvable_r)
Directly create a certain kind of ResObject from sat::Solvable.
Definition ResObject.h:118
zypp::VendorSupportOption
VendorSupportOption
Definition VendorSupportOptions.h:22
zypp::ZYPP_API
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
zypp::Changelog
std::list< ChangelogEntry > Changelog
List of ChangelogEntry.
Definition Changelog.h:55
zypp::ResTraits
ResTraits.
Definition ResTraits.h:80
zypp::ResTraits< Self >::PtrType
intrusive_ptr< Self > PtrType
Definition ResTraits.h:82
zypp::ResTraits< Self >::constPtrType
intrusive_ptr< const Self > constPtrType
Definition ResTraits.h:83
DEFINE_PTR_TYPE
#define DEFINE_PTR_TYPE(NAME)
Forward declaration of Ptr types.
Definition PtrTypes.h:639
Globals.h