1 #ifndef IPFS_REQUESTOR_H_
2 #define IPFS_REQUESTOR_H_
18 using RequestPtr = std::shared_ptr<GatewayRequest>;
20 class Requestor :
public std::enable_shared_from_this<Requestor> {
22 enum class HandleOutcome : char {
33 virtual HandleOutcome handle(RequestPtr) = 0;
35 void definitive_failure(RequestPtr)
const;
36 void forward(RequestPtr)
const;
38 std::shared_ptr<Client> api_;
41 using RequestPtr = ::ipfs::gw::RequestPtr;
42 virtual std::string_view name()
const = 0;
45 void request(std::shared_ptr<GatewayRequest>);
46 Requestor& or_else(std::shared_ptr<Requestor> p);
49 void TestAccess(
void*);
52 std::shared_ptr<Requestor> next_;
Definition: requestor.h:20