sbuild  1.6.4
sbuild-chroot-directory.h
1 /* Copyright © 2005-2008 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_DIRECTORY_H
20 #define SBUILD_CHROOT_DIRECTORY_H
21 
22 #include <sbuild/sbuild-config.h>
23 #include <sbuild/sbuild-chroot-directory-base.h>
24 #include <sbuild/sbuild-chroot-btrfs-snapshot.h>
25 
26 namespace sbuild
27 {
28 
36  {
37  protected:
40 
43 
44 #ifdef SBUILD_FEATURE_BTRFSSNAP
45 
47 #endif
48 
49  friend class chroot;
50 #ifdef SBUILD_FEATURE_BTRFSSNAP
51  friend class chroot_btrfs_snapshot;
52 #endif
53 
54  public:
56  virtual ~chroot_directory ();
57 
58  virtual chroot::ptr
59  clone () const;
60 
61  virtual chroot::ptr
62  clone_session (std::string const& session_id,
63  std::string const& alias,
64  std::string const& user,
65  bool root) const;
66 
67  virtual chroot::ptr
68  clone_source () const;
69 
70  virtual std::string
71  get_path () const;
72 
73  virtual void
74  setup_env (chroot const& chroot,
75  environment& env) const;
76 
77  virtual std::string const&
78  get_chroot_type () const;
79 
80  virtual session_flags
81  get_session_flags (chroot const& chroot) const;
82 
83  protected:
84  virtual void
86  bool lock,
87  int status);
88 
89  virtual void
90  get_details (chroot const& chroot,
91  format_detail& detail) const;
92 
93  virtual void
94  get_keyfile (chroot const& chroot,
95  keyfile& keyfile) const;
96 
97  virtual void
98  set_keyfile (chroot& chroot,
99  keyfile const& keyfile,
100  string_list& used_keys);
101  };
102 
103 }
104 
105 #endif /* SBUILD_CHROOT_DIRECTORY_H */
106 
107 /*
108  * Local Variables:
109  * mode:C++
110  * End:
111  */