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 session_flags 00080 get_session_flags () const; 00081 00082 protected: 00083 virtual void 00084 setup_lock (setup_type type, 00085 bool lock, 00086 int status); 00087 00088 virtual void 00089 print_details (std::ostream& stream) const; 00090 00091 virtual void 00092 get_keyfile (keyfile& keyfile) const; 00093 00094 virtual void 00095 set_keyfile (keyfile const& keyfile); 00096 00097 private: 00099 std::string file; 00101 bool repack; 00102 }; 00103 00104 } 00105 00106 #endif /* SBUILD_CHROOT_FILE_H */ 00107 00108 /* 00109 * Local Variables: 00110 * mode:C++ 00111 * End: 00112 */