1 /* 2 * mod_vhostdb_api - virtual hosts mapping backend registration 3 * 4 * Copyright(c) 2017 Glenn Strauss gstrauss()gluelogic.com All rights reserved 5 * License: BSD 3-clause (same as lighttpd) 6 */ 7 #ifndef INCLUDED_MOD_VHOSTDB_API_H 8 #define INCLUDED_MOD_VHOSTDB_API_H 9 #include "first.h" 10 11 #include "base_decls.h" 12 #include "buffer.h" 13 14 __attribute_cold__ 15 void http_vhostdb_dumbdata_reset (void); 16 17 typedef struct http_vhostdb_backend_t { 18 const char *name; 19 int(*query)(request_st *r, void *p_d, buffer *result); 20 void *p_d; 21 } http_vhostdb_backend_t; 22 23 __attribute_cold__ 24 __attribute_pure__ 25 const http_vhostdb_backend_t * http_vhostdb_backend_get (const buffer *name); 26 27 __attribute_cold__ 28 void http_vhostdb_backend_set (const http_vhostdb_backend_t *backend); 29 30 #endif 31