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 | |
---|
25 | namespace sbuild |
---|
26 | { |
---|
27 | |
---|
28 | /** |
---|
29 | * A chroot located in the filesystem. |
---|
30 | * |
---|
31 | * It runs setup scripts and can provide multiple sessions |
---|
32 | * using the union facet. |
---|
33 | */ |
---|
34 | class chroot_directory : public chroot_directory_base |
---|
35 | { |
---|
36 | protected: |
---|
37 | /// The constructor. |
---|
38 | chroot_directory (); |
---|
39 | |
---|
40 | /// The copy constructor. |
---|
41 | chroot_directory (const chroot_directory& rhs); |
---|
42 | |
---|
43 | friend class chroot; |
---|
44 | |
---|
45 | public: |
---|
46 | /// The destructor. |
---|
47 | virtual ~chroot_directory (); |
---|
48 | |
---|
49 | virtual chroot::ptr |
---|
50 | clone () const; |
---|
51 | |
---|
52 | virtual chroot::ptr |
---|
53 | clone_session (std::string const& session_id, |
---|
54 | std::string const& user, |
---|
55 | bool root) const; |
---|
56 | |
---|
57 | virtual chroot::ptr |
---|
58 | clone_source () const; |
---|
59 | |
---|
60 | virtual std::string |
---|
61 | get_path () const; |
---|
62 | |
---|
63 | virtual void |
---|
64 | setup_env (chroot const& chroot, |
---|
65 | environment& env) const; |
---|
66 | |
---|
67 | virtual std::string const& |
---|
68 | get_chroot_type () const; |
---|
69 | |
---|
70 | virtual session_flags |
---|
71 | get_session_flags (chroot const& chroot) const; |
---|
72 | |
---|
73 | protected: |
---|
74 | virtual void |
---|
75 | setup_lock (chroot::setup_type type, |
---|
76 | bool lock, |
---|
77 | int status); |
---|
78 | |
---|
79 | virtual void |
---|
80 | get_details (chroot const& chroot, |
---|
81 | format_detail& detail) const; |
---|
82 | |
---|
83 | virtual void |
---|
84 | get_keyfile (chroot const& chroot, |
---|
85 | keyfile& keyfile) const; |
---|
86 | |
---|
87 | virtual void |
---|
88 | set_keyfile (chroot& chroot, |
---|
89 | keyfile const& keyfile, |
---|
90 | string_list& used_keys); |
---|
91 | }; |
---|
92 | |
---|
93 | } |
---|
94 | |
---|
95 | #endif /* SBUILD_CHROOT_DIRECTORY_H */ |
---|
96 | |
---|
97 | /* |
---|
98 | * Local Variables: |
---|
99 | * mode:C++ |
---|
100 | * End: |
---|
101 | */ |
---|