src/server/public/nsapi.h

branch
webdav
changeset 270
4cfaa02055cd
parent 269
3dfbd0b91950
child 272
f210681d9dd0
equal deleted inserted replaced
269:3dfbd0b91950 270:4cfaa02055cd
356 #include <sys/file.h> 356 #include <sys/file.h>
357 #include <pthread.h> 357 #include <pthread.h>
358 #ifndef HPUX 358 #ifndef HPUX
359 #include <sys/select.h> 359 #include <sys/select.h>
360 #endif 360 #endif
361 #ifndef BSD
362 #include <alloca.h> /* new */
363 #endif
364 #include <sys/socket.h> 361 #include <sys/socket.h>
365 #include <sys/time.h> 362 #include <sys/time.h>
366 #include <sys/types.h> 363 #include <sys/types.h>
367 #include <sys/uio.h> 364 #include <sys/uio.h>
368 #include <fcntl.h> 365 #include <fcntl.h>
768 typedef struct _http_listener HttpListener; 765 typedef struct _http_listener HttpListener;
769 766
770 typedef struct ResourceType ResourceType; 767 typedef struct ResourceType ResourceType;
771 typedef struct ResourceData ResourceData; 768 typedef struct ResourceData ResourceData;
772 769
770 typedef void * (*resource_pool_init_func)(pool_handle_t *, const char *, pblock *);
771 typedef void (*resource_pool_destroy_func)(void *);
772 typedef void * (*resource_pool_createresource_func)(void *);
773 typedef void (*resource_pool_freeresource_func)(void *, void *);
774 typedef int (*resource_pool_prepare_func)(void *, void *);
775 typedef int (*resource_pool_finish_func)(void *, void *);
776 typedef void * (*resource_pool_getresourcedata_func)(void *);
777
773 struct ResourceType { 778 struct ResourceType {
774 void * (*init)(pool_handle_t *, pblock *); 779 void * (*init)(pool_handle_t *, const char *, pblock *);
775 void (*destroy)(void *); 780 void (*destroy)(void *);
776
777 void * (*createresource)(void *); 781 void * (*createresource)(void *);
778 void (*freeresource)(void *, void *); 782 void (*freeresource)(void *, void *);
779 int (*prepare)(void *, void *); 783 int (*prepare)(void *, void *);
780 int (*finish)(void *, void *); 784 int (*finish)(void *, void *);
785 void * (*getresourcedata)(void *);
781 }; 786 };
782 787
783 struct ResourceData { 788 struct ResourceData {
784 void *resourcepool; 789 void *resourcepool;
785 void *data; 790 void *data;
786 }; 791 };
792
793 int resourcepool_register_type(const char *type_name, ResourceType *type_info);
787 794
788 ////// 795 //////
789 /* 796 /*
790 * VSInitFunc, VSDestroyFunc, VSDirectiveInitFunc and VSDirectiveDestroyFunc 797 * VSInitFunc, VSDestroyFunc, VSDirectiveInitFunc and VSDirectiveDestroyFunc
791 */ 798 */

mercurial