sbuild  1.7.1
source-clonable.h
1 /* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
2  *
3  * schroot is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * schroot is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see
15  * <http://www.gnu.org/licenses/>.
16  *
17  *********************************************************************/
18 
19 #ifndef SBUILD_CHROOT_FACET_SOURCE_CLONABLE_H
20 #define SBUILD_CHROOT_FACET_SOURCE_CLONABLE_H
21 
22 #include <sbuild/chroot/facet/facet.h>
23 
24 namespace sbuild
25 {
26  namespace chroot
27  {
28  namespace facet
29  {
30 
39  class source_clonable : public facet
40  {
41  public:
43  typedef std::shared_ptr<source_clonable> ptr;
44 
46  typedef std::shared_ptr<const source_clonable> const_ptr;
47 
48  private:
50  source_clonable ();
51 
52  public:
54  virtual ~source_clonable ();
55 
61  static ptr
62  create ();
63 
64  virtual facet::ptr
65  clone () const;
66 
67  virtual std::string const&
68  get_name () const;
69 
75  virtual chroot::ptr
76  clone_source () const;
77 
84  virtual bool
85  get_source_clone () const;
86 
93  virtual void
94  set_source_clone (bool clone);
95 
101  virtual string_list const&
102  get_source_users () const;
103 
109  virtual void
110  set_source_users (const string_list& users);
111 
117  virtual string_list const&
118  get_source_groups () const;
119 
125  virtual void
126  set_source_groups (const string_list& groups);
127 
135  virtual string_list const&
136  get_source_root_users () const;
137 
145  virtual void
146  set_source_root_users (const string_list& users);
147 
155  virtual string_list const&
156  get_source_root_groups () const;
157 
165  virtual void
166  set_source_root_groups (const string_list& groups);
167 
168  virtual session_flags
169  get_session_flags () const;
170 
171  virtual void
172  get_details (format_detail& detail) const;
173 
174  virtual void
175  get_used_keys (string_list& used_keys) const;
176 
177  virtual void
178  get_keyfile (keyfile& keyfile) const;
179 
180  virtual void
181  set_keyfile (const keyfile& keyfile);
182 
183  private:
194  };
195 
196  }
197  }
198 }
199 
200 #endif /* SBUILD_CHROOT_FACET_SOURCE_CLONABLE_H */
201 
202 /*
203  * Local Variables:
204  * mode:C++
205  * End:
206  */