libzypp  17.35.12
SrcPackage.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_SRCPACKAGE_H
13 #define ZYPP_SRCPACKAGE_H
14 
15 #include <zypp/ResObject.h>
16 
18 namespace zypp
19 {
20 
21  DEFINE_PTR_TYPE(SrcPackage);
22 
24  //
25  // CLASS NAME : SrcPackage
26  //
29  class ZYPP_API SrcPackage : public ResObject
30  {
31 
32  public:
33  using Self = SrcPackage;
37 
38  public:
40  std::string sourcePkgType() const;
41 
43  OnMediaLocation location() const;
44 
46  Pathname cachedLocation() const;
47 
49  bool isCached() const
50  { return ! cachedLocation().empty(); }
51 
52  protected:
53  friend Ptr make<Self>( const sat::Solvable & solvable_r );
55  SrcPackage( const sat::Solvable & solvable_r );
57  ~SrcPackage() override;
58  };
60 
62 } // namespace zypp
64 #endif // ZYPP_SRCPACKAGE_H
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.
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)
bool isCached() const
Whether the package is cached.
Definition: SrcPackage.h:49
Base for resolvable objects.
Definition: ResObject.h:37
TraitsType::constPtrType constPtr
Definition: ResObject.h:43
SrcPackage interface.
Definition: SrcPackage.h:29
intrusive_ptr< TRes > PtrType
Definition: ResTraits.h:82
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19
TraitsType::PtrType Ptr
Definition: ResObject.h:42