Imported Upstream version 16.3.2
[platform/upstream/libzypp.git] / zypp / SrcPackage.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/SrcPackage.h
10  *
11 */
12 #ifndef ZYPP_SRCPACKAGE_H
13 #define ZYPP_SRCPACKAGE_H
14
15 #include "zypp/ResObject.h"
16
17 ///////////////////////////////////////////////////////////////////
18 namespace zypp
19 { /////////////////////////////////////////////////////////////////
20
21   DEFINE_PTR_TYPE(SrcPackage);
22
23   ///////////////////////////////////////////////////////////////////
24   //
25   //    CLASS NAME : SrcPackage
26   //
27   /** SrcPackage interface.
28   */
29   class SrcPackage : public ResObject
30   {
31
32   public:
33     typedef SrcPackage               Self;
34     typedef ResTraits<Self>          TraitsType;
35     typedef TraitsType::PtrType      Ptr;
36     typedef TraitsType::constPtrType constPtr;
37
38   public:
39     /** The type of the source rpm ("src" or "nosrc"). */
40     std::string sourcePkgType() const;
41
42     /** location of resolvable in repo */
43     OnMediaLocation location() const;
44
45   protected:
46     friend Ptr make<Self>( const sat::Solvable & solvable_r );
47     /** Ctor */
48     SrcPackage( const sat::Solvable & solvable_r );
49     /** Dtor */
50     virtual ~SrcPackage();
51   };
52   ///////////////////////////////////////////////////////////////////
53
54   /////////////////////////////////////////////////////////////////
55 } // namespace zypp
56 ///////////////////////////////////////////////////////////////////
57 #endif // ZYPP_SRCPACKAGE_H