ipfs-chromium
dnslink_name.h
1 #ifndef IPFS_IPLD_DNSLINK_NAME_H_
2 #define IPFS_IPLD_DNSLINK_NAME_H_
3 
4 #include "ipfs_client/ipld/dag_node.h"
5 
6 #include <chrono>
7 
8 namespace ipfs::ipld {
9 class DnsLinkName : public DagNode {
10  std::string target_namespace_;
11  std::string target_root_;
12  std::string target_path_;
13  std::chrono::system_clock::time_point expiration_;
14 
15  ResolveResult resolve(ResolutionState& params) override;
16  bool PreferOver(DagNode const& another) const override;
17  DnsLinkName const* as_dnslink() const override { return this; }
18 
19  public:
20  DnsLinkName(std::string_view target_abs_path);
21  ~DnsLinkName() noexcept override;
22 
23  bool expired() const override;
24 };
25 } // namespace ipfs::ipld
26 
27 #endif // IPFS_IPLD_DNSLINK_NAME_H_
A block, an IPNS record, etc.
Definition: dag_node.h:69
Definition: dnslink_name.h:9
bool expired() const override
Definition: resolution_state.h:21