00001 /* Copyright © 2005-2008 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 3 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, see 00015 * <http://www.gnu.org/licenses/>. 00016 * 00017 *********************************************************************/ 00018 00019 #ifndef SBUILD_CHROOT_FILE_H 00020 #define SBUILD_CHROOT_FILE_H 00021 00022 #include <sbuild/sbuild-chroot.h> 00023 #include <sbuild/sbuild-chroot-source.h> 00024 00025 namespace sbuild 00026 { 00027 00032 class chroot_file : virtual public chroot, 00033 public chroot_source 00034 { 00035 protected: 00037 chroot_file (); 00038 00039 friend class chroot; 00040 00041 public: 00043 virtual ~chroot_file (); 00044 00045 virtual chroot::ptr 00046 clone () const; 00047 00048 virtual chroot::ptr 00049 clone_source () const; 00050 00056 std::string const& 00057 get_file () const; 00058 00064 void 00065 set_file (std::string const& file); 00066 00073 bool 00074 get_file_repack () const; 00075 00083 void 00084 set_file_repack (bool repack); 00085 00086 virtual std::string const& 00087 get_chroot_type () const; 00088 00089 virtual void 00090 setup_env (environment& env); 00091 00092 virtual session_flags 00093 get_session_flags () const; 00094 00095 protected: 00096 virtual void 00097 setup_lock (chroot::setup_type type, 00098 bool lock, 00099 int status); 00100 00101 virtual void 00102 get_details (format_detail& detail) const; 00103 00104 virtual void 00105 get_keyfile (keyfile& keyfile) const; 00106 00107 virtual void 00108 set_keyfile (keyfile const& keyfile, 00109 string_list& used_keys); 00110 00111 private: 00113 std::string file; 00115 bool repack; 00116 }; 00117 00118 } 00119 00120 #endif /* SBUILD_CHROOT_FILE_H */ 00121 00122 /* 00123 * Local Variables: 00124 * mode:C++ 00125 * End: 00126 */