00001 #ifndef _CP_CPSP_H
00002 #define _CP_CPSP_H
00003
00004 #include "cprops/config.h"
00005 #include "cprops/common.h"
00006 #include "cprops/http.h"
00007
00008 __BEGIN_DECLS
00009
00010 void cpsp_init(int separate, char *bin_path, char *doc_root);
00011 void cpsp_shutdown(void *dummy);
00012
00013 void *cpsp_add_shutdown_callback(void (*cb)(void *), void *prm);
00014
00015 typedef struct _cpsp_rec
00016 {
00017 void *lib;
00018 int (*svc)(cp_http_request *, cp_http_response *);
00019 char *path;
00020 } cpsp_rec;
00021
00022 cpsp_rec *cpsp_rec_new(char *path);
00023
00024 void cpsp_rec_dispose(cpsp_rec *rec);
00025
00026 int cpsp_gen(cp_http_request *request, cp_http_response *response);
00027
00028 __END_DECLS
00029
00030 #endif
00031