- Create the cache directly from the schema (installed) file.
[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     /** 
53      * Online updates for the product.
54      * They are complementary, not alternatives. #163192 
55      */
56     std::list<Url> updateUrls() const;
57
58     /** 
59      * Additional software for the product
60      * They are complementary, not alternatives.
61      */
62     std::list<Url> extraUrls() const;
63     
64     /** 
65      * Optional software for the product
66      * (for example. Non OSS repositories)
67      * They are complementary, not alternatives.
68      */
69     std::list<Url> optionalUrls() const;
70     
71     /** The product flags */
72     std::list<std::string> flags() const;
73
74     /** */
75     Label shortName() const;
76
77     /** */
78     Label longName() const;
79
80     /** Vendor specific distribution id. */
81     std::string distributionName() const;
82
83     /** Vendor specific distribution version. */
84     Edition distributionEdition() const;
85
86   protected:
87     /** Ctor */
88     Product( const NVRAD & nvrad_r );
89     /** Dtor */
90     virtual ~Product();
91
92   private:
93     /** Access implementation */
94     virtual Impl & pimpl() = 0;
95     /** Access implementation */
96     virtual const Impl & pimpl() const = 0;
97   };
98
99   /////////////////////////////////////////////////////////////////
100 } // namespace zypp
101 ///////////////////////////////////////////////////////////////////
102 #endif // ZYPP_PRODUCT_H