Deprecate MediaAccess::downloads (accidentally deleted)
[platform/upstream/libzypp.git] / zypp / Pattern.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/Pattern.h
10  *
11 */
12 #ifndef ZYPP_PATTERN_H
13 #define ZYPP_PATTERN_H
14
15 #include "zypp/ResObject.h"
16 #include "zypp/Pathname.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   DEFINE_PTR_TYPE(Pattern);
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    CLASS NAME : Pattern
27   //
28   /** Pattern interface.
29   */
30   class Pattern : public ResObject
31   {
32     public:
33       typedef Pattern                  Self;
34       typedef ResTraits<Self>          TraitsType;
35       typedef TraitsType::PtrType      Ptr;
36       typedef TraitsType::constPtrType constPtr;
37
38     public:
39       typedef sat::ArrayAttr<IdString,IdString> NameList;
40       typedef sat::SolvableSet                  Contents;
41
42     public:
43       /** */
44       bool isDefault() const;
45       /** */
46       bool userVisible() const;
47       /** */
48       std::string category( const Locale & lang_r = Locale() ) const;
49       /** */
50       Pathname icon() const;
51       /** */
52       Pathname script() const;
53       /** */
54       std::string order() const;
55
56     public:
57       /** Ui hint: included patterns. */
58       NameList includes() const;
59
60       /** Ui hint: patterns this one extends. */
61       NameList extends() const;
62
63       /** Ui hint: Required Packages. */
64       Contents core() const;
65
66       /** Ui hint: Dependent packages.
67        * This also includes recommended and suugested packages.
68       */
69       Contents depends() const;
70
71       /** The collection of packages associated with this pattern.
72        * This also evaluates the patterns includes/extends relation.
73        */
74       Contents contents() const;
75
76     protected:
77       friend Ptr make<Self>( const sat::Solvable & solvable_r );
78       /** Ctor */
79       Pattern( const sat::Solvable & solvable_r );
80       /** Dtor */
81       virtual ~Pattern();
82   };
83   ///////////////////////////////////////////////////////////////////
84
85   /////////////////////////////////////////////////////////////////
86 } // namespace zypp
87 ///////////////////////////////////////////////////////////////////
88 #endif // ZYPP_PATTERN_H