6d23c8af3e424ee936eefce79a72e7a055a2de72
[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     License licenseToConfirm() const;
61
62     /** */
63     Label shortName() const;
64
65     /** */
66     Label longName() const;
67
68   protected:
69     /** Ctor */
70     Product( const NVRAD & nvrad_r );
71     /** Dtor */
72     virtual ~Product();
73
74   private:
75     /** Access implementation */
76     virtual Impl & pimpl() = 0;
77     /** Access implementation */
78     virtual const Impl & pimpl() const = 0;
79   };
80
81   /////////////////////////////////////////////////////////////////
82 } // namespace zypp
83 ///////////////////////////////////////////////////////////////////
84 #endif // ZYPP_PRODUCT_H