sbuild
1.5.3
|
00001 /* Copyright © 2005-2012 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_CUSTOM_H 00020 #define SBUILD_CHROOT_CUSTOM_H 00021 00022 #include <sbuild/sbuild-chroot.h> 00023 00024 namespace sbuild 00025 { 00026 00037 class chroot_custom : public chroot 00038 { 00039 protected: 00041 chroot_custom (); 00042 00044 chroot_custom (const chroot_custom& rhs); 00045 00046 friend class chroot; 00047 00048 public: 00050 virtual ~chroot_custom (); 00051 00052 virtual chroot::ptr 00053 clone () const; 00054 00055 virtual chroot::ptr 00056 clone_session (std::string const& session_id, 00057 std::string const& alias, 00058 std::string const& user, 00059 bool root) const; 00060 00061 virtual chroot::ptr 00062 clone_source () const; 00063 00071 void 00072 set_session_cloneable (bool cloneable); 00073 00081 void 00082 set_session_purgeable (bool purgeable); 00083 00089 bool 00090 get_session_purgeable () const; 00091 00099 void 00100 set_source_cloneable (bool cloneable); 00101 00102 virtual void 00103 setup_env (chroot const& chroot, 00104 environment& env) const; 00105 00106 virtual std::string const& 00107 get_chroot_type () const; 00108 00109 std::string 00110 get_path () const; 00111 00112 virtual session_flags 00113 get_session_flags (chroot const& chroot) const; 00114 00115 protected: 00116 virtual void 00117 setup_lock (chroot::setup_type type, 00118 bool lock, 00119 int status); 00120 00121 virtual void 00122 get_details (chroot const& chroot, 00123 format_detail& detail) const; 00124 00125 virtual void 00126 get_keyfile (chroot const& chroot, 00127 keyfile& keyfile) const; 00128 00129 virtual void 00130 set_keyfile (chroot& chroot, 00131 keyfile const& keyfile, 00132 string_list& used_keys); 00133 00134 private: 00135 bool purgeable; 00136 }; 00137 00138 } 00139 00140 #endif /* SBUILD_CHROOT_CUSTOM_H */ 00141 00142 /* 00143 * Local Variables: 00144 * mode:C++ 00145 * End: 00146 */