summaryrefslogtreecommitdiff
path: root/lib/sbuild/chroot/facet/plain.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sbuild/chroot/facet/plain.h')
-rw-r--r--lib/sbuild/chroot/facet/plain.h87
1 files changed, 46 insertions, 41 deletions
diff --git a/lib/sbuild/chroot/facet/plain.h b/lib/sbuild/chroot/facet/plain.h
index 98bf2abd..70c938ed 100644
--- a/lib/sbuild/chroot/facet/plain.h
+++ b/lib/sbuild/chroot/facet/plain.h
@@ -16,67 +16,72 @@
*
*********************************************************************/
-#ifndef SBUILD_CHROOT_PLAIN_H
-#define SBUILD_CHROOT_PLAIN_H
+#ifndef SBUILD_CHROOT_FACET_PLAIN_H
+#define SBUILD_CHROOT_FACET_PLAIN_H
-#include <sbuild/chroot/directory-base.h>
+#include <sbuild/config.h>
+#include <sbuild/chroot/facet/directory-base.h>
namespace sbuild
{
namespace chroot
{
-
- /**
- * A chroot located in the filesystem (scripts disabled).
- *
- * This doesn't run any setup scripts and doesn't provide any
- * session support. If you need any of these functions, the
- * directory chroot type is more suited to your needs.
- */
- class plain : public directory_base
+ namespace facet
{
- protected:
- /// The constructor.
- plain ();
- friend class chroot;
+ /**
+ * A chroot stored on an unmounted block device.
+ *
+ * The device will be mounted on demand.
+ */
+ class plain : public directory_base
+ {
+ public:
+ /// A shared_ptr to a chroot facet object.
+ typedef std::shared_ptr<plain> ptr;
+
+ /// A shared_ptr to a const chroot facet object.
+ typedef std::shared_ptr<const plain> const_ptr;
+
+ protected:
+ /// The constructor.
+ plain ();
- public:
- /// The destructor.
- virtual ~plain ();
+ /// The copy constructor.
+ plain (const plain& rhs);
- virtual chroot::ptr
- clone () const;
+ void
+ set_chroot (chroot& chroot);
- virtual chroot::ptr
- clone_session (std::string const& session_id,
- std::string const& alias,
- std::string const& user,
- bool root) const;
+ friend class chroot;
- virtual chroot::ptr
- clone_source () const;
+ public:
+ /// The destructor.
+ virtual ~plain ();
- virtual std::string
- get_path () const;
+ virtual std::string const&
+ get_name () const;
- virtual std::string const&
- get_chroot_type () const;
+ /**
+ * Create a chroot facet.
+ *
+ * @returns a shared_ptr to the new chroot facet.
+ */
+ static ptr
+ create ();
- virtual session_flags
- get_session_flags (chroot const& chroot) const;
+ virtual facet::ptr
+ clone () const;
- protected:
- virtual void
- setup_lock (chroot::setup_type type,
- bool lock,
- int status);
- };
+ virtual std::string
+ get_path () const;
+ };
+ }
}
}
-#endif /* SBUILD_CHROOT_PLAIN_H */
+#endif /* SBUILD_CHROOT_FACET_PLAIN_H */
/*
* Local Variables: