Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

http.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005, 2006 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: http.h,v 1.10 2006/04/06 14:02:22 tat Exp $
00009  */
00010 
00011 #ifndef _KLONE_HTTP_H_
00012 #define _KLONE_HTTP_H_
00013 
00014 #include <u/libu.h>
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif 
00019 
00023 enum {
00024     HTTP_STATUS_EMPTY                     =   0, 
00026     HTTP_STATUS_OK                        = 200,
00028     HTTP_STATUS_CREATED                   = 201,
00030     HTTP_STATUS_ACCEPTED                  = 202,
00032     HTTP_STATUS_NO_CONTENT                = 204,
00034     HTTP_STATUS_MOVED_PERMANENTLY         = 301,
00036     HTTP_STATUS_MOVED_TEMPORARILY         = 302,
00038     HTTP_STATUS_NOT_MODIFIED              = 304,
00040     HTTP_STATUS_BAD_REQUEST               = 400,
00042     HTTP_STATUS_UNAUTHORIZED              = 401,
00044     HTTP_STATUS_FORBIDDEN                 = 403,
00046     HTTP_STATUS_NOT_FOUND                 = 404,
00048     HTTP_STATUS_LENGTH_REQUIRED           = 411,
00050     HTTP_STATUS_REQUEST_TOO_LARGE         = 413,
00052     HTTP_STATUS_INTERNAL_SERVER_ERROR     = 500,
00054     HTTP_STATUS_NOT_IMPLEMENTED           = 501,
00056     HTTP_STATUS_BAD_GATEWAY               = 502,
00058     HTTP_STATUS_SERVICE_UNAVAILABLE       = 503 
00060 };
00061 
00063 enum http_method_e
00064 { 
00065     HM_UNKNOWN,   
00066     HM_GET,       
00067     HM_HEAD,      
00068     HM_POST,      
00069     HM_PUT,       
00070     HM_DELETE     
00071 };
00072 
00073 struct http_s;
00074 typedef struct http_s http_t;
00075 
00076 struct session_opt_s;
00077 
00078 u_config_t *http_get_config(http_t* http);
00079 struct session_opt_s *http_get_session_opt(http_t* http);
00080 
00081 int http_alias_resolv(http_t *h, char *dst, const char *filename, size_t sz);
00082 const char* http_get_status_desc(int status);
00083 
00084 #ifdef __cplusplus
00085 }
00086 #endif 
00087 
00088 #endif

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