1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Product.h
12 #ifndef ZYPP_PRODUCT_H
13 #define ZYPP_PRODUCT_H
18 #include "zypp/ResObject.h"
20 ///////////////////////////////////////////////////////////////////
22 { /////////////////////////////////////////////////////////////////
24 DEFINE_PTR_TYPE(Product);
26 ///////////////////////////////////////////////////////////////////
28 // CLASS NAME : Product
30 /** Product interface.
32 class Product : public ResObject
36 typedef ResTraits<Self> TraitsType;
37 typedef TraitsType::PtrType Ptr;
38 typedef TraitsType::constPtrType constPtr;
41 /** The reference package providing the product metadata,
42 * if such a package exists.
44 sat::Solvable referencePackage() const;
48 typedef std::vector<constPtr> ReplacedProducts;
50 /** Array of \b installed Products that would be replaced by
51 * installing this one.
53 ReplacedProducts replacedProducts() const;
56 /** Untranslated short name like <tt>SLES 10</tt>*/
57 std::string shortName() const;
59 /** The product flavor (LiveCD Demo, FTP edition,...). */
60 std::string flavor() const;
62 /** Get the product type (base, add-on)
63 * Well, in an ideal world there is only one base product.
64 * It's the installed product denoted by a symlink in
67 std::string type() const;
69 /** The URL to download the release notes for this product */
70 Url releaseNotesUrl() const;
73 * Online updates for the product.
74 * They are complementary, not alternatives. #163192
76 std::list<Url> updateUrls() const;
79 * Additional software for the product
80 * They are complementary, not alternatives.
82 std::list<Url> extraUrls() const;
85 * Optional software for the product
86 * (for example. Non OSS repositories)
87 * They are complementary, not alternatives.
89 std::list<Url> optionalUrls() const;
91 /** The product flags */
92 std::list<std::string> flags() const;
94 /** Translated long name like <tt>SUSE Linux Enterprise Server 10</tt>
95 * \deprecated use summary.
97 std::string longName( const Locale & lang_r = Locale() ) const ZYPP_DEPRECATED
98 { return summary( lang_r ); }
100 /** Vendor specific distribution id.
101 * \deprecated replaced by ResObject::distribution
103 std::string distributionName() const ZYPP_DEPRECATED;
105 /** Vendor specific distribution version.
106 * \deprecated replaced by ResObject::distribution
108 Edition distributionEdition() const ZYPP_DEPRECATED;
111 friend Ptr make<Self>( const sat::Solvable & solvable_r );
113 Product( const sat::Solvable & solvable_r );
118 /////////////////////////////////////////////////////////////////
120 ///////////////////////////////////////////////////////////////////
121 #endif // ZYPP_PRODUCT_H