ipfs-chromium
ipns_name.h
1 #ifndef IPFS_IPLD_IPNS_NAME_H_
2 #define IPFS_IPLD_IPNS_NAME_H_
3 
4 #include "ipfs_client/ipld/dag_node.h"
5 
6 #include <chrono>
7 
8 namespace ipfs {
9 struct ValidatedIpns;
10 namespace ipld {
11 class IpnsName : public DagNode {
12  std::string target_namespace_;
13  std::string target_root_;
14  std::string target_path_;
15  std::chrono::system_clock::time_point expiration_;
16  std::size_t serial_;
17 
18  ResolveResult resolve(ResolutionState& params) override;
19  bool PreferOver(DagNode const& another) const override;
20  IpnsName const* as_ipns() const override { return this; }
21 
22  public:
23  IpnsName(ValidatedIpns const&);
24  ~IpnsName() noexcept override;
25 
26  bool expired() const override;
27 };
28 } // namespace ipld
29 } // namespace ipfs
30 
31 #endif // IPFS_IPLD_IPNS_NAME_H_
A block, an IPNS record, etc.
Definition: dag_node.h:56
Definition: ipns_name.h:11
Definition: resolution_state.h:21
Data from IPNS record modulo the verification parts.
Definition: ipns_record.h:38