00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef LIB_HTTPD_PRIV_H
00032
00033 #define LIB_HTTPD_H_PRIV 1
00034
00035 #if !defined(__ANSI_PROTO)
00036 #if defined(_WIN32) || defined(__STDC__) || defined(__cplusplus)
00037 # define __ANSI_PROTO(x) x
00038 #else
00039 # define __ANSI_PROTO(x) ()
00040 #endif
00041 #endif
00042
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046
00047
00048 #define LEVEL_NOTICE "notice"
00049 #define LEVEL_ERROR "error"
00050
00051 char * _httpd_unescape __ANSI_PROTO((char*));
00052 char *_httpd_escape __ANSI_PROTO((char*));
00053 char _httpd_from_hex __ANSI_PROTO((char));
00054
00055
00056 void _httpd_catFile __ANSI_PROTO((request*, char*));
00057 void _httpd_send403 __ANSI_PROTO((request*));
00058 void _httpd_send404 __ANSI_PROTO((httpd*, request*));
00059 void _httpd_sendText __ANSI_PROTO((request*, char*));
00060 void _httpd_sendFile __ANSI_PROTO((httpd*, request*, char*));
00061 void _httpd_sendStatic __ANSI_PROTO((httpd*, request *, char*));
00062 void _httpd_sendHeaders __ANSI_PROTO((request*, int, int);)
00063 void _httpd_sanitiseUrl __ANSI_PROTO((char*));
00064 void _httpd_freeVariables __ANSI_PROTO((httpVar*));
00065 void _httpd_formatTimeString __ANSI_PROTO((char*, int));
00066 void _httpd_storeData __ANSI_PROTO((request*, char*));
00067 void _httpd_writeAccessLog __ANSI_PROTO((httpd*, request*));
00068 void _httpd_writeErrorLog __ANSI_PROTO((httpd*, request *, char*, char*));
00069
00070
00071 int _httpd_net_read __ANSI_PROTO((int, char*, int));
00072 int _httpd_net_write __ANSI_PROTO((int, char*, int));
00073 int _httpd_readBuf __ANSI_PROTO((request*, char*, int));
00074 int _httpd_readChar __ANSI_PROTO((request*, char*));
00075 int _httpd_readLine __ANSI_PROTO((request*, char*, int));
00076 int _httpd_checkLastModified __ANSI_PROTO((request*, int));
00077 int _httpd_sendDirectoryEntry __ANSI_PROTO((httpd*, request *r, httpContent*,
00078 char*));
00079
00080 httpContent *_httpd_findContentEntry __ANSI_PROTO((request*, httpDir*, char*));
00081 httpDir *_httpd_findContentDir __ANSI_PROTO((httpd*, char*, int));
00082
00083 #endif