mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
Provide API to enable a handle's callback to be replaced
svn path=/trunk/netsurf/; revision=10376
This commit is contained in:
parent
11201a1cd7
commit
18081664eb
@ -274,6 +274,16 @@ nserror hlcache_handle_abort(hlcache_handle *handle)
|
||||
return content_abort(c);
|
||||
}
|
||||
|
||||
/* See hlcache.h for documentation */
|
||||
nserror hlcache_handle_replace_callback(hlcache_handle *handle,
|
||||
hlcache_handle_callback cb, void *pw)
|
||||
{
|
||||
handle->cb = cb;
|
||||
handle->pw = pw;
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* High-level cache internals *
|
||||
******************************************************************************/
|
||||
|
@ -117,6 +117,17 @@ nserror hlcache_handle_release(hlcache_handle *handle);
|
||||
*/
|
||||
nserror hlcache_handle_abort(hlcache_handle *handle);
|
||||
|
||||
/**
|
||||
* Replace a high-level cache handle's callback
|
||||
*
|
||||
* \param handle Handle to replace callback of
|
||||
* \param cb New callback routine
|
||||
* \param pw Private data for callback
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*/
|
||||
nserror hlcache_handle_replace_callback(hlcache_handle *handle,
|
||||
hlcache_handle_callback cb, void *pw);
|
||||
|
||||
/**
|
||||
* Retrieve a content object from a cache handle
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user