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 {
10 class Root : public DagNode {
11  std::optional<redirects::File> redirects_;
12 
13  ResolveResult resolve(ResolutionState& params) override;
14  std::shared_ptr<DagNode> rooted() override;
15  std::shared_ptr<DagNode> deroot() override;
16  bool expired() const override;
17 
18  public:
19  explicit Root(std::shared_ptr<DagNode>);
20  ~Root() noexcept override;
21 };
22 } // namespace ipfs::ipld
23 
24 #endif // IPFS_ROOT_H_
A block, an IPNS record, etc.
Definition: dag_node.h:69
Definition: resolution_state.h:21
Definition: root.h:10