sbuild  1.7.1
directory-base.h
1 /* Copyright © 2005-2013 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_DIRECTORY_BASE_H
20 #define SBUILD_CHROOT_FACET_DIRECTORY_BASE_H
21 
22 #include <sbuild/chroot/chroot.h>
23 #include <sbuild/chroot/facet/facet.h>
24 #include <sbuild/chroot/facet/storage.h>
25 
26 namespace sbuild
27 {
28  namespace chroot
29  {
30  namespace facet
31  {
32 
45  class directory_base : public facet,
46  public storage
47  {
48  public:
51 
52  protected:
54  directory_base ();
55 
57  directory_base (const directory_base& rhs);
58 
59  friend class chroot;
60 
61  public:
63  virtual ~directory_base ();
64 
65  public:
71  std::string const&
72  get_directory () const;
73 
79  void
80  set_directory (const std::string& directory);
81 
82  virtual void
83  setup_env (environment& env) const;
84 
85  protected:
86  virtual void
87  get_details (format_detail& detail) const;
88 
89  virtual void
90  get_used_keys (string_list& used_keys) const;
91 
92  virtual void
93  get_keyfile (keyfile& keyfile) const;
94 
95  virtual void
96  set_keyfile (const keyfile& keyfile);
97 
99  std::string directory;
100  };
101 
102  }
103  }
104 }
105 
106 #endif /* SBUILD_CHROOT_FACET_DIRECTORY_BASE_H */
107 
108 /*
109  * Local Variables:
110  * mode:C++
111  * End:
112  */