libzypp  17.35.15
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>
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;
40 
41  public:
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 
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
TraitsType::constPtrType constPtr
Definition: Package.h:39
A Solvable object within the sat Pool.
Definition: Solvable.h:53
Pathname cachedLocation(const OnMediaLocation &loc_r, const RepoInfo &repo_r)
Definition: Package.cc:99
Describes a resource file located on a medium.
Store and operate with byte count.
Definition: ByteCount.h:31
bool isCached() const
Whether the package is cached.
Definition: Package.h:151
std::list< ChangelogEntry > Changelog
List of ChangelogEntry.
Definition: Changelog.h:55
Edition represents [epoch:]version[-release]
Definition: Edition.h:60
LookupAttr::TransformIterator based container to retrieve list attributes.
Definition: LookupAttr.h:599
ResTraits.
Definition: ResTraits.h:79
intrusive_ptr< const TRes > constPtrType
Definition: ResTraits.h:83
bool empty() const
Test for an empty path.
Definition: Pathname.h:116
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition: ResTraits.h:93
DEFINE_PTR_TYPE(Application)
Package interface.
Definition: Package.h:33
TraitsType::PtrType Ptr
Definition: Package.h:38
Base for resolvable objects.
Definition: ResObject.h:37
intrusive_ptr< TRes > PtrType
Definition: ResTraits.h:82
std::string checksum(const Pathname &file, const std::string &algorithm)
Compute a files checksum.
Definition: PathInfo.cc:1056
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19