00001 /* sbuild-chroot-lvm-snapshot - sbuild chroot lvm snapshot object 00002 * 00003 * Copyright © 2005 Roger Leigh <rleigh@debian.org> 00004 * 00005 * schroot is free software; you can redistribute it and/or modify it 00006 * under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * schroot is distributed in the hope that it will be useful, but 00011 * WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00018 * MA 02111-1307 USA 00019 * 00020 *********************************************************************/ 00021 00022 #ifndef SBUILD_CHROOT_LVM_SNAPSHOT_H 00023 #define SBUILD_CHROOT_LVM_SNAPSHOT_H 00024 00025 #include "sbuild-chroot-block-device.h" 00026 00027 namespace sbuild 00028 { 00029 00034 class ChrootLvmSnapshot : public ChrootBlockDevice 00035 { 00036 public: 00038 ChrootLvmSnapshot(); 00039 00046 ChrootLvmSnapshot (const keyfile& keyfile, 00047 const std::string& group); 00048 00050 virtual ~ChrootLvmSnapshot(); 00051 00052 virtual Chroot * 00053 clone () const; 00054 00061 const std::string& 00062 get_snapshot_device () const; 00063 00070 void 00071 set_snapshot_device (const std::string& snapshot_device); 00072 00073 virtual const std::string& 00074 get_mount_device () const; 00075 00082 const std::string& 00083 get_snapshot_options () const; 00084 00091 void 00092 set_snapshot_options (const std::string& snapshot_options); 00093 00094 virtual const std::string& 00095 get_chroot_type () const; 00096 00097 virtual void 00098 setup_env (env_list& env); 00099 00100 virtual void 00101 setup_lock (SetupType type, 00102 bool lock); 00103 00104 virtual SessionFlags 00105 get_session_flags () const; 00106 00107 virtual void 00108 print_details (std::ostream& stream) const; 00109 00110 virtual void 00111 print_config (std::ostream& stream) const; 00112 00113 private: 00120 void 00121 read_keyfile (const keyfile& keyfile, 00122 const std::string& group); 00123 00129 void 00130 setup_session_info (bool start); 00131 00133 std::string snapshot_device; 00135 std::string snapshot_options; 00136 }; 00137 00138 } 00139 00140 #endif /* SBUILD_CHROOT_LVM_SNAPSHOT_H */ 00141 00142 /* 00143 * Local Variables: 00144 * mode:C++ 00145 * End: 00146 */