sbuild  1.7.1
session-clonable.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_SESSION_CLONABLE_H
20 #define SBUILD_CHROOT_FACET_SESSION_CLONABLE_H
21 
22 #include <sbuild/chroot/facet/facet.h>
23 
24 namespace sbuild
25 {
26  namespace chroot
27  {
28  namespace facet
29  {
30 
38  class session_clonable : public facet
39  {
40  public:
42  typedef std::shared_ptr<session_clonable> ptr;
43 
45  typedef std::shared_ptr<const session_clonable> const_ptr;
46 
47  private:
50 
51  public:
53  virtual ~session_clonable ();
54 
60  static ptr
61  create ();
62 
63  virtual facet::ptr
64  clone () const;
65 
66  virtual std::string const&
67  get_name () const;
68 
69  virtual session_flags
70  get_session_flags () const;
71 
81  virtual chroot::ptr
82  clone_session (const std::string& session_id,
83  const std::string& alias,
84  const std::string& user,
85  bool root) const;
86  };
87 
88  }
89  }
90 }
91 
92 #endif /* SBUILD_CHROOT_FACET_SESSION_CLONABLE_H */
93 
94 /*
95  * Local Variables:
96  * mode:C++
97  * End:
98  */