📄 htheader.h
字号:
/* W3C Sample Code Library libwww MIME Headers! MIME Headers!*//*** (c) COPYRIGHT MIT 1995.** Please first read the full copyright statement in the file COPYRIGH.*//*This module handles lists of callback functions for generating and parsingprotocol headers. This works exactly like the lists inHTFormat.This module is implemented by HTHeader.c, and itis a part of the W3C Sample CodeLibrary.*/#ifndef HTHEADER_H#define HTHEADER_H#include "HTResponse.h"#include "HTStream.h"/*We have two call back functions: the first is for generating headers. Thisneeds a stream to put down the extra headers. This one is defined in theRequest Manager. The other one is for parsing. Thisneeds the string to parse.*/typedef int HTParserCallback (HTRequest * request, HTResponse * response, char * token, char * value);/*. Header Parser Management.Header Parsers can be registered to handle any header. The standard set ofHTTP/1.1 MIME parsers is registered by HTMIMEInit in theHTInit module. The HTParserCallbacks are calledby the HTMIME module.HTParserCallbacks may be registered for known MIME headers (HTParser_*),or for regular expressions (HTRegexParser_*). To data the regex support islimited to the use of '*' for a wild card.. Header Generator Management.Header Generators can be use to add additional information to aprotocol request.They will all be called.*/extern BOOL HTGenerator_add (HTList * gens, HTPostCallback * callback);extern BOOL HTGenerator_delete (HTList * gens, HTPostCallback * callback);extern BOOL HTGenerator_deleteAll (HTList * gens);/*. Global List Of Parsers and Generators.As in HTFormat module you can register a listglobally or locally as you like. The local registrations is managed byRequest Manager( Header Parsers)*/#define MIME_HASH_SIZE HT_L_HASH_SIZEextern void HTHeader_setMIMEParseSet (HTMIMEParseSet * list);extern HTMIMEParseSet * HTHeader_MIMEParseSet (void);extern BOOL HTHeader_addParser (const char * token, BOOL case_sensitive, HTParserCallback * callback);extern BOOL HTHeader_addRegexParser (const char * token, BOOL case_sensitive, HTParserCallback * callback);extern BOOL HTHeader_deleteParser (const char * token);/*( Header Generation)*/extern void HTHeader_setGenerator (HTList * list);extern BOOL HTHeader_addGenerator (HTPostCallback * callback);extern BOOL HTHeader_deleteGenerator (HTPostCallback * callback);extern HTList * HTHeader_generator (void);/*( Delete all Global Lists)*/extern void HTHeader_deleteAll (void);/**/#endif /* HTHEADER_H *//* @(#) $Id: HTHeader.html,v 2.13 1999/02/07 18:20:31 frystyk Exp $*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -