Annotation of libwww/Library/src/HTNDir.html, revision 2.2

2.1       frystyk     1: <HTML>
                      2: <HEAD>
                      3: <TITLE>Generic News Browsing</TITLE>
2.2     ! frystyk     4: <!-- Changed by: Henrik Frystyk Nielsen, 12-Nov-1995 -->
2.1       frystyk     5: </HEAD>
                      6: <BODY>
                      7: 
                      8: <H1>Generic News Browsing</H1>
                      9: 
                     10: <PRE>
                     11: /*
                     12: **     (c) COPYRIGHT MIT 1995.
                     13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
                     16: 
                     17: This news browser generates listings for NNTP reponses. This module
                     18: contains the protocol independent code and it produces the HTML
                     19: object. It is only included if the <A HREF="HTNews.html">NNTP</A>.<P>
                     20: 
                     21: This module is implemented by <A HREF="HTNDir.c">HTNDir.c</A>, and it
                     22: is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
                     23: Reference Library</A>.
                     24: 
                     25: <PRE>
                     26: #ifndef HTNDIR_H
                     27: #define HTNDIR_H
                     28: #include "HTReq.h"
                     29: </PRE>
                     30: 
                     31: <H2>What Should the Listings Look Like?</H2>
                     32: 
                     33: You can set how the listings are to be sorted using the following
                     34: flags.
                     35: 
                     36: <PRE>
                     37: typedef enum _HTNewsDirKey {
2.2     ! frystyk    38:     HT_NDK_NONE                = 0,                    /* Unsorted */
        !            39:     HT_NDK_INDEX       = 1,                    /* Sort by Message Number */
        !            40:     HT_NDK_DATE        = 2,                    /* Sort by date */
        !            41:     HT_NDK_SUBJECT     = 3,                    /* Sort by Subject */
        !            42:     HT_NDK_FROM                = 4,                    /* Sort by Sender */
        !            43:     HT_NDK_GROUP       = 5                     /* Sort group listing */
2.1       frystyk    44: } HTNewsDirKey;
                     45: </PRE>
                     46: 
                     47: <H2>The News Listing Object</H2>
                     48: 
                     49: The news listing object handles the generation of a news listing. It
                     50: is a bit like a stream in that it accept data, but it must be
                     51: formatted in a special way which makes the normal stream architecture
                     52: inadequate.
                     53: 
                     54: <H3>Create a News Listing Object</H3>
                     55: 
                     56: Creates a structured stream object and sets up the initial HTML stuff
                     57: Returns the dir object if OK, else NULL
                     58: 
                     59: <PRE>
                     60: typedef struct _HTNewsDir HTNewsDir;
                     61: extern HTNewsDir * HTNewsDir_new (HTRequest * request, CONST char * title,
                     62:                                  HTNewsDirKey key);
                     63: </PRE>
                     64: 
                     65: <H3>Add a Line to the List</H3>
                     66: 
                     67: This function accepts a news line. Everything except dir and nama can
                     68: can be 0 or NULL. Returns YES if OK, else NO
                     69: 
                     70: <PRE>
2.2     ! frystyk    71: extern BOOL HTNewsDir_addElement (HTNewsDir * dir, int index, char * subject,
        !            72:                                  char * from, time_t date, char * name,
        !            73:                                  int refs);
2.1       frystyk    74: </PRE>
                     75: 
                     76: <H3>Free a News Listing Object</H3>
                     77: 
                     78: If we are sorting then do the sorting and put out the list, else just
                     79: append the end of the list.
                     80: 
                     81: <PRE>
                     82: extern BOOL HTNewsDir_free (HTNewsDir * dir);
                     83: </PRE>
                     84: 
                     85: <PRE>
                     86: #endif /* HTNDIR */
                     87: </PRE>
                     88: End of declaration
                     89: </BODY>
                     90: </HTML>

Webmaster