source: trunk/debathena/third/schroot/sbuild/sbuild-chroot-facet-session.h @ 24167

Revision 24167, 2.4 KB checked in by broder, 15 years ago (diff)
Import schroot upstream into subversion.
Line 
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_H
20#define SBUILD_CHROOT_FACET_SESSION_H
21
22#include <sbuild/sbuild-chroot-facet.h>
23#include <sbuild/sbuild-session.h>
24
25namespace sbuild
26{
27
28  /**
29   * Chroot support for sessions.
30   *
31   * A chroot may offer a "session" facet to signal restorable or
32   * parallel chroot environment usage.  The presence of this facet
33   * indicates that the chroot is an active session.
34   */
35  class chroot_facet_session : public chroot_facet
36  {
37  public:
38    /// A shared_ptr to a chroot facet object.
39    typedef std::tr1::shared_ptr<chroot_facet_session> ptr;
40
41    /// A shared_ptr to a const chroot facet object.
42    typedef std::tr1::shared_ptr<const chroot_facet_session> const_ptr;
43
44  private:
45    /// The constructor.
46    chroot_facet_session ();
47
48  public:
49    /// The destructor.
50    virtual ~chroot_facet_session ();
51
52    /**
53     * Create a chroot facet.
54     *
55     * @returns a shared_ptr to the new chroot facet.
56     */
57    static ptr
58    create ();
59
60    virtual chroot_facet::ptr
61    clone () const;
62
63    virtual std::string const&
64    get_name () const;
65
66    virtual void
67    setup_env (chroot const& chroot,
68               environment&  env) const;
69
70    virtual chroot::session_flags
71    get_session_flags (chroot const& chroot) const;
72
73    virtual void
74    get_details (chroot const&  chroot,
75                 format_detail& detail) const;
76
77    virtual void
78    get_keyfile (chroot const& chroot,
79                 keyfile&      keyfile) const;
80
81    virtual void
82    set_keyfile (chroot&        chroot,
83                 keyfile const& keyfile,
84                 string_list&   used_keys);
85
86  };
87
88}
89
90#endif /* SBUILD_CHROOT_FACET_SESSION_H */
91
92/*
93 * Local Variables:
94 * mode:C++
95 * End:
96 */
Note: See TracBrowser for help on using the repository browser.