Annotation of libwww/Library/src/HTAncMan.html, revision 2.13
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"
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: char * address; /* Absolute address of this node */
71: BOOL isIndex; /* Acceptance of a keyword search */
72:
2.11 frystyk 73: HTAssocList * headers; /* Unparsed headers */
2.1 frystyk 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.11 frystyk 81: HTMethod allow; /* 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.13 ! frystyk 86: HTAssocList * meta_tags; /* Set of metatags found in the HTML text */
! 87:
2.6 frystyk 88: char * content_base;
2.4 frystyk 89: HTList * content_encoding;
90: HTList * content_language;
2.6 frystyk 91: long int content_length;
92: char * content_location;
2.7 frystyk 93: char * content_md5;
2.4 frystyk 94:
2.5 frystyk 95: HTEncoding transfer; /* Content-Transfer-Encoding */
2.1 frystyk 96:
97: time_t date; /* When was the request issued */
98: time_t expires; /* When does the copy expire */
2.7 frystyk 99: time_t last_modified; /* When was this last modified */
2.10 frystyk 100: time_t age; /* Cache estimate of age */
2.7 frystyk 101: char * etag; /* entity tag */
2.1 frystyk 102:
103: char * derived_from; /* Opaque string */
104: char * version; /* Opaque string */
105: };
106: </PRE>
107:
108: <A NAME="child"><H3>Anchor for a Child Object</H3></A>
109:
110: A child anchor is a anchor object that points to a subpart of a
111: graphic object (document)
112:
113: <PRE>
114: struct _HTChildAnchor {
115: /* Common part from the generic anchor structure */
116: HTLink mainLink; /* Main (or default) destination of this */
117: HTList * links; /* List of extra links from this, if any */
118: HTParentAnchor * parent; /* Parent of this anchor */
119:
120: /* ChildAnchor-specific information */
121: char * tag; /* Address of this anchor relative to parent */
122: };
123: </PRE>
124:
125: <PRE>
126: #endif /* HTANCMAN_H */
127: </PRE>
2.4 frystyk 128:
129: <HR>
130: <ADDRESS>
2.13 ! frystyk 131: @(#) $Id: HTAncMan.html,v 2.12 1997/02/16 18:41:54 frystyk Exp $
2.4 frystyk 132: </ADDRESS>
2.1 frystyk 133: </BODY>
134: </HTML>
2.7 frystyk 135:
136:
137:
Webmaster