00001 /* Copyright © 2005-2006 Roger Leigh <rleigh@debian.org> 00002 * 00003 * schroot is free software; you can redistribute it and/or modify it 00004 * under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation; either version 2 of the License, or 00006 * (at your option) any later version. 00007 * 00008 * schroot is distributed in the hope that it will be useful, but 00009 * WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00016 * MA 02111-1307 USA 00017 * 00018 *********************************************************************/ 00019 00020 #ifndef SBUILD_CHROOT_LVM_SNAPSHOT_H 00021 #define SBUILD_CHROOT_LVM_SNAPSHOT_H 00022 00023 #include <sbuild/sbuild-chroot-block-device.h> 00024 #include <sbuild/sbuild-chroot-source.h> 00025 00026 namespace sbuild 00027 { 00028 00034 class chroot_lvm_snapshot : public chroot_block_device, 00035 public chroot_source 00036 { 00037 protected: 00039 chroot_lvm_snapshot (); 00040 00041 friend class chroot; 00042 00043 public: 00045 virtual ~chroot_lvm_snapshot (); 00046 00047 virtual chroot::ptr 00048 clone () const; 00049 00050 virtual chroot::ptr 00051 clone_source () const; 00052 00059 std::string const& 00060 get_snapshot_device () const; 00061 00068 void 00069 set_snapshot_device (std::string const& snapshot_device); 00070 00071 virtual std::string const& 00072 get_mount_device () const; 00073 00080 std::string const& 00081 get_snapshot_options () const; 00082 00089 void 00090 set_snapshot_options (std::string const& snapshot_options); 00091 00092 virtual std::string const& 00093 get_chroot_type () const; 00094 00095 virtual void 00096 setup_env (environment& env); 00097 00098 virtual session_flags 00099 get_session_flags () const; 00100 00101 protected: 00102 virtual void 00103 setup_lock (chroot::setup_type type, 00104 bool lock, 00105 int status); 00106 00107 virtual void 00108 get_details (format_detail& detail) const; 00109 00110 virtual void 00111 get_keyfile (keyfile& keyfile) const; 00112 00113 virtual void 00114 set_keyfile (keyfile const& keyfile); 00115 00116 private: 00118 std::string snapshot_device; 00120 std::string snapshot_options; 00121 }; 00122 00123 } 00124 00125 #endif /* SBUILD_CHROOT_LVM_SNAPSHOT_H */ 00126 00127 /* 00128 * Local Variables: 00129 * mode:C++ 00130 * End: 00131 */