sbuild  1.6.10
sbuild-chroot-plain.h
1 /* Copyright © 2005-2007 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_PLAIN_H
20 #define SBUILD_CHROOT_PLAIN_H
21 
22 #include <sbuild/sbuild-chroot-directory-base.h>
23 
24 namespace sbuild
25 {
26 
35  {
36  protected:
38  chroot_plain ();
39 
40  friend class chroot;
41 
42  public:
44  virtual ~chroot_plain ();
45 
46  virtual chroot::ptr
47  clone () const;
48 
49  virtual chroot::ptr
50  clone_session (std::string const& session_id,
51  std::string const& alias,
52  std::string const& user,
53  bool root) const;
54 
55  virtual chroot::ptr
56  clone_source () const;
57 
58  virtual std::string
59  get_path () const;
60 
61  virtual std::string const&
62  get_chroot_type () const;
63 
64  virtual session_flags
65  get_session_flags (chroot const& chroot) const;
66 
67  protected:
68  virtual void
70  bool lock,
71  int status);
72  };
73 
74 }
75 
76 #endif /* SBUILD_CHROOT_PLAIN_H */
77 
78 /*
79  * Local Variables:
80  * mode:C++
81  * End:
82  */
virtual ~chroot_plain()
The destructor.
Definition: sbuild-chroot-plain.cc:43
virtual std::string get_path() const
Get the path to the chroot.
Definition: sbuild-chroot-plain.cc:77
Debian source builder components.
Definition: sbuild-auth-null.h:24
A chroot located in the filesystem (scripts disabled).
Definition: sbuild-chroot-plain.h:34
Advisory locking.
Definition: sbuild-lock.h:38
virtual std::string const & get_chroot_type() const
Get the type of the chroot.
Definition: sbuild-chroot-plain.cc:69
virtual chroot::ptr clone_session(std::string const &session_id, std::string const &alias, std::string const &user, bool root) const
Create a session chroot.
Definition: sbuild-chroot-plain.cc:54
virtual chroot::ptr clone() const
Copy the chroot.
Definition: sbuild-chroot-plain.cc:48
session_flags get_session_flags() const
Get the session flags of the chroot.
Definition: sbuild-chroot.cc:638
chroot_plain()
The constructor.
Definition: sbuild-chroot-plain.cc:35
session_flags
Chroot session properties.
Definition: sbuild-chroot.h:57
setup_type
Type of setup to perform.
Definition: sbuild-chroot.h:49
Common chroot data.
Definition: sbuild-chroot.h:45
virtual void setup_lock(chroot::setup_type type, bool lock, int status)
Unlock a chroot during setup.
Definition: sbuild-chroot-plain.cc:83
virtual chroot::ptr clone_source() const
Create a source chroot.
Definition: sbuild-chroot-plain.cc:63
A base class for chroots located in a local directory.
Definition: sbuild-chroot-directory-base.h:39
std::shared_ptr< chroot > ptr
A shared_ptr to a chroot object.
Definition: sbuild-chroot.h:105