supplier.h

00001 /*
00002  * Copyright (c) 2005-2012 by KoanLogic s.r.l. <http://www.koanlogic.com>
00003  * All rights reserved.
00004  *
00005  * This file is part of KLone, and as such it is subject to the license stated
00006  * in the LICENSE file which you have received as part of this distribution.
00007  *
00008  * $Id: supplier.h,v 1.8 2008/10/27 21:28:04 tat Exp $
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;       /* descriptive 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

←Products
Copyright © 2005-2012 - KoanLogic S.r.l. - All rights reserved