ipfs-chromium
block_requestor.h
1 #ifndef BLOCK_REQUESTOR_H_
2 #define BLOCK_REQUESTOR_H_
3 
4 #include <cstdint>
5 
6 #include <functional>
7 #include <memory>
8 #include <string>
9 
10 namespace ipfs {
11 
20 using Priority = std::uint_least16_t;
21 
22 class DagListener;
23 
33  public:
42  virtual void RequestByCid(std::string cid,
43  std::shared_ptr<DagListener> dl,
44  Priority priority) = 0;
45 };
46 } // namespace ipfs
47 
48 #endif // BLOCK_REQUESTOR_H_
Interface for classes that can asynchronously fetch a block for a CID.
Definition: block_requestor.h:32
virtual void RequestByCid(std::string cid, std::shared_ptr< DagListener > dl, Priority priority)=0
Request a single block from gateway(s).