Annotation of libwww/Library/src/HTAncMan.html, revision 2.11
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: 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.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 */
2.10 frystyk 98: time_t age; /* Cache estimate of age */
2.7 frystyk 99: char * etag; /* entity tag */
2.1 frystyk 100:
101: char * derived_from; /* Opaque string */
102: char * version; /* Opaque string */
103: };
104: </PRE>
105:
106: <A NAME="child"><H3>Anchor for a Child Object</H3></A>
107:
108: A child anchor is a anchor object that points to a subpart of a
109: graphic object (document)
110:
111: <PRE>
112: struct _HTChildAnchor {
113: /* Common part from the generic anchor structure */
114: HTLink mainLink; /* Main (or default) destination of this */
115: HTList * links; /* List of extra links from this, if any */
116: HTParentAnchor * parent; /* Parent of this anchor */
117:
118: /* ChildAnchor-specific information */
119: char * tag; /* Address of this anchor relative to parent */
120: };
121: </PRE>
122:
123: <PRE>
124: #endif /* HTANCMAN_H */
125: </PRE>
2.4 frystyk 126:
127: <HR>
128: <ADDRESS>
2.11 ! frystyk 129: @(#) $Id: HTAncMan.html,v 2.10 1996/09/08 22:08:05 frystyk Exp $
2.4 frystyk 130: </ADDRESS>
2.1 frystyk 131: </BODY>
132: </HTML>
2.7 frystyk 133:
134:
135:
Webmaster