llcache.h: Migrate query event to own struct type

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2019-08-04 09:36:18 +01:00
parent 386d803371
commit f59a726f68

View File

@ -116,6 +116,15 @@ typedef enum {
LLCACHE_EVENT_REDIRECT /**< Fetch URL redirect occured */ LLCACHE_EVENT_REDIRECT /**< Fetch URL redirect occured */
} llcache_event_type; } llcache_event_type;
/**
* Low-level cache query message
*/
typedef struct llcache_query_msg {
llcache_query *query; /**< Query information */
llcache_query_response cb; /**< Response callback */
void *cb_pw; /**< Response callback private word */
} llcache_query_msg;
/** /**
* Low-level cache events. * Low-level cache events.
* *
@ -134,11 +143,7 @@ typedef struct {
nsurl *from; /**< Redirect origin */ nsurl *from; /**< Redirect origin */
nsurl *to; /**< Redirect target */ nsurl *to; /**< Redirect target */
} redirect; /**< Fetch URL redirect occured */ } redirect; /**< Fetch URL redirect occured */
struct { llcache_query_msg query;/**< Query event */
llcache_query *query; /**< Query information */
llcache_query_response cb; /**< Response callback */
void *cb_pw; /**< Response callback private word */
} query; /**< Query event */
} data; /**< Event data */ } data; /**< Event data */
} llcache_event; } llcache_event;