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

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

Webmaster