Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
ostree_dir_repo.h
1 #ifndef SOTA_CLIENT_TOOLS_OSTREE_DIR_REPO_H_
2 #define SOTA_CLIENT_TOOLS_OSTREE_DIR_REPO_H_
3 
4 #include <boost/filesystem.hpp>
5 
6 #include "ostree_ref.h"
7 #include "ostree_repo.h"
8 
9 class OSTreeDirRepo : public OSTreeRepo {
10  public:
11  explicit OSTreeDirRepo(boost::filesystem::path root_path) : root_(std::move(root_path)) {}
12  ~OSTreeDirRepo() override = default;
13 
14  bool LooksValid() const override;
15  OSTreeRef GetRef(const std::string& refname) const override;
16  boost::filesystem::path root() const override { return root_; }
17 
18  private:
19  bool FetchObject(const boost::filesystem::path& path) const override;
20 
21  const boost::filesystem::path root_;
22 };
23 
24 #endif // SOTA_CLIENT_TOOLS_OSTREE_DIR_REPO_H_
25 
26 // vim: set tabstop=2 shiftwidth=2 expandtab:
OSTreeRepo
A source repository to read OSTree objects from.
Definition: ostree_repo.h:19
OSTreeRef
Definition: ostree_ref.h:13
OSTreeDirRepo
Definition: ostree_dir_repo.h:9