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

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.14    ! frystyk     3:   <TITLE>W3C Reference Library libwww Application Interface</TITLE>
2.1       frystyk     4: </HEAD>
                      5: <BODY>
2.12      eric        6: <H1>
2.14    ! frystyk     7:   Application Interface
2.12      eric        8: </H1>
2.1       frystyk     9: <PRE>
                     10: /*
                     11: **     (c) COPYRIGHT MIT 1995.
                     12: **     Please first read the full copyright statement in the file COPYRIGH.
                     13: */
                     14: </PRE>
2.12      eric       15: <P>
                     16: In addition top the basic W3C Reference Library include file called
                     17: <A HREF="WWWLib.html">WWWLib.h</A> you <EM>can</EM> also include this file
                     18: called WWWApp.h depending on the needs of your application. However, it is
                     19: not required and none of the files included below are ever used in the core
                     20: part of the Library itself. Only if this file is included, the extra modules
                     21: will get included in the linked object code. It is also possible to include
                     22: only a subset of the files below if the functionality you are after is covered
                     23: by them.
2.1       frystyk    24: <PRE>
                     25: #ifndef WWWAPP_H
                     26: #define WWWAPP_H
                     27: </PRE>
                     28: <PRE>
                     29: #ifdef __cplusplus
                     30: extern "C" { 
                     31: #endif
                     32: </PRE>
2.12      eric       33: <H2>
                     34:   System dependencies
                     35: </H2>
                     36: <P>
2.11      frystyk    37: The <A HREF="sysdep.html">sysdep.h</A> file includes system-specific include
2.12      eric       38: files and flags for I/O to network and disk. The only reason for this file
                     39: is that the Internet world is more complicated than Posix and ANSI.
2.14    ! frystyk    40: <PRE>#include "<A HREF="sysdep.html">sysdep.h</A>"
2.11      frystyk    41: </PRE>
2.12      eric       42: <H2>
2.13      frystyk    43:   Event Manager
                     44: </H2>
                     45: <P>
                     46: The core part of libwww only provides the hooks for the event manager. There
                     47: is no event loop internal to the core part. Instead the application must
                     48: provide the event loop in order to use either pseudo threads or real threads.
                     49: If the application only uses blocking sockets without threads then it is
                     50: not required to register any event loop at all. We provide a default
                     51: implementation of an event loop which you can either take or get some ideas
                     52: from.
                     53: <PRE>#include "<A HREF="HTEvntrg.html">HTEvntrg.h</A>"
                     54: </PRE>
                     55: <H2>
2.14    ! frystyk    56:   Specific MIME Header Parsers
        !            57: </H2>
        !            58: <P>
        !            59: The Library's MIME parser is divided into two parts: A generic MIME parser
        !            60: that knows how to unwrap all RFC822 headers and specialized header parsers
        !            61: that knows how to parse <CODE>Content-Length</CODE>, for example. This is
        !            62: the default set of the specialized MIME header parsers that can be registered
        !            63: as part of the generic MIME. Note that these functions are not registered
        !            64: by default - they must be registered by the application. This can be done
        !            65: using the <A HREF="HTInit.html">HTMIMEInit()</A> function in the
        !            66: <A HREF="WWWInit.html">WWWInit interface</A>. Of course this can also be
        !            67: used to register new headers that are not represented below - or if you want
        !            68: to replace a default parser then this is also very easy.
        !            69: <PRE>#include "<A HREF="HTMIMImp.html">HTMIMImp.h</A>"
        !            70: </PRE>
        !            71: <H2>
        !            72:   Managing the Home Anchor
2.12      eric       73: </H2>
                     74: <P>
                     75: This module provides some "make life easier" functions in order to get the
                     76: application going. They help you generate the first anchor, also called the
                     77: <EM>home anchor</EM>. It also contains a nice set of default WWW addresses.
2.2       frystyk    78: <PRE>
                     79: #include "<A HREF="HTHome.html">HTHome.h</A>"
2.1       frystyk    80: </PRE>
2.12      eric       81: <H2>
                     82:   User Dialogs and Messages
                     83: </H2>
                     84: <P>
                     85: You can register a set of callback functions to handle user prompting, error
                     86: messages, confimations etc. Here we give a set of functions that can be used
                     87: on almost anu thinkable platform. If you want to provide your own platform
                     88: dependent implementation then fine :-)
2.8       frystyk    89: <PRE>
                     90: #include "<A HREF="HTDialog.html">HTDialog.h</A>"
                     91: </PRE>
2.12      eric       92: <H2>
2.14    ! frystyk    93:   Load, Upload, and Search URLs
        !            94: </H2>
        !            95: <P>
        !            96: Even though you may use the API for the HTRequest object directly in order
        !            97: to issue a request, you will probably find that in real life it is easier
        !            98: to use a higher level abstraction API. This API is provided by the
        !            99: <A HREF="HTAccess.html">HTAccess module</A> where you will find all kind
        !           100: of functions for down loading a URL etc.
        !           101: <PRE>
        !           102: #include "<A HREF="HTAccess.html">HTAccess.h</A>"
        !           103: </PRE>
        !           104: <H2>
2.12      eric      105:   After Terminating a Request
                    106: </H2>
                    107: <P>
                    108: When a request is terminated, the application often has to do some action
                    109: as a result of the request (and of the result of the request). The Application
                    110: part of the Library provides two following modules to handle <EM>logging</EM>
                    111: and <EM>history management</EM>. You can register a <EM>POST request
                    112: handler</EM> in the <A HREF="HTNet.html">Net Manager</A> as described in
                    113: the <A HREF="../User/Using/Overview.html">User's Guide</A>.
                    114: <P>
                    115: You can find a function called <CODE>HTLoadTerminate</CODE> in the
                    116: <A HREF="HTHome.html">HTHome module</A> that enables all the functionality
2.4       frystyk   117: for handling a request result.
2.12      eric      118: <H3>
                    119:   Logging
                    120: </H3>
                    121: <P>
                    122: Often it is required to log the requests issued to the Library. This can
                    123: either be the case if the application is a server or it can also be useful
                    124: in a client application. This module provides a simple logging mechanism
                    125: which can be enabled if needed.
2.1       frystyk   126: <PRE>
2.2       frystyk   127: #include "<A HREF="HTLog.html">HTLog.h</A>"
2.1       frystyk   128: </PRE>
2.12      eric      129: <H3>
                    130:   History Management
                    131: </H3>
                    132: <P>
                    133: Another type of logging is keeping track of which documents a user has visited
                    134: when browsing along on the Web. The Library history manager provides a basic
                    135: set of functionality to keep track of a linear history list.
2.1       frystyk   136: <PRE>
2.2       frystyk   137: #include "<A HREF="HTHist.html">HTHist.h</A>"
2.1       frystyk   138: </PRE>
2.12      eric      139: <P>
2.1       frystyk   140: End of application specific modules
                    141: <PRE>
                    142: #ifdef __cplusplus
                    143: } /* end extern C definitions */
                    144: #endif
                    145: 
                    146: #endif
                    147: </PRE>
2.12      eric      148: <P>
                    149:   <HR>
2.10      frystyk   150: <ADDRESS>
2.14    ! frystyk   151:   @(#) $Id: WWWApp.html,v 2.13 1996/05/16 19:03:27 frystyk Exp $
2.10      frystyk   152: </ADDRESS>
2.12      eric      153: </BODY></HTML>

Webmaster