sbuild-chroot-source.h

Go to the documentation of this file.
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_SOURCE_H
00020 #define SBUILD_CHROOT_SOURCE_H
00021 
00022 #include <sbuild/sbuild-chroot.h>
00023 
00024 namespace sbuild
00025 {
00026 
00042   class chroot_source : virtual public chroot
00043   {
00044   protected:
00046     chroot_source ();
00047 
00048     friend class chroot;
00049 
00050   public:
00052     virtual ~chroot_source ();
00053 
00059     virtual chroot::ptr
00060     clone_source () const = 0;
00061 
00062   protected:
00068     void
00069     clone_source_setup (chroot::ptr& clone) const;
00070 
00071   public:
00077     virtual string_list const&
00078     get_source_users () const;
00079 
00085     virtual void
00086     set_source_users (string_list const& users);
00087 
00093     virtual string_list const&
00094     get_source_groups () const;
00095 
00101     virtual void
00102     set_source_groups (string_list const& groups);
00103 
00111     virtual string_list const&
00112     get_source_root_users () const;
00113 
00121     virtual void
00122     set_source_root_users (string_list const& users);
00123 
00131     virtual string_list const&
00132     get_source_root_groups () const;
00133 
00141     virtual void
00142     set_source_root_groups (string_list const& groups);
00143 
00144     void
00145     setup_env (environment& env);
00146 
00147   protected:
00148     virtual session_flags
00149     get_session_flags () const;
00150 
00151     virtual void
00152     get_details (format_detail& detail) const;
00153 
00154     void
00155     get_keyfile (keyfile& keyfile) const;
00156 
00157     void
00158     set_keyfile (keyfile const& keyfile,
00159                  string_list&   used_keys);
00160 
00161   private:
00163     bool          is_source;
00165     string_list   source_users;
00167     string_list   source_groups;
00169     string_list   source_root_users;
00171     string_list   source_root_groups;
00172   };
00173 
00174 }
00175 
00176 #endif /* SBUILD_CHROOT_SOURCE_H */
00177 
00178 /*
00179  * Local Variables:
00180  * mode:C++
00181  * End:
00182  */

Generated on Sat Jul 5 11:58:45 2008 for sbuild by  doxygen 1.5.6