Annotation of libwww/Library/src/WWWApp.html, revision 2.20

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.17      frystyk     3:   <!-- Changed by: Henrik Frystyk Nielsen,  5-Jul-1996 -->
2.19      frystyk     4:   <TITLE>W3C Sample Code Library libwww Application Interface</TITLE>
2.1       frystyk     5: </HEAD>
                      6: <BODY>
2.12      eric        7: <H1>
2.17      frystyk     8:   Application Interface
2.12      eric        9: </H1>
2.1       frystyk    10: <PRE>
                     11: /*
                     12: **     (c) COPYRIGHT MIT 1995.
                     13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
2.12      eric       16: <P>
2.19      frystyk    17: In addition top the basic W3C Sample Code Library <A HREF="WWWLib.html">WWWLib
2.17      frystyk    18: interface</A> you <EM>may</EM> include the other
                     19: <A HREF="../User/Guide/">interfaces</A>&nbsp;depending on the needs of your
                     20: application. However, it is not required and none of the files included below
                     21: are ever used in the core part of the Library itself. Only if this file is
                     22: included, the extra modules will get included in the linked object code.
                     23: It is also possible to include only a subset of the files below if the
                     24: functionality you are after is covered by them. This interface contains many
                     25: application specific features including a set of default
                     26: <A HREF="HTFilter.html">BEFORE and AFTER filters</A>.
2.1       frystyk    27: <PRE>
                     28: #ifndef WWWAPP_H
                     29: #define WWWAPP_H
                     30: </PRE>
                     31: <PRE>
                     32: #ifdef __cplusplus
                     33: extern "C" { 
                     34: #endif
                     35: </PRE>
2.16      frystyk    36: <H3>
2.12      eric       37:   System dependencies
2.16      frystyk    38: </H3>
2.12      eric       39: <P>
2.20    ! frystyk    40: The <A HREF="wwwsys.html">wwwsys.h</A> file includes system-specific include
2.12      eric       41: files and flags for I/O to network and disk. The only reason for this file
                     42: is that the Internet world is more complicated than Posix and ANSI.
2.20    ! frystyk    43: <PRE>#include "<A HREF="wwwsys.html">wwwsys.h</A>"
2.11      frystyk    44: </PRE>
2.17      frystyk    45: <H3>
2.13      frystyk    46:   Event Manager
2.17      frystyk    47: </H3>
2.13      frystyk    48: <P>
                     49: The core part of libwww only provides the hooks for the event manager. There
                     50: is no event loop internal to the core part. Instead the application must
                     51: provide the event loop in order to use either pseudo threads or real threads.
                     52: If the application only uses blocking sockets without threads then it is
                     53: not required to register any event loop at all. We provide a default
                     54: implementation of an event loop which you can either take or get some ideas
                     55: from.
2.18      frystyk    56: <PRE>#include "<A HREF="HTEvtLst.html">HTEvtLst.h</A>"
2.13      frystyk    57: </PRE>
2.17      frystyk    58: <H3>
2.16      frystyk    59:   Managing the Home Page
2.17      frystyk    60: </H3>
2.12      eric       61: <P>
                     62: This module provides some "make life easier" functions in order to get the
                     63: application going. They help you generate the first anchor, also called the
                     64: <EM>home anchor</EM>. It also contains a nice set of default WWW addresses.
2.17      frystyk    65: <PRE>#include "<A HREF="HTHome.html">HTHome.h</A>"
2.1       frystyk    66: </PRE>
2.17      frystyk    67: <H3>
2.12      eric       68:   User Dialogs and Messages
2.17      frystyk    69: </H3>
2.12      eric       70: <P>
                     71: You can register a set of callback functions to handle user prompting, error
                     72: messages, confimations etc. Here we give a set of functions that can be used
                     73: on almost anu thinkable platform. If you want to provide your own platform
                     74: dependent implementation then fine :-)
2.17      frystyk    75: <PRE>#include "<A HREF="HTDialog.html">HTDialog.h</A>"
2.8       frystyk    76: </PRE>
2.17      frystyk    77: <H3>
2.14      frystyk    78:   Load, Upload, and Search URLs
2.17      frystyk    79: </H3>
2.14      frystyk    80: <P>
                     81: Even though you may use the API for the HTRequest object directly in order
                     82: to issue a request, you will probably find that in real life it is easier
                     83: to use a higher level abstraction API. This API is provided by the
                     84: <A HREF="HTAccess.html">HTAccess module</A> where you will find all kind
                     85: of functions for down loading a URL etc.
2.17      frystyk    86: <PRE>#include "<A HREF="HTAccess.html">HTAccess.h</A>"
                     87: </PRE>
                     88: <H3>
                     89:   Rule File Management
                     90: </H3>
                     91: <P>
                     92: Another way to initialize applications is to use a rule file, also known
                     93: as a <A HREF="../User/Using/Rules.html">configuration file</A>. This is for
                     94: example the case with the W3C httpd and the W3C Line Mode Browser. This module
                     95: provides basic support for configuration file management and the application
                     96: can use this is desired. The module is not referred to by the Library. Reading
                     97: a rule file is implemented as a stream converter so that a rule file can
                     98: come from anywhere, even across the network!
                     99: <PRE>#include "<A HREF="HTRules.html">HTRules.h</A>"
                    100: </PRE>
                    101: <H3>
                    102:   Proxies and Gateways
                    103: </H3>
                    104: <P>
                    105: Applications do not have to provide native support for all protocols, they
                    106: can in many situations rely on the support of proxies and gateways to help
                    107: doing the job. Proxy servers are often used to carry client requests through
                    108: a firewall where they can provide services like corporate caching and other
                    109: network optimizations. Both Proxy servers and gateways can serve as "protocol
                    110: translators" which can convert a request in the main Web protocol, HTTP,
                    111: to an equivalent request in another protocol, for example NNTP, FTP, or Gopher.
                    112: In case a proxy server or a gateway is available to the application, it can
                    113: therefore by use of HTTP forward all requests to for example a proxy server
                    114: which then handle the communications with the remote server, for example
                    115: using FTP about the document and return it to the application (proxy client)
                    116: using HTTP.
                    117: <PRE>#include "<A HREF="HTProxy.html">HTProxy.h</A>"
2.14      frystyk   118: </PRE>
2.17      frystyk   119: <H3>
2.16      frystyk   120:   BEFORE and AFTER Filters
2.17      frystyk   121: </H3>
2.12      eric      122: <P>
2.16      frystyk   123: <I>Before</I> a request has been issued and <I>after</I> it has terminated
                    124: the application often has to do some action as a result of the request (and
                    125: of the result of the request). The Client Profile Interface Library provides
                    126: a set of standard BEFORE and AFTER filters to handle <I>caching</I>,
                    127: <I>redirection</I>, <I>authentication</I>, <I>logging</I> etc.
2.17      frystyk   128: <PRE>#include "<A HREF="HTFilter.html">HTFilter.h</A>"
2.16      frystyk   129: </PRE>
2.12      eric      130: <H3>
                    131:   Logging
                    132: </H3>
                    133: <P>
                    134: Often it is required to log the requests issued to the Library. This can
                    135: either be the case if the application is a server or it can also be useful
                    136: in a client application. This module provides a simple logging mechanism
                    137: which can be enabled if needed.
2.17      frystyk   138: <PRE>#include "<A HREF="HTLog.html">HTLog.h</A>"
2.1       frystyk   139: </PRE>
2.17      frystyk   140: <H3>
2.20    ! frystyk   141:   SQL Log Module 
        !           142: </H3>
        !           143: This SQL based log class generates a SQL database and a set of tables
        !           144: storing the results of a request. The result is stored in different
        !           145: tables depending on whether it is information about the request or the
        !           146: resource returned.
        !           147: <P>
        !           148: <PRE>
        !           149: #include "<A HREF="HTSQLLog.html">HTSQLLog.h</A>"
        !           150: </PRE>
        !           151: <H3>
2.12      eric      152:   History Management
2.17      frystyk   153: </H3>
2.12      eric      154: <P>
                    155: Another type of logging is keeping track of which documents a user has visited
                    156: when browsing along on the Web. The Library history manager provides a basic
                    157: set of functionality to keep track of a linear history list.
2.17      frystyk   158: <PRE>#include "<A HREF="HTHist.html">HTHist.h</A>"
2.1       frystyk   159: </PRE>
2.12      eric      160: <P>
2.1       frystyk   161: End of application specific modules
                    162: <PRE>
                    163: #ifdef __cplusplus
                    164: } /* end extern C definitions */
                    165: #endif
                    166: 
                    167: #endif
                    168: </PRE>
2.12      eric      169: <P>
                    170:   <HR>
2.10      frystyk   171: <ADDRESS>
2.20    ! frystyk   172:   @(#) $Id: WWWApp.html,v 2.19 1997/02/16 18:43:19 frystyk Exp $
2.10      frystyk   173: </ADDRESS>
2.12      eric      174: </BODY></HTML>

Webmaster