libzypp  17.32.5
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/ResObject.h>
16 #include <zypp/PackageKeyword.h>
17 #include <zypp/Changelog.h>
19 
21 namespace zypp
22 {
23 
24  DEFINE_PTR_TYPE(Package);
25 
27  //
28  // CLASS NAME : Package
29  //
32  class Package : public ResObject
33  {
34  public:
35  using Self = Package;
39 
40  public:
43 
44  public:
45 
57 
62  bool maybeUnsupported() const;
63 
69  std::vector<std::string> supersededBy() const;
70 
83  std::pair<std::vector<IdString>,std::vector<std::string>> supersededByItems() const;
84 
86  Changelog changelog() const;
88  std::string buildhost() const;
90  std::string distribution() const;
92  std::string license() const;
94  std::string packager() const;
96  std::string group() const;
98  Keywords keywords() const;
101  std::string url() const;
103  ByteCount sourcesize() const;
105  std::list<std::string> authors() const;
106 
112  FileList filelist() const;
113 
119  std::string sourcePkgName() const;
120 
123  Edition sourcePkgEdition() const;
124 
127  std::string sourcePkgType() const;
128 
131  std::string sourcePkgLongName() const;
133 
138  CheckSum checksum() const;
139 
144  OnMediaLocation location() const;
145 
147  Pathname cachedLocation() const;
148 
150  bool isCached() const
151  { return ! cachedLocation().empty(); }
152 
153  protected:
154  friend Ptr make<Self>( const sat::Solvable & solvable_r );
156  Package( const sat::Solvable & solvable_r );
158  ~Package() override;
159  };
160 
162 
164 } // namespace zypp
166 #endif // ZYPP_PACKAGE_H
std::string distribution() const
Definition: Package.cc:242
TraitsType::constPtrType constPtr
Definition: Package.h:38
Package(const sat::Solvable &solvable_r)
Ctor.
Definition: Package.cc:139
A Solvable object within the sat Pool.
Definition: Solvable.h:53
Describes a resource file located on a medium.
Store and operate with byte count.
Definition: ByteCount.h:30
bool isCached() const
Whether the package is cached.
Definition: Package.h:150
ByteCount sourcesize() const
Size of corresponding the source package.
Definition: Package.cc:260
std::string url() const
Don&#39;t ship it as class Url, because it might be in fact anything but a legal Url. ...
Definition: Package.cc:257
std::list< ChangelogEntry > Changelog
List of ChangelogEntry.
Definition: Changelog.h:54
Pathname cachedLocation() const
Location of the downloaded package in cache or an empty path.
Definition: Package.cc:279
std::string sourcePkgType() const
The type of the source rpm ("src" or "nosrc").
Definition: Package.cc:296
std::vector< std::string > supersededBy() const
The name(s) of the successor package if vendorSupport is VendorSupportSuperseded. ...
Definition: Package.cc:172
OnMediaLocation location() const
Location of the resolvable in the repository.
Definition: Package.cc:276
Edition represents [epoch:]version[-release]
Definition: Edition.h:60
LookupAttr::TransformIterator based container to retrieve list attributes.
Definition: LookupAttr.h:598
Changelog changelog() const
Get the package change log.
Definition: Package.cc:220
ResTraits.
Definition: ResTraits.h:79
std::string buildhost() const
Definition: Package.cc:239
intrusive_ptr< const TRes > constPtrType
Definition: ResTraits.h:83
bool maybeUnsupported() const
True if the vendor support for this package is unknown or explicitly unsupported. ...
Definition: Package.cc:154
bool empty() const
Test for an empty path.
Definition: Pathname.h:114
Edition sourcePkgEdition() const
Edition of the source rpm this package was built from.
Definition: Package.cc:289
std::string sourcePkgLongName() const
The source rpms "name-version-release.type".
Definition: Package.cc:299
std::string group() const
Definition: Package.cc:251
std::string packager() const
Definition: Package.cc:248
DEFINE_PTR_TYPE(Application)
Package interface.
Definition: Package.h:32
FileList filelist() const
Return the packages filelist (if available).
Definition: Package.cc:270
VendorSupportOption vendorSupport() const
Returns the level of supportability the vendor gives to this package.
Definition: Package.cc:151
CheckSum checksum() const
Checksum the source says this package should have.
Definition: Package.cc:273
TraitsType::PtrType Ptr
Definition: Package.h:37
Keywords keywords() const
Definition: Package.cc:254
Base for resolvable objects.
Definition: ResObject.h:37
~Package() override
Dtor.
Definition: Package.cc:148
intrusive_ptr< TRes > PtrType
Definition: ResTraits.h:82
std::string sourcePkgName() const
Name of the source rpm this package was built from.
Definition: Package.cc:282
std::string license() const
Definition: Package.cc:245
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19
std::list< std::string > authors() const
Definition: Package.cc:263
std::pair< std::vector< IdString >, std::vector< std::string > > supersededByItems() const
The successor package(s) if vendorSupport is VendorSupportSuperseded.
Definition: Package.cc:185