Changeset 99937 in vbox for trunk/include/iprt/http-server.h
- Timestamp:
- May 23, 2023 3:38:52 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/http-server.h
r98103 r99937 73 73 /** Request body data. */ 74 74 RTHTTPBODY Body; 75 /** User-supplied (opaque) pointer. 76 * Can be used for faster lookups between callbacks. */ 77 void *pvUser; 75 78 } RTHTTPSERVERREQ; 76 79 /** Pointer to a HTTP client request. */ … … 134 137 { 135 138 /** 136 * Called before a given URL will be retrieved by the GET method. 139 * Called before beginning to process a request. Guaranteed. 140 * 141 * @returns VBox status code. 142 * @param pData Pointer to HTTP callback data. 143 * @param pReq Pointer to request to handle. 144 */ 145 DECLCALLBACKMEMBER(int, pfnRequestBegin,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq)); 146 /** 147 * Called after processing a request. Guaranteed. 148 * 149 * @returns VBox status code. 150 * @param pData Pointer to HTTP callback data. 151 * @param pReq Pointer to request to handle. 152 */ 153 DECLCALLBACKMEMBER(int, pfnRequestEnd,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq)); 154 /** 155 * Opens a resource for a GET request. 156 * 157 * Will be called as as a second function for a GET request. 137 158 * 138 159 * Note: High level function, not being called when pfnOnGetRequest is implemented. … … 145 166 DECLCALLBACKMEMBER(int, pfnOpen,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq, void **ppvHandle)); 146 167 /** 147 * Called when a given URL will be retrieved by the GET method.168 * Reads a resource for a GET request. 148 169 * 149 170 * Note: High level function, not being called when pfnOnGetRequest is implemented. … … 152 173 * @returns VBox status code. 153 174 * @param pData Pointer to HTTP callback data. 175 * @param pReq Pointer to request to handle. 154 176 * @param pvHandle Opaque handle for object identification. 155 177 * @param pvBuf Pointer to buffer where to store the read data. … … 157 179 * @param pcbRead Where to return the amount (in bytes) of read data. Optional and can be NULL. 158 180 */ 159 DECLCALLBACKMEMBER(int, pfnRead,(PRTHTTPCALLBACKDATA pData, void *pvHandle, void *pvBuf, size_t cbBuf, size_t *pcbRead));160 /** 161 * C alled when a given URL is done retrieving by the GET method.181 DECLCALLBACKMEMBER(int, pfnRead,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq, void *pvHandle, void *pvBuf, size_t cbBuf, size_t *pcbRead)); 182 /** 183 * Closes a resouce for a GET a request. 162 184 * 163 185 * Note: High level function, not being called when pfnOnGetRequest is implemented. … … 165 187 * @returns VBox status code. 166 188 * @param pData Pointer to HTTP callback data. 167 * @param p szUrl URLto handle.189 * @param pReq Pointer to request to handle. 168 190 * @param pvHandle Opaque handle for object identification. 169 191 */ 170 DECLCALLBACKMEMBER(int, pfnClose,(PRTHTTPCALLBACKDATA pData, void *pvHandle));192 DECLCALLBACKMEMBER(int, pfnClose,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq, void *pvHandle)); 171 193 /** 172 194 * Queries information about a given URL. 173 195 * 174 * Will be called with GET or HEAD request. 196 * Will be called as first function for a GET or HEAD request. 197 * 198 * Note: High level function, not being called when pfnOnGetRequest is implemented.* 175 199 * 176 200 * @returns VBox status code.
Note:
See TracChangeset
for help on using the changeset viewer.