libzypp  17.24.1
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  typedef Package Self;
39 
40  public:
43 
44  public:
45 
57 
62  bool maybeUnsupported() const;
63 
65  Changelog changelog() const;
67  std::string buildhost() const;
69  std::string distribution() const;
71  std::string license() const;
73  std::string packager() const;
75  std::string group() const;
77  Keywords keywords() const;
80  std::string url() const;
82  ByteCount sourcesize() const;
84  std::list<std::string> authors() const;
85 
91  FileList filelist() const;
92 
98  std::string sourcePkgName() const;
99 
102  Edition sourcePkgEdition() const;
103 
106  std::string sourcePkgType() const;
107 
110  std::string sourcePkgLongName() const;
112 
117  CheckSum checksum() const;
118 
123  OnMediaLocation location() const;
124 
126  Pathname cachedLocation() const;
127 
129  bool isCached() const
130  { return ! cachedLocation().empty(); }
131 
132  protected:
133  friend Ptr make<Self>( const sat::Solvable & solvable_r );
135  Package( const sat::Solvable & solvable_r );
137  virtual ~Package();
138  };
139 
141 
143 } // namespace zypp
145 #endif // ZYPP_PACKAGE_H
VendorSupportOptions.h
zypp::ResTraits
ResTraits.
Definition: ResTraits.h:79
zypp::ResTraits::constPtrType
intrusive_ptr< const TRes > constPtrType
Definition: ResTraits.h:83
zypp::DEFINE_PTR_TYPE
DEFINE_PTR_TYPE(Application)
zypp::Changelog
std::list< ChangelogEntry > Changelog
List of ChangelogEntry.
Definition: Changelog.h:53
zypp::sat::Solvable
A Solvable object within the sat Pool.
Definition: Solvable.h:53
zypp::Package::Package
Package(const sat::Solvable &solvable_r)
Ctor.
Definition: Package.cc:76
Changelog.h
zypp::Package::location
OnMediaLocation location() const
Location of the resolvable in the repository.
Definition: Package.cc:200
zypp::Package::checksum
CheckSum checksum() const
Checksum the source says this package should have.
Definition: Package.cc:197
zypp::Package::distribution
std::string distribution() const
Definition: Package.cc:166
zypp::Package::Self
Package Self
Definition: Package.h:35
zypp::CheckSum
Definition: CheckSum.h:33
zypp::Package::sourcePkgLongName
std::string sourcePkgLongName() const
The source rpms "name-version-release.type".
Definition: Package.cc:223
zypp::Package::group
std::string group() const
Definition: Package.cc:175
ResObject.h
zypp::Edition
Edition represents [epoch:]version[-release]
Definition: Edition.h:60
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition: OnMediaLocation.h:38
zypp::Package::sourcePkgName
std::string sourcePkgName() const
Name of the source rpm this package was built from.
Definition: Package.cc:206
zypp::Package::constPtr
TraitsType::constPtrType constPtr
Definition: Package.h:38
zypp::Package::changelog
Changelog changelog() const
Get the package change log.
Definition: Package.cc:144
zypp::Package::filelist
FileList filelist() const
Return the packages filelist (if available).
Definition: Package.cc:194
zypp::ByteCount
Store and operate with byte count.
Definition: ByteCount.h:30
zypp::Package::Keywords
sat::ArrayAttr< PackageKeyword, IdString > Keywords
Definition: Package.h:41
zypp::Package::authors
std::list< std::string > authors() const
Definition: Package.cc:187
zypp::Package
Package interface.
Definition: Package.h:32
zypp::ResTraits::PtrType
intrusive_ptr< TRes > PtrType
Definition: ResTraits.h:82
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::Package::sourcePkgType
std::string sourcePkgType() const
The type of the source rpm ("src" or "nosrc").
Definition: Package.cc:220
zypp::Package::sourcesize
ByteCount sourcesize() const
Size of corresponding the source package.
Definition: Package.cc:184
zypp::Package::buildhost
std::string buildhost() const
Definition: Package.cc:163
zypp::sat::ArrayAttr
LookupAttr::TransformIterator based container to retrieve list attributes.
Definition: LookupAttr.h:592
zypp::Package::Ptr
TraitsType::PtrType Ptr
Definition: Package.h:37
zypp::Package::TraitsType
ResTraits< Self > TraitsType
Definition: Package.h:36
zypp::Package::keywords
Keywords keywords() const
Definition: Package.cc:178
zypp::Package::packager
std::string packager() const
Definition: Package.cc:172
zypp::filesystem::Pathname::empty
bool empty() const
Test for an empty path.
Definition: Pathname.h:114
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:44
zypp::Package::FileList
sat::ArrayAttr< std::string, std::string > FileList
Definition: Package.h:42
zypp::Package::~Package
virtual ~Package()
Dtor.
Definition: Package.cc:85
zypp::Package::license
std::string license() const
Definition: Package.cc:169
zypp::Package::maybeUnsupported
bool maybeUnsupported() const
True if the vendor support for this package is unknown or explictly unsupported.
Definition: Package.cc:127
zypp::Package::sourcePkgEdition
Edition sourcePkgEdition() const
Edition of the source rpm this package was built from.
Definition: Package.cc:213
zypp::Package::isCached
bool isCached() const
Whether the package is cached.
Definition: Package.h:129
zypp::Package::cachedLocation
Pathname cachedLocation() const
Location of the downloaded package in cache or an empty path.
Definition: Package.cc:203
zypp::Package::vendorSupport
VendorSupportOption vendorSupport() const
Returns the level of supportability the vendor gives to this package.
Definition: Package.cc:88
zypp::ResObject
Base for resolvable objects.
Definition: ResObject.h:37
zypp::VendorSupportOption
VendorSupportOption
Definition: VendorSupportOptions.h:21
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:181
PackageKeyword.h