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:
25  explicit IpnsName(ValidatedIpns const&);
26  ~IpnsName() noexcept override;
27 
32  bool expired() const override;
33 };
34 } // namespace ipld
35 } // namespace ipfs
36 
37 #endif // IPFS_IPLD_IPNS_NAME_H_
A block, an IPNS record, etc.
Definition: dag_node.h:69
Definition: ipns_name.h:11
IpnsName(ValidatedIpns const &)
bool expired() const override
Definition: resolution_state.h:21
Data from IPNS record modulo the verification parts.
Definition: ipns_record.h:38