supplier.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _KLONE_SUPPLIER_H_
00012 #define _KLONE_SUPPLIER_H_
00013
00014 #include <klone/http.h>
00015 #include <klone/request.h>
00016 #include <klone/response.h>
00017 #include <klone/page.h>
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023 typedef struct supplier_s
00024 {
00025 const char *name;
00026 int (*init)(void);
00027 void (*term)(void);
00028 int (*is_valid_uri)(http_t *h, request_t *rq, const char *file, size_t len,
00029 void **handle, time_t *mtime);
00030 int (*serve)(request_t *, response_t*);
00031 } supplier_t;
00032
00033 #ifdef __cplusplus
00034 }
00035 #endif
00036
00037 #endif