libzypp: zypp/SrcPackage.h Source File

libzypp 17.36.6

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
18namespace 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;
34 using TraitsType = ResTraits<Self>;
35 using Ptr = TraitsType::PtrType;
36 using constPtr = TraitsType::constPtrType;
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 };
59
60
62} // namespace zypp
64#endif // ZYPP_SRCPACKAGE_H
ResObject.h
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition onmedialocation.h:37
zypp::ResObject::ResObject
ResObject(const sat::Solvable &solvable_r)
Ctor.
Definition ResObject.cc:23
zypp::SrcPackage
SrcPackage interface.
Definition SrcPackage.h:30
zypp::SrcPackage::constPtr
TraitsType::constPtrType constPtr
Definition SrcPackage.h:36
zypp::SrcPackage::Ptr
TraitsType::PtrType Ptr
Definition SrcPackage.h:35
zypp::SrcPackage::cachedLocation
Pathname cachedLocation() const
Location of the downloaded package in cache or an empty path.
Definition SrcPackage.cc:57
zypp::SrcPackage::sourcePkgType
std::string sourcePkgType() const
The type of the source rpm ("src" or "nosrc").
Definition SrcPackage.cc:51
zypp::SrcPackage::SrcPackage
SrcPackage(const sat::Solvable &solvable_r)
Ctor.
Definition SrcPackage.cc:33
zypp::SrcPackage::TraitsType
ResTraits< Self > TraitsType
Definition SrcPackage.h:34
zypp::SrcPackage::location
OnMediaLocation location() const
location of resolvable in repo
Definition SrcPackage.cc:54
zypp::SrcPackage::Self
SrcPackage Self
Definition SrcPackage.h:33
zypp::SrcPackage::isCached
bool isCached() const
Whether the package is cached.
Definition SrcPackage.h:49
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
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::ZYPP_API
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
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