1 #ifndef IPFS_REQUESTOR_H_
2 #define IPFS_REQUESTOR_H_
18 using RequestPtr = std::shared_ptr<GatewayRequest>;
22 class Requestor :
public std::enable_shared_from_this<Requestor> {
24 enum class HandleOutcome : char {
35 virtual HandleOutcome handle(RequestPtr) = 0;
37 static void definitive_failure(RequestPtr) ;
38 void forward(RequestPtr)
const;
40 std::shared_ptr<Client> api_;
43 using RequestPtr = ::ipfs::gw::RequestPtr;
44 virtual std::string_view name()
const = 0;
47 void request(std::shared_ptr<GatewayRequest>);
48 Requestor& or_else(std::shared_ptr<Requestor> p);
51 void TestAccess(
void*);
54 std::shared_ptr<Requestor> next_;
Definition: requestor.h:22