sbuild  1.6.4
sbuild-chroot-lvm-snapshot.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_LVM_SNAPSHOT_H
20 #define SBUILD_CHROOT_LVM_SNAPSHOT_H
21 
22 #include <sbuild/sbuild-chroot-block-device-base.h>
23 
24 namespace sbuild
25 {
26 
33  {
34  protected:
37 
40 
41  friend class chroot;
42 
43  public:
45  virtual ~chroot_lvm_snapshot ();
46 
47  virtual chroot::ptr
48  clone () const;
49 
50  virtual chroot::ptr
51  clone_session (std::string const& session_id,
52  std::string const& alias,
53  std::string const& user,
54  bool root) const;
55 
56  virtual chroot::ptr
57  clone_source () const;
58 
65  std::string const&
66  get_snapshot_device () const;
67 
74  void
75  set_snapshot_device (std::string const& snapshot_device);
76 
83  std::string const&
84  get_snapshot_options () const;
85 
92  void
93  set_snapshot_options (std::string const& snapshot_options);
94 
95  virtual std::string const&
96  get_chroot_type () const;
97 
98  virtual void
99  setup_env (chroot const& chroot,
100  environment& env) const;
101 
102  virtual session_flags
103  get_session_flags (chroot const& chroot) const;
104 
105  protected:
106  virtual void
108  bool lock,
109  int status);
110 
111  virtual void
112  get_details (chroot const& chroot,
113  format_detail& detail) const;
114 
115  virtual void
116  get_keyfile (chroot const& chroot,
117  keyfile& keyfile) const;
118 
119  virtual void
120  set_keyfile (chroot& chroot,
121  keyfile const& keyfile,
122  string_list& used_keys);
123 
124  private:
126  std::string snapshot_device;
128  std::string snapshot_options;
129  };
130 
131 }
132 
133 #endif /* SBUILD_CHROOT_LVM_SNAPSHOT_H */
134 
135 /*
136  * Local Variables:
137  * mode:C++
138  * End:
139  */