Annotation of libwww/Library/src/HTAncMan.html, revision 2.6
2.1 frystyk 1: <HTML>
2: <HEAD>
2.3 frystyk 3: <TITLE>W3C Reference Library libwww Anchor Object</TITLE>
2.6 ! frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 17-Jun-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: BOOL header_parsed; /* Are we done parsing? */
90:
2.6 ! frystyk 91: /* Entity header fields */
2.1 frystyk 92: char * title;
2.2 frystyk 93: HTMethod methods; /* Allowed methods (bit-flag) */
2.1 frystyk 94:
2.6 ! frystyk 95: char * content_base;
2.4 frystyk 96: HTList * content_encoding;
97: HTList * content_language;
2.6 ! frystyk 98: long int content_length;
! 99: char * content_location;
2.4 frystyk 100:
2.5 frystyk 101: HTEncoding transfer; /* Content-Transfer-Encoding */
2.1 frystyk 102: HTFormat content_type;
103: HTCharset charset; /* Parameter to content-type */
104: HTLevel level; /* Parameter to content-type `text/html' */
105:
106: time_t date; /* When was the request issued */
107: time_t expires; /* When does the copy expire */
108: time_t last_modified;
109:
110: char * derived_from; /* Opaque string */
111: char * version; /* Opaque string */
112:
113: /* List of unknown headers coming in from the network. Use the field in the
114: request structure for sending test headers. */
115: HTList * extra_headers;
116: };
117: </PRE>
118:
119: <A NAME="child"><H3>Anchor for a Child Object</H3></A>
120:
121: A child anchor is a anchor object that points to a subpart of a
122: graphic object (document)
123:
124: <PRE>
125: struct _HTChildAnchor {
126: /* Common part from the generic anchor structure */
127: HTLink mainLink; /* Main (or default) destination of this */
128: HTList * links; /* List of extra links from this, if any */
129: HTParentAnchor * parent; /* Parent of this anchor */
130:
131: /* ChildAnchor-specific information */
132: char * tag; /* Address of this anchor relative to parent */
133: };
134: </PRE>
135:
136: <PRE>
137: #endif /* HTANCMAN_H */
138: </PRE>
2.4 frystyk 139:
140: <HR>
141: <ADDRESS>
2.6 ! frystyk 142: @(#) $Id: HTAncMan.html,v 2.5 1996/04/15 21:05:43 frystyk Exp $
2.4 frystyk 143: </ADDRESS>
2.1 frystyk 144: </BODY>
145: </HTML>
Webmaster