ipfs-chromium
root.h
1 #ifndef IPFS_ROOT_H_
2 #define IPFS_ROOT_H_
3 
4 #include <ipfs_client/ipld/dag_node.h>
5 #include <ipfs_client/redirects.h>
6 
7 #include <optional>
8 
9 namespace ipfs::ipld {
13 class Root : public DagNode {
14  std::optional<redirects::File> redirects_;
15 
16  ResolveResult resolve(ResolutionState& params) override;
17  std::shared_ptr<DagNode> rooted() override;
18  std::shared_ptr<DagNode> deroot() override;
19  bool expired() const override;
20 
21  public:
25  explicit Root(std::shared_ptr<DagNode> node);
26  ~Root() noexcept override;
27 };
28 } // namespace ipfs::ipld
29 
30 #endif // IPFS_ROOT_H_
A block, an IPNS record, etc.
Definition: dag_node.h:69
Definition: resolution_state.h:21
Definition: root.h:13
Root(std::shared_ptr< DagNode > node)