📄 wwwapp.h
字号:
/* W3C Sample Code Library libwww Application Interface! Application Interface!*//*** (c) COPYRIGHT MIT 1995.** Please first read the full copyright statement in the file COPYRIGH.*//*In addition top the basic W3C Sample Code Library WWWLibinterface you may include the otherinterfaces depending on the needs of yourapplication. However, it is not required and none of the files included beloware ever used in the core part of the Library itself. Only if this file isincluded, the extra modules will get included in the linked object code.It is also possible to include only a subset of the files below if thefunctionality you are after is covered by them. This interface contains manyapplication specific features including a set of defaultBEFORE and AFTER filters.*/#ifndef WWWAPP_H#define WWWAPP_H/**/#ifdef __cplusplusextern "C" { #endif/*( System dependencies)The wwwsys.h file includes system-specific includefiles and flags for I/O to network and disk. The only reason for this fileis that the Internet world is more complicated than Posix and ANSI.*/#include "wwwsys.h"/*( Event Manager)The core part of libwww only provides the hooks for the event manager. Thereis no event loop internal to the core part. Instead the application mustprovide the event loop in order to use either pseudo threads or real threads.If the application only uses blocking sockets without threads then it isnot required to register any event loop at all. We provide a defaultimplementation of an event loop which you can either take or get some ideasfrom.*/#include "HTEvtLst.h"/*( Managing the Home Page)This module provides some "make life easier" functions in order to get theapplication going. They help you generate the first anchor, also called thehome anchor. It also contains a nice set of default WWW addresses.*/#include "HTHome.h"/*( User Dialogs and Messages)You can register a set of callback functions to handle user prompting, errormessages, confimations etc. Here we give a set of functions that can be usedon almost anu thinkable platform. If you want to provide your own platformdependent implementation then fine :-)*/#include "HTDialog.h"/*( Load, Upload, and Search URLs)Even though you may use the API for the HTRequest object directly in orderto issue a request, you will probably find that in real life it is easierto use a higher level abstraction API. This API is provided by theHTAccess module where you will find all kindof functions for down loading a URL etc.*/#include "HTAccess.h"/*( Rule File Management)Another way to initialize applications is to use a rule file, also knownas a configuration file. This is forexample the case with the W3C httpd and the W3C Line Mode Browser. This moduleprovides basic support for configuration file management and the applicationcan use this is desired. The module is not referred to by the Library. Readinga rule file is implemented as a stream converter so that a rule file cancome from anywhere, even across the network!*/#include "HTRules.h"/*( Proxies and Gateways)Applications do not have to provide native support for all protocols, theycan in many situations rely on the support of proxies and gateways to helpdoing the job. Proxy servers are often used to carry client requests througha firewall where they can provide services like corporate caching and othernetwork optimizations. Both Proxy servers and gateways can serve as "protocoltranslators" which can convert a request in the main Web protocol, HTTP,to an equivalent request in another protocol, for example NNTP, FTP, or Gopher.In case a proxy server or a gateway is available to the application, it cantherefore by use of HTTP forward all requests to for example a proxy serverwhich then handle the communications with the remote server, for exampleusing FTP about the document and return it to the application (proxy client)using HTTP.*/#include "HTProxy.h"/*( BEFORE and AFTER Filters)Before a request has been issued and after it has terminatedthe application often has to do some action as a result of the request (andof the result of the request). The Client Profile Interface Library providesa set of standard BEFORE and AFTER filters to handle caching,redirection, authentication, logging etc.*/#include "HTFilter.h"/*( Logging)Often it is required to log the requests issued to the Library. This caneither be the case if the application is a server or it can also be usefulin a client application. This module provides a simple logging mechanismwhich can be enabled if needed. See also the SQLbased logging module.*/#include "HTLog.h"/*( History Management)Another type of logging is keeping track of which documents a user has visitedwhen browsing along on the Web. The Library history manager provides a basicset of functionality to keep track of a linear history list.*/#include "HTHist.h"/*End of application specific modules*/#ifdef __cplusplus} /* end extern C definitions */#endif#endif/* @(#) $Id: WWWApp.html,v 2.21 1998/05/24 19:39:40 frystyk Exp $*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -