sbuild-chroot-facet-union.h

Go to the documentation of this file.
00001 /* Copyright © 2008-2009  Jan-Marek Glogowski <glogow@fbihome.de>
00002  * Copyright © 2005-2009  Roger Leigh <rleigh@debian.org>
00003  *
00004  * schroot is free software: you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation, either version 3 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * schroot is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program.  If not, see
00016  * <http://www.gnu.org/licenses/>.
00017  *
00018  *********************************************************************/
00019 
00020 #ifndef SBUILD_CHROOT_FACET_UNION_H
00021 #define SBUILD_CHROOT_FACET_UNION_H
00022 
00023 #include <sbuild/sbuild-chroot-facet.h>
00024 
00025 namespace sbuild
00026 {
00027 
00037   class chroot_facet_union : public chroot_facet
00038   {
00039   public:
00041     enum error_code
00042       {
00043         UNION_TYPE_UNKNOWN, 
00044         UNION_OVERLAY_ABS,  
00045         UNION_UNDERLAY_ABS  
00046       };
00047 
00049     typedef custom_error<error_code> error;
00050 
00052     typedef std::tr1::shared_ptr<chroot_facet_union> ptr;
00053 
00055     typedef std::tr1::shared_ptr<const chroot_facet_union> const_ptr;
00056 
00057   private:
00059     chroot_facet_union ();
00060 
00061   public:
00063     virtual ~chroot_facet_union ();
00064 
00070     static ptr
00071     create ();
00072 
00073     virtual chroot_facet::ptr
00074     clone () const;
00075 
00076     std::string const&
00077     get_name () const;
00078 
00079     void
00080     clone_source_setup (chroot::ptr& clone) const;
00081 
00087     bool
00088     get_union_configured () const;
00089 
00096     virtual std::string const&
00097     get_union_type () const;
00098 
00106     virtual void
00107     set_union_type (std::string const& union_type);
00108 
00115     virtual std::string const&
00116     get_union_mount_options () const;
00117 
00130     virtual void
00131     set_union_mount_options (std::string const& union_mount_options);
00132 
00138     virtual std::string const&
00139     get_union_overlay_directory () const;
00140 
00146     virtual void
00147     set_union_overlay_directory (std::string const& directory);
00148 
00154     virtual std::string const&
00155     get_union_underlay_directory () const;
00156 
00162     virtual void
00163     set_union_underlay_directory (std::string const& directory);
00164 
00165     virtual void
00166     setup_env (chroot const& chroot,
00167                environment&  env) const;
00168 
00169     virtual chroot::session_flags
00170     get_session_flags (chroot const& chroot) const;
00171 
00172     virtual void
00173     get_details (chroot const&  chroot,
00174                  format_detail& detail) const;
00175 
00176     virtual void
00177     get_keyfile (chroot const& chroot,
00178                  keyfile&      keyfile) const;
00179 
00180     virtual void
00181     set_keyfile (chroot&        chroot,
00182                  keyfile const& keyfile,
00183                  string_list&   used_keys);
00184 
00185   private:
00187     std::string union_type;
00189     std::string union_mount_options;
00191     std::string union_overlay_directory;
00193     std::string union_underlay_directory;
00194   };
00195 
00196 }
00197 
00198 #endif /* SBUILD_CHROOT_FACET_UNION_H */
00199 
00200 /*
00201  * Local Variables:
00202  * mode:C++
00203  * End:
00204  */
Generated on Sat Jul 10 22:15:59 2010 for sbuild by  doxygen 1.6.3