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

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.3     ! frystyk     3: <TITLE>W3C Reference Library libwww Anchor Object</TITLE>
2.2       frystyk     4: <!-- Changed by: Henrik Frystyk Nielsen, 26-Feb-1996 -->
2.1       frystyk     5: </HEAD>
                      6: <BODY>
                      7: 
                      8: <H1>The Anchor and Link Objects</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 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"
                     30: </PRE>
                     31: 
                     32: <H2>The Link Object</H2>
                     33: 
                     34: Link Objects bind together anchor objects
                     35: 
                     36: <PRE>
                     37: struct _HTLink {
                     38:     HTAnchor *         dest;              /* The anchor to which this leads */
                     39:     HTLinkType         type;                      /* Semantics of this link */
                     40:     HTMethod           method;            /* Method for this link, e.g. PUT */
                     41:     HTLinkResult       result;    /* Result of any attempt to get this link */
                     42: };
                     43: </PRE>
                     44: 
                     45: <H2>The Anchor Object</H2>
                     46: 
                     47: We have a set of Anchor objects which of course should be sub classes
                     48: - but - hey - this is C - what do you expect!
                     49: 
                     50: <A NAME="Generic"><H3>Generic Anchor type</H3></A>
                     51: 
                     52: This is the super class of anchors. We often use this as an argument
                     53: to the functions that both accept parent anchors and child anchors. We
                     54: separate the first link from the others to avoid too many small
                     55: mallocs involved by a list creation. Most anchors only point to one
                     56: place.
                     57: 
                     58: <PRE>
                     59: struct _HTAnchor {
                     60:   HTLink       mainLink;       /* Main (or default) destination of this */
                     61:   HTList *     links;          /* List of extra links from this, if any */
                     62:   HTParentAnchor * parent;     /* Parent of this anchor (self for adults) */
                     63: };
                     64: </PRE>
                     65: 
                     66: <A NAME="parent"><H3>Anchor for a Parent Object</H3></A>
                     67: 
                     68: These anchors points to the whole contents of a graphic object
                     69: (document). The parent anchor of a parent anchor is itself. The parent
                     70: anchor now contains all meta information about the object. This is
                     71: largely the entity headers in the HTTP specification.
                     72: 
                     73: <PRE>
                     74: struct _HTParentAnchor {
                     75:   /* Common part from the generic anchor structure */
                     76:   HTLink       mainLink;       /* Main (or default) destination of this */
                     77:   HTList *     links;          /* List of extra links from this, if any */
                     78:   HTParentAnchor * parent;     /* Parent of this anchor (self) */
                     79: 
                     80:   /* ParentAnchor-specific information */
                     81:   HTList *     children;       /* Subanchors of this, if any */
                     82:   HTList *     sources;        /* List of anchors pointing to this, if any */
                     83:   void *       document;       /* The document within this is an anchor */
                     84:   char *       physical;       /* Physical address */
                     85:   BOOL         cacheHit;       /* Yes, if cached object found */
                     86:   char *       address;        /* Absolute address of this node */
                     87:   BOOL         isIndex;        /* Acceptance of a keyword search */
                     88: 
                     89:   /* Entity header fields */
                     90:   BOOL         header_parsed;  /* Are we done parsing? */
                     91: 
                     92:   char *       title;
2.2       frystyk    93:   HTMethod     methods;        /* Allowed methods (bit-flag) */
2.1       frystyk    94: 
                     95:   HTEncoding   content_encoding;
                     96:   HTLanguage   content_language;       /* @@@ SHOULD BE LIST @@@ */
                     97:   long int     content_length;
                     98:   HTCte                cte;            /* Content-Transfer-Encoding */
                     99:   HTFormat     content_type;
                    100:   HTCharset    charset;        /* Parameter to content-type */
                    101:   HTLevel      level;          /* Parameter to content-type `text/html' */
                    102: 
                    103:   time_t       date;           /* When was the request issued */  
                    104:   time_t       expires;        /* When does the copy expire */
                    105:   time_t       last_modified;
                    106: 
                    107:   char *       derived_from;   /* Opaque string */
                    108:   char *       version;        /* Opaque string */
                    109: 
                    110:   /* List of unknown headers coming in from the network. Use the field in the
                    111:      request structure for sending test headers. */
                    112:   HTList *     extra_headers;
                    113: };
                    114: </PRE>
                    115: 
                    116: <A NAME="child"><H3>Anchor for a Child Object</H3></A>
                    117: 
                    118: A child anchor is a anchor object that points to a subpart of a
                    119: graphic object (document)
                    120: 
                    121: <PRE>
                    122: struct _HTChildAnchor {
                    123:   /* Common part from the generic anchor structure */
                    124:   HTLink       mainLink;       /* Main (or default) destination of this */
                    125:   HTList *     links;          /* List of extra links from this, if any */
                    126:   HTParentAnchor * parent;     /* Parent of this anchor */
                    127: 
                    128:   /* ChildAnchor-specific information */
                    129:   char *       tag;            /* Address of this anchor relative to parent */
                    130: };
                    131: </PRE>
                    132: 
                    133: <PRE>
                    134: #endif /* HTANCMAN_H */
                    135: </PRE>
                    136: </BODY>
                    137: </HTML>

Webmaster