paludis  Version 2.6.0
create_output_manager_info.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2009, 2010, 2011 Ciaran McCreesh
5  *
6  * This file is part of the Paludis package manager. Paludis is free software;
7  * you can redistribute it and/or modify it under the terms of the GNU General
8  * Public License version 2, as published by the Free Software Foundation.
9  *
10  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17  * Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #ifndef PALUDIS_GUARD_PALUDIS_CREATE_OUTPUT_MANAGER_INFO_HH
21 #define PALUDIS_GUARD_PALUDIS_CREATE_OUTPUT_MANAGER_INFO_HH 1
22 
23 #include <paludis/create_output_manager_info-fwd.hh>
24 #include <paludis/util/pimp.hh>
25 #include <paludis/util/visitor.hh>
27 #include <paludis/util/type_list.hh>
30 #include <paludis/serialise-fwd.hh>
31 #include <paludis/action-fwd.hh>
32 #include <paludis/name-fwd.hh>
33 
34 namespace paludis
35 {
36  /**
37  * Information for Environment::create_output_manager.
38  *
39  * \since 0.36
40  * \ingroup g_environment
41  * \see Environment::create_output_manager
42  */
44  public virtual DeclareAbstractAcceptMethods<CreateOutputManagerInfo, MakeTypeList<
45  CreateOutputManagerForPackageIDActionInfo,
46  CreateOutputManagerForRepositorySyncInfo
47  >::Type>
48  {
49  public:
50  static const std::shared_ptr<CreateOutputManagerInfo> deserialise(
51  Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
52 
53  virtual void serialise(Serialiser &) const = 0;
54  };
55 
56  /**
57  * Information for Environment::create_output_manager, if we're performing a
58  * PackageID action.
59  *
60  * \since 0.36
61  * \ingroup g_environment
62  * \see Environment::create_output_manager
63  */
66  public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForPackageIDActionInfo>
67  {
68  private:
70 
71  public:
72  /**
73  * \since 0.46
74  */
76  const std::shared_ptr<const PackageID> & id,
77  const std::string & action_name,
78  const std::shared_ptr<const Set<std::string> > & action_flags,
79  const OutputExclusivity output_exclusivity,
80  const ClientOutputFeatures & output_features);
81 
82  /**
83  * \since 0.46
84  */
86  const std::shared_ptr<const PackageID> & id,
87  const Action &,
88  const OutputExclusivity output_exclusivity,
89  const ClientOutputFeatures & output_features);
90 
92 
93  const std::shared_ptr<const PackageID> package_id() const PALUDIS_ATTRIBUTE((warn_unused_result));
94 
95  /**
96  * \since 0.44
97  */
98  const std::string action_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
99 
100  /**
101  * \since 0.44
102  */
103  const std::shared_ptr<const Set<std::string> > action_flags() const PALUDIS_ATTRIBUTE((warn_unused_result));
104 
105  OutputExclusivity output_exclusivity() const PALUDIS_ATTRIBUTE((warn_unused_result));
106 
107  /**
108  * \since 0.46
109  */
110  const ClientOutputFeatures client_output_features() const PALUDIS_ATTRIBUTE((warn_unused_result));
111 
112  virtual void serialise(Serialiser &) const;
113 
114  static const std::shared_ptr<CreateOutputManagerForPackageIDActionInfo> deserialise(
115  Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
116  };
117 
118  /**
119  * Information for Environment::create_output_manager, if we're performing a
120  * Repository sync.
121  *
122  * \since 0.36
123  * \ingroup g_environment
124  * \see Environment::create_output_manager
125  */
128  public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForRepositorySyncInfo>
129  {
130  private:
132 
133  public:
134  /**
135  * \since 0.46
136  */
138  const RepositoryName & repo_name,
139  const OutputExclusivity,
140  const ClientOutputFeatures &);
141 
143 
144  /**
145  * \since 0.44
146  */
147  const RepositoryName repository_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
148 
149  OutputExclusivity output_exclusivity() const PALUDIS_ATTRIBUTE((warn_unused_result));
150 
151  /**
152  * \since 0.46
153  */
154  const ClientOutputFeatures client_output_features() const PALUDIS_ATTRIBUTE((warn_unused_result));
155 
156  virtual void serialise(Serialiser &) const;
157 
158  static const std::shared_ptr<CreateOutputManagerForRepositorySyncInfo> deserialise(
159  Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
160  };
161 }
162 
163 #endif
Definition: pimp.hh:51
Definition: about_metadata-fwd.hh:23
Definition: visitor-fwd.hh:52
Definition: serialise.hh:70
OutputExclusivity
Definition: create_output_manager_info-fwd.hh:14
Definition: create_output_manager_info.hh:126
Definition: serialise.hh:101
Definition: create_output_manager_info.hh:64
Definition: action.hh:268
Definition: set-fwd.hh:35
Definition: wrapped_value-fwd.hh:29
Definition: options-fwd.hh:34
Definition: visitor-fwd.hh:49
Definition: create_output_manager_info.hh:43
#define PALUDIS_ATTRIBUTE(x)
Definition: attributes.hh:53
#define PALUDIS_VISIBLE
Definition: attributes.hh:59