diff options
author | Roger Leigh <rleigh@debian.org> | 2013-04-21 10:15:15 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2013-04-21 15:36:50 +0100 |
commit | ed0051802fb800f7aaabe87be5d851a24fa6bddd (patch) | |
tree | 2a7a3f1e63834ec74988d4319873a5f9c02641b3 /lib | |
parent | 13eabc0b1de470cd83da598545521935e17e4faa (diff) | |
download | schroot-ed0051802fb800f7aaabe87be5d851a24fa6bddd.tar.gz |
sbuild: Add storage facet
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbuild/Makefile.am | 2 | ||||
-rw-r--r-- | lib/sbuild/chroot/facet/storage.cc | 43 | ||||
-rw-r--r-- | lib/sbuild/chroot/facet/storage.h | 69 |
3 files changed, 114 insertions, 0 deletions
diff --git a/lib/sbuild/Makefile.am b/lib/sbuild/Makefile.am index e3a281a4..2e1e77d9 100644 --- a/lib/sbuild/Makefile.am +++ b/lib/sbuild/Makefile.am @@ -32,6 +32,7 @@ lib_sbuild_public_h_sources = \ lib/sbuild/chroot/facet/session-clonable.h \ lib/sbuild/chroot/facet/source.h \ lib/sbuild/chroot/facet/source-clonable.h \ + lib/sbuild/chroot/facet/storage.h \ lib/sbuild/chroot/facet/userdata.h \ lib/sbuild/chroot/file.h \ lib/sbuild/chroot/plain.h \ @@ -117,6 +118,7 @@ lib_sbuild_public_cc_sources = \ lib/sbuild/chroot/facet/session-clonable.cc \ lib/sbuild/chroot/facet/source.cc \ lib/sbuild/chroot/facet/source-clonable.cc \ + lib/sbuild/chroot/facet/storage.cc \ lib/sbuild/chroot/facet/userdata.cc \ lib/sbuild/chroot/file.cc \ lib/sbuild/chroot/plain.cc \ diff --git a/lib/sbuild/chroot/facet/storage.cc b/lib/sbuild/chroot/facet/storage.cc new file mode 100644 index 00000000..2ad6e4f1 --- /dev/null +++ b/lib/sbuild/chroot/facet/storage.cc @@ -0,0 +1,43 @@ +/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org> + * + * schroot is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * schroot is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * + *********************************************************************/ + +#include <config.h> + +#include <sbuild/chroot/facet/storage.h> + +using namespace sbuild; + +namespace sbuild +{ + namespace chroot + { + namespace facet + { + + storage::storage (): + facet() + { + } + + storage::~storage () + { + } + + } + } +} diff --git a/lib/sbuild/chroot/facet/storage.h b/lib/sbuild/chroot/facet/storage.h new file mode 100644 index 00000000..ddcc166f --- /dev/null +++ b/lib/sbuild/chroot/facet/storage.h @@ -0,0 +1,69 @@ +/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org> + * + * schroot is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * schroot is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * + *********************************************************************/ + +#ifndef SBUILD_CHROOT_FACET_STORAGE_H +#define SBUILD_CHROOT_FACET_STORAGE_H + +#include <sbuild/chroot/chroot.h> +#include <sbuild/chroot/facet/facet.h> + +#include <string> + +namespace sbuild +{ + namespace chroot + { + namespace facet + { + + /** + * Chroot storage. This base class is used by all facets + * implementing storage methods, for example directories, LVM + * snapshots, files, etc. + */ + class storage : public facet + { + public: + /// A shared_ptr to a chroot storage object. + typedef std::shared_ptr<storage> ptr; + + /// A shared_ptr to a const chroot storage object. + typedef std::shared_ptr<const storage> const_ptr; + + protected: + /// The constructor. + storage(); + + friend class ::sbuild::chroot::chroot; + + public: + /// The destructor. + virtual ~storage (); + }; + + } + } +} + +#endif /* SBUILD_CHROOT_FACET_STORAGE_H */ + +/* + * Local Variables: + * mode:C++ + * End: + */ |