merge REFACTORING-10_3 back to trunk
[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 #include "zypp/detail/SrcPackageImplIf.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   DEFINE_PTR_TYPE(SrcPackage);
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    CLASS NAME : SrcPackage
27   //
28   /** SrcPackage interface.
29   */
30   class SrcPackage : public ResObject
31   {
32
33   public:
34     typedef detail::SrcPackageImplIf    Impl;
35     typedef SrcPackage                  Self;
36     typedef ResTraits<Self>          TraitsType;
37     typedef TraitsType::PtrType      Ptr;
38     typedef TraitsType::constPtrType constPtr;
39
40   public:
41     /** Disk usage per directory */
42     DiskUsage diskusage() const;
43     
44     /** location of resolvable in repo */
45     OnMediaLocation location() const;
46       
47   protected:
48     SrcPackage( const NVRAD & nvrad_r );
49     /** Dtor */
50     virtual ~SrcPackage();
51
52   private:
53     /** Access implementation */
54     virtual Impl & pimpl() = 0;
55     /** Access implementation */
56     virtual const Impl & pimpl() const = 0;
57   };
58   ///////////////////////////////////////////////////////////////////
59
60   /////////////////////////////////////////////////////////////////
61 } // namespace zypp
62 ///////////////////////////////////////////////////////////////////
63 #endif // ZYPP_SRCPACKAGE_H