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

2.1     ! frystyk     1: <HTML>
        !             2: <HEAD>
        !             3: <TITLE>Generic News Browsing</TITLE>
        !             4: <!-- Changed by: Henrik Frystyk Nielsen, 29-Oct-1995 -->
        !             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 {
        !            38:     HT_NDK_THREAD      = 0,                    /* Sort by Thread */
        !            39:     HT_NDK_SUBJECT     = 1,                    /* Sort by Subject */
        !            40:     HT_NDK_FROM                = 2,                    /* Sort by Sender */
        !            41:     HT_NDK_GROUP       = 3                     /* Sort group listing */
        !            42: } HTNewsDirKey;
        !            43: </PRE>
        !            44: 
        !            45: <H2>The News Listing Object</H2>
        !            46: 
        !            47: The news listing object handles the generation of a news listing. It
        !            48: is a bit like a stream in that it accept data, but it must be
        !            49: formatted in a special way which makes the normal stream architecture
        !            50: inadequate.
        !            51: 
        !            52: <H3>Create a News Listing Object</H3>
        !            53: 
        !            54: Creates a structured stream object and sets up the initial HTML stuff
        !            55: Returns the dir object if OK, else NULL
        !            56: 
        !            57: <PRE>
        !            58: typedef struct _HTNewsDir HTNewsDir;
        !            59: extern HTNewsDir * HTNewsDir_new (HTRequest * request, CONST char * title,
        !            60:                                  HTNewsDirKey key);
        !            61: </PRE>
        !            62: 
        !            63: <H3>Add a Line to the List</H3>
        !            64: 
        !            65: This function accepts a news line. Everything except dir and nama can
        !            66: can be 0 or NULL. Returns YES if OK, else NO
        !            67: 
        !            68: <PRE>
        !            69: extern BOOL HTNewsDir_addElement (HTNewsDir * dir, char * name, int  index,
        !            70:                                  char * subject, char * from, int refs);
        !            71: </PRE>
        !            72: 
        !            73: <H3>Free a News Listing Object</H3>
        !            74: 
        !            75: If we are sorting then do the sorting and put out the list, else just
        !            76: append the end of the list.
        !            77: 
        !            78: <PRE>
        !            79: extern BOOL HTNewsDir_free (HTNewsDir * dir);
        !            80: </PRE>
        !            81: 
        !            82: <PRE>
        !            83: #endif /* HTNDIR */
        !            84: </PRE>
        !            85: End of declaration
        !            86: </BODY>
        !            87: </HTML>

Webmaster