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