// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "./IBaseWTTPSite.sol"; /// @title WTTP Gateway Contract /// @notice Provides a unified interface for accessing WTTP sites with extended functionality /// @dev Acts as an intermediary layer between clients and WTTP sites, adding range handling capabilities /// and standardizing response formats across different site implementations interface IWTTPGateway { /// @notice Forwards OPTIONS requests to a specified site /// @dev Simply passes the request through without modification /// @param _site Address of the target WTTP site contract /// @param _path The path to the resource /// @return _optionsResponse The response from the site containing allowed methods function OPTIONS(address _site, string memory _path) external view returns (OPTIONSResponse memory _optionsResponse); /// @notice Forwards HEAD requests to a specified site /// @dev Simply passes the request through without modification /// @param _site Address of the target WTTP site contract /// @param _headRequest The HEAD request parameters including path and conditional headers /// @return _headResponse Response containing metadata without content function HEAD(address _site, HEADRequest memory _headRequest) external view returns (HEADResponse memory _headResponse); /// @notice Handles LOCATE requests with secure size information /// @dev Extends the base LOCATE functionality with data point size calculations /// @param _site Address of the target WTTP site contract /// @param _locateRequest The LOCATE request parameters /// @return _locateResponse Response containing resource location and size information function LOCATE(address _site, LOCATERequest memory _locateRequest) external view returns (LOCATEResponseSecure memory _locateResponse); /// @notice Handles GET requests with byte range support /// @dev First locates the resource, then processes any byte range request /// @param _site Address of the target WTTP site contract /// @param _getRequest The GET request parameters including any byte range /// @return _getResponse Response with either full data or the requested byte range function GET(address _site, GETRequest memory _getRequest) external view returns (GETResponse memory _getResponse); }