- Make basic attributes available through ResObject.
[platform/upstream/libzypp.git] / zypp / Product.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Product.h
10  *
11 */
12 #ifndef ZYPP_PRODUCT_H
13 #define ZYPP_PRODUCT_H
14
15 #include <list>
16 #include <string>
17
18 #include "zypp/ResObject.h"
19 #include "zypp/detail/ProductImplIf.h"
20
21 ///////////////////////////////////////////////////////////////////
22 namespace zypp
23 { /////////////////////////////////////////////////////////////////
24
25   DEFINE_PTR_TYPE(Product);
26
27   ///////////////////////////////////////////////////////////////////
28   //
29   //    CLASS NAME : ResObject
30   //
31   /** Product interface.
32   */
33   class Product : public ResObject
34   {
35   public:
36     typedef detail::ProductImplIf    Impl;
37     typedef Product                  Self;
38     typedef ResTraits<Self>          TraitsType;
39     typedef TraitsType::PtrType      Ptr;
40     typedef TraitsType::constPtrType constPtr;
41
42   public:
43     /** Get the product categoty (base, add-on) */
44     std::string category() const;
45
46     /** Get the vendor of the product */
47     Label vendor() const;
48
49     /** The URL to download the release notes for this product */
50     Url releaseNotesUrl() const;
51
52     /** Online updates for the product.
53         They are complementary, not alternatives. #163192 */
54     std::list<Url> updateUrls() const;
55
56     /** The product flags */
57     std::list<std::string> flags() const;
58
59     /** */
60     Label shortName() const;
61
62     /** */
63     Label longName() const;
64
65   protected:
66     /** Ctor */
67     Product( const NVRAD & nvrad_r );
68     /** Dtor */
69     virtual ~Product();
70
71   private:
72     /** Access implementation */
73     virtual Impl & pimpl() = 0;
74     /** Access implementation */
75     virtual const Impl & pimpl() const = 0;
76   };
77
78   /////////////////////////////////////////////////////////////////
79 } // namespace zypp
80 ///////////////////////////////////////////////////////////////////
81 #endif // ZYPP_PRODUCT_H