MCPcopy Create free account
hub / github.com/dillo-browser/dillo / Html_callback

Function Html_callback

src/html.cc:4300–4310  ·  view source on GitHub ↗

* Dispatch the apropriate function for 'Op'. * This function is a Cache client and gets called whenever new data arrives * @param Op operation to perform. * @param CbData a pointer to a DilloHtml structure * @param Buf a pointer to new data * @param BufSize new data size (in bytes) */

Source from the content-addressed store, hash-verified

4298 * @param BufSize new data size (in bytes)
4299 */
4300static void Html_callback(int Op, CacheClient_t *Client)
4301{
4302 DilloHtml *html = (DilloHtml*)Client->CbData;
4303
4304 if (Op) { /* EOF */
4305 html->write((char*)Client->Buf, Client->BufSize, 1);
4306 html->finishParsing(Client->Key);
4307 } else {
4308 html->write((char*)Client->Buf, Client->BufSize, 0);
4309 }
4310}
4311
4312/**
4313 * Here's where we parse the html and put it into the Textblock structure.

Callers

nothing calls this directly

Calls 2

finishParsingMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected