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_FILE_H 00021 #define SBUILD_CHROOT_FILE_H 00022 00023 #include "sbuild-chroot.h" 00024 #include "sbuild-chroot-source.h" 00025 00026 namespace sbuild 00027 { 00028 00038 class chroot_file : virtual public chroot, 00039 public chroot_source 00040 { 00041 protected: 00043 chroot_file (); 00044 00045 friend class chroot; 00046 00047 public: 00049 virtual ~chroot_file (); 00050 00051 virtual chroot::ptr 00052 clone () const; 00053 00054 virtual chroot::ptr 00055 clone_source () const; 00056 00062 std::string const& 00063 get_file () const; 00064 00070 void 00071 set_file (std::string const& file); 00072 00073 virtual std::string const& 00074 get_chroot_type () const; 00075 00076 virtual void 00077 setup_env (environment& env); 00078 00079 virtual void 00080 setup_lock (setup_type type, 00081 bool lock); 00082 00083 virtual session_flags 00084 get_session_flags () const; 00085 00086 protected: 00087 virtual void 00088 print_details (std::ostream& stream) const; 00089 00090 virtual void 00091 get_keyfile (keyfile& keyfile) const; 00092 00093 virtual void 00094 set_keyfile (keyfile const& keyfile); 00095 00096 private: 00098 std::string file; 00100 bool repack; 00101 }; 00102 00103 } 00104 00105 #endif /* SBUILD_CHROOT_FILE_H */ 00106 00107 /* 00108 * Local Variables: 00109 * mode:C++ 00110 * End: 00111 */