sbuild  1.6.10
sbuild-chroot-directory-base.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_DIRECTORY_BASE_H
20 #define SBUILD_CHROOT_DIRECTORY_BASE_H
21 
22 #include <sbuild/sbuild-chroot.h>
23 
24 namespace sbuild
25 {
26 
40  {
41  protected:
44 
47 
49  chroot_directory_base (const chroot& rhs);
50 
51  friend class chroot;
52 
53  public:
55  virtual ~chroot_directory_base ();
56 
62  std::string const&
63  get_directory () const;
64 
70  void
71  set_directory (std::string const& directory);
72 
73  virtual void
74  setup_env (chroot const& chroot,
75  environment& env) const;
76 
77  protected:
78  virtual void
79  get_details (chroot const& chroot,
80  format_detail& detail) const;
81 
82  virtual void
83  get_keyfile (chroot const& chroot,
84  keyfile& keyfile) const;
85 
86  virtual void
87  set_keyfile (chroot& chroot,
88  keyfile const& keyfile,
89  string_list& used_keys);
90 
91  private:
93  std::string directory;
94  };
95 
96 }
97 
98 #endif /* SBUILD_CHROOT_DIRECTORY_BASE_H */
99 
100 /*
101  * Local Variables:
102  * mode:C++
103  * End:
104  */
Debian source builder components.
Definition: sbuild-auth-null.h:24
Container of environment variables.
Definition: sbuild-environment.h:38
Configuration file parser.
Definition: sbuild-basic-keyfile.h:138
virtual void get_keyfile(chroot const &chroot, keyfile &keyfile) const
Copy the chroot properties into a keyfile.
Definition: sbuild-chroot-directory-base.cc:90
virtual void set_keyfile(chroot &chroot, keyfile const &keyfile, string_list &used_keys)
Set the chroot properties from a keyfile.
Definition: sbuild-chroot-directory-base.cc:100
virtual void get_details(chroot const &chroot, format_detail &detail) const
Get detailed information about the chroot for output.
Definition: sbuild-chroot-directory-base.cc:81
std::vector< std::string > string_list
A string vector.
Definition: sbuild-types.h:38
std::string directory
The directory to use.
Definition: sbuild-chroot-directory-base.h:93
Format names and values for output.
Definition: sbuild-format-detail.h:38
virtual void setup_env(chroot const &chroot, environment &env) const
Set environment.
Definition: sbuild-chroot-directory-base.cc:72
Common chroot data.
Definition: sbuild-chroot.h:45
std::string const & get_directory() const
Get the directory containing the chroot.
Definition: sbuild-chroot-directory-base.cc:57
A base class for chroots located in a local directory.
Definition: sbuild-chroot-directory-base.h:39
chroot_directory_base()
The constructor.
Definition: sbuild-chroot-directory-base.cc:34
void set_directory(std::string const &directory)
Set the directory containing the chroot.
Definition: sbuild-chroot-directory-base.cc:63
virtual ~chroot_directory_base()
The destructor.
Definition: sbuild-chroot-directory-base.cc:52