sbuild  1.6.10
sbuild-chroot-facet-session-clonable.h
1 /* Copyright © 2005-2009 Roger Leigh <rleigh@debian.org>
2  *
3  * schroot is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * schroot is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see
15  * <http://www.gnu.org/licenses/>.
16  *
17  *********************************************************************/
18 
19 #ifndef SBUILD_CHROOT_FACET_SESSION_CLONABLE_H
20 #define SBUILD_CHROOT_FACET_SESSION_CLONABLE_H
21 
22 #include <sbuild/sbuild-chroot-facet.h>
23 
24 namespace sbuild
25 {
26 
35  {
36  public:
38  typedef std::shared_ptr<chroot_facet_session_clonable> ptr;
39 
41  typedef std::shared_ptr<const chroot_facet_session_clonable> const_ptr;
42 
43  private:
46 
47  public:
50 
56  static ptr
57  create ();
58 
59  virtual chroot_facet::ptr
60  clone () const;
61 
62  virtual std::string const&
63  get_name () const;
64 
74  virtual void
75  clone_session_setup (chroot const& parent,
77  std::string const& session_id,
78  std::string const& alias,
79  std::string const& user,
80  bool root) const;
81 
82  virtual void
83  setup_env (chroot const& chroot,
84  environment& env) const;
85 
86  virtual chroot::session_flags
87  get_session_flags (chroot const& chroot) const;
88 
89  virtual void
90  get_details (chroot const& chroot,
91  format_detail& detail) const;
92 
93  virtual void
94  get_keyfile (chroot const& chroot,
95  keyfile& keyfile) const;
96 
97  virtual void
99  keyfile const& keyfile,
100  string_list& used_keys);
101  };
102 
103 }
104 
105 #endif /* SBUILD_CHROOT_FACET_SESSION_CLONABLE_H */
106 
107 /*
108  * Local Variables:
109  * mode:C++
110  * End:
111  */
virtual chroot_facet::ptr clone() const
Copy the chroot facet.
Definition: sbuild-chroot-facet-session-clonable.cc:68
Debian source builder components.
Definition: sbuild-auth-null.h:24
virtual ~chroot_facet_session_clonable()
The destructor.
Definition: sbuild-chroot-facet-session-clonable.cc:57
virtual void set_keyfile(chroot &chroot, keyfile const &keyfile, string_list &used_keys)
Set the chroot properties from a keyfile.
Definition: sbuild-chroot-facet-session-clonable.cc:244
Container of environment variables.
Definition: sbuild-environment.h:38
virtual void get_keyfile(chroot const &chroot, keyfile &keyfile) const
Copy the chroot properties into a keyfile.
Definition: sbuild-chroot-facet-session-clonable.cc:238
Configuration file parser.
Definition: sbuild-basic-keyfile.h:138
std::vector< std::string > string_list
A string vector.
Definition: sbuild-types.h:38
virtual void clone_session_setup(chroot const &parent, chroot::ptr &clone, std::string const &session_id, std::string const &alias, std::string const &user, bool root) const
Set the defaults in the cloned session chroot.
Definition: sbuild-chroot-facet-session-clonable.cc:82
std::shared_ptr< chroot_facet_session_clonable > ptr
A shared_ptr to a chroot facet object.
Definition: sbuild-chroot-facet-session-clonable.h:38
static ptr create()
Create a chroot facet.
Definition: sbuild-chroot-facet-session-clonable.cc:62
session_flags
Chroot session properties.
Definition: sbuild-chroot.h:57
std::shared_ptr< chroot_facet > ptr
A shared_ptr to a chroot facet object.
Definition: sbuild-chroot-facet.h:44
Format names and values for output.
Definition: sbuild-format-detail.h:38
virtual std::string const & get_name() const
Get the name of the chroot facet.
Definition: sbuild-chroot-facet-session-clonable.cc:74
Common chroot data.
Definition: sbuild-chroot.h:45
std::shared_ptr< const chroot_facet_session_clonable > const_ptr
A shared_ptr to a const chroot facet object.
Definition: sbuild-chroot-facet-session-clonable.h:41
virtual void get_details(chroot const &chroot, format_detail &detail) const
Get detailed information about the chroot for output.
Definition: sbuild-chroot-facet-session-clonable.cc:232
virtual void setup_env(chroot const &chroot, environment &env) const
Set environment.
Definition: sbuild-chroot-facet-session-clonable.cc:220
Common chroot data.
Definition: sbuild-chroot-facet.h:40
std::shared_ptr< chroot > ptr
A shared_ptr to a chroot object.
Definition: sbuild-chroot.h:105
chroot_facet_session_clonable()
The constructor.
Definition: sbuild-chroot-facet-session-clonable.cc:52
virtual chroot::session_flags get_session_flags(chroot const &chroot) const
Get the session flags of the chroot.
Definition: sbuild-chroot-facet-session-clonable.cc:226
Chroot support for creation of sessions.
Definition: sbuild-chroot-facet-session-clonable.h:34