diff -r 3dfbd0b91950 -r 4cfaa02055cd src/server/public/nsapi.h --- a/src/server/public/nsapi.h Sat Jan 22 11:06:11 2022 +0100 +++ b/src/server/public/nsapi.h Sat Jan 22 19:13:40 2022 +0100 @@ -358,9 +358,6 @@ #ifndef HPUX #include #endif -#ifndef BSD -#include /* new */ -#endif #include #include #include @@ -770,14 +767,22 @@ typedef struct ResourceType ResourceType; typedef struct ResourceData ResourceData; +typedef void * (*resource_pool_init_func)(pool_handle_t *, const char *, pblock *); +typedef void (*resource_pool_destroy_func)(void *); +typedef void * (*resource_pool_createresource_func)(void *); +typedef void (*resource_pool_freeresource_func)(void *, void *); +typedef int (*resource_pool_prepare_func)(void *, void *); +typedef int (*resource_pool_finish_func)(void *, void *); +typedef void * (*resource_pool_getresourcedata_func)(void *); + struct ResourceType { - void * (*init)(pool_handle_t *, pblock *); + void * (*init)(pool_handle_t *, const char *, pblock *); void (*destroy)(void *); - void * (*createresource)(void *); void (*freeresource)(void *, void *); int (*prepare)(void *, void *); int (*finish)(void *, void *); + void * (*getresourcedata)(void *); }; struct ResourceData { @@ -785,6 +790,8 @@ void *data; }; +int resourcepool_register_type(const char *type_name, ResourceType *type_info); + ////// /* * VSInitFunc, VSDestroyFunc, VSDirectiveInitFunc and VSDirectiveDestroyFunc