Annotation of libwww/Library/src/HTFWrite.html, revision 2.21

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.19      frystyk     3:   <!-- Changed by: Henrik Frystyk Nielsen, 19-May-1996 -->
2.21    ! frystyk     4:   <TITLE>W3C Sample Code Library libwww ANSI C File Streams</TITLE>
2.1       frystyk     5: </HEAD>
                      6: <BODY>
2.19      frystyk     7: <H1>
                      8:   ANSI C File Streams
                      9: </H1>
2.1       frystyk    10: <PRE>
                     11: /*
2.4       frystyk    12: **     (c) COPYRIGHT MIT 1995.
2.1       frystyk    13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
2.19      frystyk    16: <P>
2.20      frystyk    17: This module contains a set of basic file writer streams that are used to
                     18: dump data objects to disk at various places within the Library core. Most
                     19: notably, we use these streams in the <A HREF="HTFWrite.html">Format Manager</A>
                     20: in order to handle external presenters, for example post script viewers etc.
                     21: These streams can of course also be used in other contexts by the application.
2.19      frystyk    22: <P>
2.2       frystyk    23: <UL>
2.19      frystyk    24:   <LI>
                     25:     <A HREF="#write">An ANSI C File Writer Stream</A>
                     26:   <LI>
                     27:     <A HREF="#converters">Various Converters using the File Writer Stream</A>
2.2       frystyk    28: </UL>
2.19      frystyk    29: <P>
                     30: This module is implemented by <A HREF="HTFWrite.c">HTFWrite.c</A>, and it
2.21    ! frystyk    31: is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/">W3C Sample Code
2.19      frystyk    32: Library</A>.
2.1       frystyk    33: <PRE>
                     34: #ifndef HTFWRITE_H
                     35: #define HTFWRITE_H
                     36: 
                     37: #include "HTStream.h"
                     38: #include "HTFormat.h"
                     39: </PRE>
2.19      frystyk    40: <H2>
                     41:   <A NAME="write">ANSI C File Writer Stream</A>
                     42: </H2>
                     43: <P>
                     44: This function puts up a new stream given an <I>open</I> file descripter.
                     45: If the file is <I>not</I> to be closed afterwards, then set
                     46: <CODE>leave_open=NO</CODE>.
2.15      frystyk    47: <PRE>
                     48: extern HTStream * HTFWriter_new        (HTRequest * request,
                     49:                                 FILE * fp,
                     50:                                 BOOL leave_open);
                     51: </PRE>
2.19      frystyk    52: <H2>
2.20      frystyk    53:   <A NAME="converters">Various Converters using the File Writer Stream</A>
2.19      frystyk    54: </H2>
                     55: <P>
                     56: This is a set of functions that can be registered as converters. They all
                     57: use the basic ANSI C file writer stream for writing out to the local file
                     58: system.
2.5       frystyk    59: <PRE>
2.14      frystyk    60: extern HTConverter HTSaveAndExecute, HTSaveLocally, HTSaveAndCallback;
2.1       frystyk    61: </PRE>
2.19      frystyk    62: <P>
2.15      frystyk    63: <DL>
2.19      frystyk    64:   <DT>
                     65:     <CODE>HTSaveLocally</CODE>
                     66:   <DD>
                     67:     Saves a file to local disk. This can for example be used to dump date objects
                     68:     of unknown media types to local disk. The stream prompts for a file name
                     69:     for the temporary file.
                     70:   <DT>
                     71:     <CODE>HTSaveAndExecute</CODE>
                     72:   <DD>
                     73:     Creates temporary file, writes to it and then executes system command (maybe
                     74:     an external viewer) when <CODE>EOF</CODE> has been reached. The stream finds
                     75:     a suitable name of the temporary file which preserves the suffix. This way,
                     76:     the system command can find out the file type from the name of the temporary
                     77:     file name.
                     78:   <DT>
                     79:     <CODE>HTSaveAndCallback</CODE>
                     80:   <DD>
                     81:     This stream works exactly like the <CODE>HTSaveAndExecute</CODE> stream but
                     82:     in addition when <CODE>EOF</CODE> has been reached, it checks whether a callback
                     83:     function has been associated with the request object in which case, this
                     84:     callback is being called. This can be use by the application to do some
                     85:     processing <EM>after</EM> the system command has terminated. The callback
                     86:     function is called with the file name of the temporary file as parameter.
2.15      frystyk    87: </DL>
2.8       frystyk    88: <PRE>
2.1       frystyk    89: #endif
                     90: </PRE>
2.19      frystyk    91: <P>
                     92:   <HR>
2.18      frystyk    93: <ADDRESS>
2.21    ! frystyk    94:   @(#) $Id: HTFWrite.html,v 2.20 1996/06/01 17:46:47 frystyk Exp $
2.18      frystyk    95: </ADDRESS>
2.19      frystyk    96: </BODY></HTML>

Webmaster