Annotation of libwww/Library/src/HTAncMan.html, revision 2.15

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.12      frystyk     3: <TITLE>W3C Sample Code Library libwww Anchor Object</TITLE>
2.9       frystyk     4: <!-- Changed by: Henrik Frystyk Nielsen, 16-Jul-1996 -->
2.1       frystyk     5: </HEAD>
                      6: <BODY>
                      7: 
2.7       frystyk     8: <H1>The Anchor Class Definition</H1>
2.1       frystyk     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 module is the private part of the anchor object. It has the
                     18: functions declarations that are private to the Library and that
                     19: shouldn't be used by applications. See also the public part of the
                     20: declarition in the <A HREF="HTAnchor.html">HTAnchorModule</A>.<P>
                     21: 
                     22: <PRE>
                     23: #ifndef HTANCMAN_H
                     24: #define HTANCMAN_H
                     25: 
                     26: #include "HTAnchor.h"
                     27: #include "HTList.h"
                     28: #include "HTAtom.h"
                     29: #include "HTMethod.h"
2.15    ! vbancrof   30: 
        !            31: #ifdef __cplusplus
        !            32: extern "C" { 
        !            33: #endif 
        !            34: 
2.1       frystyk    35: </PRE>
                     36: 
                     37: We have a set of Anchor objects which of course should be sub classes
                     38: - but - hey - this is C - what do you expect!
                     39: 
                     40: <A NAME="Generic"><H3>Generic Anchor type</H3></A>
                     41: 
                     42: This is the super class of anchors. We often use this as an argument
                     43: to the functions that both accept parent anchors and child anchors. We
                     44: separate the first link from the others to avoid too many small
                     45: mallocs involved by a list creation. Most anchors only point to one
                     46: place.
                     47: 
                     48: <PRE>
                     49: struct _HTAnchor {
                     50:   HTLink       mainLink;       /* Main (or default) destination of this */
                     51:   HTList *     links;          /* List of extra links from this, if any */
                     52:   HTParentAnchor * parent;     /* Parent of this anchor (self for adults) */
                     53: };
                     54: </PRE>
                     55: 
                     56: <A NAME="parent"><H3>Anchor for a Parent Object</H3></A>
                     57: 
                     58: These anchors points to the whole contents of a graphic object
                     59: (document). The parent anchor of a parent anchor is itself. The parent
                     60: anchor now contains all meta information about the object. This is
                     61: largely the entity headers in the HTTP specification.
                     62: 
                     63: <PRE>
                     64: struct _HTParentAnchor {
                     65:   /* Common part from the generic anchor structure */
                     66:   HTLink       mainLink;       /* Main (or default) destination of this */
                     67:   HTList *     links;          /* List of extra links from this, if any */
                     68:   HTParentAnchor * parent;     /* Parent of this anchor (self) */
                     69: 
                     70:   /* ParentAnchor-specific information */
2.9       frystyk    71:   HTList **    children;       /* Hash of subanchors of this, if any */
2.1       frystyk    72:   HTList *     sources;        /* List of anchors pointing to this, if any */
                     73:   void *       document;       /* The document within this is an anchor */
                     74:   char *       physical;       /* Physical address */
                     75:   char *       address;        /* Absolute address of this node */
                     76:   BOOL         isIndex;        /* Acceptance of a keyword search */
                     77: 
2.11      frystyk    78:   HTAssocList * headers;        /* Unparsed headers */
2.1       frystyk    79:   BOOL         header_parsed;  /* Are we done parsing? */
                     80: 
2.7       frystyk    81:   /* We keep a list of variants of this anchor, if any */
                     82:   HTList *     variants;
                     83: 
2.6       frystyk    84:   /* Entity header fields */
2.1       frystyk    85:   char *       title;
2.11      frystyk    86:   HTMethod     allow;          /* Allowed methods (bit-flag) */
2.1       frystyk    87: 
2.7       frystyk    88:   HTFormat     content_type;   /* Content type */
                     89:   HTAssocList *        type_parameters;/* Content type parameters (charset etc.) */
                     90: 
2.13      frystyk    91:   HTAssocList * meta_tags;      /* Set of metatags found in the HTML text */
                     92: 
2.6       frystyk    93:   char *       content_base;
2.4       frystyk    94:   HTList *     content_encoding;
                     95:   HTList *     content_language;
2.6       frystyk    96:   long int     content_length;
                     97:   char *       content_location;
2.7       frystyk    98:   char *       content_md5;
2.4       frystyk    99: 
2.14      frystyk   100:   HTEncoding   cte;            /* Content-Transfer-Encoding */
2.1       frystyk   101: 
                    102:   time_t       date;           /* When was the request issued */  
                    103:   time_t       expires;        /* When does the copy expire */
2.7       frystyk   104:   time_t       last_modified;  /* When was this last modified */
2.10      frystyk   105:   time_t       age;            /* Cache estimate of age */
2.7       frystyk   106:   char *       etag;           /* entity tag */
2.1       frystyk   107: 
                    108:   char *       derived_from;   /* Opaque string */
                    109:   char *       version;        /* Opaque string */
                    110: };
                    111: </PRE>
                    112: 
                    113: <A NAME="child"><H3>Anchor for a Child Object</H3></A>
                    114: 
                    115: A child anchor is a anchor object that points to a subpart of a
                    116: graphic object (document)
                    117: 
                    118: <PRE>
                    119: struct _HTChildAnchor {
                    120:   /* Common part from the generic anchor structure */
                    121:   HTLink       mainLink;       /* Main (or default) destination of this */
                    122:   HTList *     links;          /* List of extra links from this, if any */
                    123:   HTParentAnchor * parent;     /* Parent of this anchor */
                    124: 
                    125:   /* ChildAnchor-specific information */
                    126:   char *       tag;            /* Address of this anchor relative to parent */
                    127: };
                    128: </PRE>
                    129: 
                    130: <PRE>
2.15    ! vbancrof  131: #ifdef __cplusplus
        !           132: }
        !           133: #endif
        !           134: 
2.1       frystyk   135: #endif /* HTANCMAN_H */
                    136: </PRE>
2.4       frystyk   137: 
                    138: <HR>
                    139: <ADDRESS>
2.15    ! vbancrof  140: @(#) $Id: HTAncMan.html,v 2.14 1998/03/05 21:56:09 frystyk Exp $
2.4       frystyk   141: </ADDRESS>
2.1       frystyk   142: </BODY>
                    143: </HTML>
2.7       frystyk   144: 
                    145: 
                    146: 

Webmaster