Annotation of libwww/Library/src/HTDAV.html, revision 1.2
1.1 kirschpi 1: <?xml version="1.0" encoding="iso-8859-1"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3: "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4: <html xmlns="http://www.w3.org/1999/xhtml">
5: <head>
6: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
7: <title>W3C Sample Code Library libwww WebDAV Access Methods</title>
8: <meta name="generator" content="amaya 5.3, see http://www.w3.org/Amaya/" />
9: </head>
10:
11: <body>
12: <h1>W3C Sample Code Library libwww WebDAV Access Methods</h1>
13: <pre>/*
1.2 ! kirschpi 14: ** (c) COPYRIGHT MIT 1995.
! 15: ** Please first read the full copyright statement in the file COPYRIGH.
1.1 kirschpi 16: */</pre>
17:
18: <p>This module contains methods for accessing URIs using WebDAV methods. It
19: also contains functions for headers definition.</p>
20:
1.2 ! kirschpi 21: <p>This module is implemented by <a href="HTDAV.c">HTDAV.c</a> and it is a
1.1 kirschpi 22: part of the <a href="http://www.w3.org/Library/">W3C Sample
23: CodeLibrary</a>.</p>
24: <pre>#ifndef HTDAV_H
25: #define HTDAV_H
26:
27: #ifdef HT_DAV
28: </pre>
29:
30: <h2>WebDAV HEADERS</h2>
31:
32: <p>WebDAV extension protocol defines new headers to be used in its requests.
33: See <a href="http://www.ietf.org/rfc/rfc2518.txt">RFC2518</a> for details.</p>
34: <pre>typedef struct _HTDAVHeaders HTDAVHeaders;
35:
36: extern HTDAVHeaders * HTDAVHeaders_new (void);
37: extern BOOL HTDAVHeaders_delete (HTDAVHeaders *me);
38: </pre>
39:
40: <h3>If Header</h3>
41:
42: <p>Manipulates the "If" header, which describes a series of state lists. The
43: caller must assure that the parameter "If" is well-formed. Below, you can see
44: a small description of If header format. See section 9.4 of <a
45: href="http://www.ietf.org/rfc/rfc2518.tx">RFC2518</a> for details.</p>
46:
47: <p>If = "If" ":" ( 1*NOTAGGED | 1*TAGGED )</p>
48:
49: <p>NOTAGGED = LIST</p>
50:
51: <p>TAGGED = CODED-URL 1*LIST</p>
52:
53: <p>LIST = "(" 1*( ["Not"] (STATE-TOKEN | "[" ENTITY-TAG "]" ) ) ")"</p>
54:
55: <p>STATE-TOKEN = CODED-URL</p>
56:
57: <p>CODED-URL = "<" AbsoluteURI "></p>
58:
59: <p><strong>Note</strong>: The caller should free the strings returned by
60: HTDAV_ifHeader method.</p>
61: <pre>extern BOOL HTDAV_setIfHeader (HTDAVHeaders *me, const char *If);
62: extern BOOL HTDAV_deleteIfHeader (HTDAVHeaders * me);
63: extern char * HTDAV_ifHeader (HTDAVHeaders *me);
64: </pre>
65:
66: <h3>Depth Header</h3>
67:
68: <p>Manipulates the "Depth" header. Depth header is used with methods executed
69: on resource which could have internal members (Collections) to indicate
70: whether the method should be applied to the resource children.</p>
71:
72: <p>The caller must assure that the parameter "Depth" is "0", "1" or
73: "infinity", and that its value can be applied in the used resquest method
74: (for example, LOCK method does not support Depth value 1).</p>
75:
76: <p><strong>Note</strong>: The caller should free the string returned by
77: HTDAV_DepthHeader method.</p>
78: <pre>extern BOOL HTDAV_setDepthHeader (HTDAVHeaders *me, const char *Depth);
79: extern BOOL HTDAV_deleteDepthHeader (HTDAVHeaders * me);
80: extern char * HTDAV_DepthHeader (HTDAVHeaders *me);</pre>
81:
82: <h3>Lock-Tocken header</h3>
83:
84: <p>Manipulates the "LockToken" header. It is used in UNLOCK method to
85: identify the lock to be removed. The caller must assure that the parameter is
86: a state token well-formed (<a
87: href="http://www.ietf.org/rfc/rfc2518.txt">RFC2518</a> section 9.5).</p>
88:
89: <p><strong>Note</strong>: The caller should free the string returned by
90: HTDAV_LockTokenHeader method.</p>
91: <pre>extern BOOL HTDAV_setLockTokenHeader (HTDAVHeaders *me, const char *LockToken);
92: extern BOOL HTDAV_deleteLockTokenHeader (HTDAVHeaders * me);
93: extern char * HTDAV_LockTokenHeader (HTDAVHeaders *me);</pre>
94:
95: <h3>Destination Header</h3>
96:
97: <p>Manipulates the "Destination" header. It is used in COPY and MOVE methods
98: to identify a destination resource. The caller must assure that the parameter
99: is an absolute URI.</p>
100:
101: <p><strong>Note</strong>: The caller should free the string returned by
102: HTDAV_DestinationHeader method.</p>
103: <pre>extern BOOL HTDAV_setDestinationHeader (HTDAVHeaders *me, const char *Destination);
104: extern BOOL HTDAV_deleteDestinationHeader (HTDAVHeaders * me);
105: extern char * HTDAV_DestinationHeader (HTDAVHeaders *me);</pre>
106:
107: <h3>Timeout Header</h3>
108:
109: <p>Manipulates the "Timeout" header. It is used in LOCK requests to indicate
110: the desired timeout value for the requested lock. However, according to the
111: <a href="http://www.ietf.org/rfc/rfc2518.txt">RFC2518</a>, the server is not
112: required to honor this value.</p>
113:
114: <p>The caller must assure that the parameter follows the specification in the
115: section 9.8 of RFC 2518:</p>
116:
117: <p>Timeout = "Timeout" ":" 1#TIMETYPE</p>
118:
119: <p>TIMETYPE = ( "Second-" VAL | "Infinite" | OTHER )</p>
120:
121: <p>VAL = 1*digit</p>
122:
123: <p>OTHER = "Extend" Field ; <a
124: href="http://www.ietf.org/rfc/rfc2068.txt">RFC2068</a> - section 4.2</p>
125:
126: <p><strong>Note</strong>: The caller should free the string returned by
127: HTDAV_TimeoutHeader method.</p>
128: <pre>extern BOOL HTDAV_setTimeoutHeader (HTDAVHeaders *me, const char *Timeout);
129: extern BOOL HTDAV_deleteTimeoutHeader (HTDAVHeaders * me);
130: extern char * HTDAV_TimeoutHeader (HTDAVHeaders *me);
131: </pre>
132:
133: <h3>Overwrite Header</h3>
134:
135: <p>Manipulates the "Overwrite" header. It is used in COPY and MOVE methods to
136: specify whether the server should overwrite a destination resource.</p>
137: <pre>extern BOOL HTDAV_setOverwriteHeader (HTDAVHeaders *me, BOOL Overwrite);
138: extern BOOL HTDAV_deleteOverwriteHeader (HTDAVHeaders * me);
139: extern BOOL HTDAV_OverwriteHeader (HTDAVHeaders * me);
140: </pre>
141:
142: <h2>WebDAV REQUESTS</h2>
143:
144: <p>WebDAV extension protocol defines new methods: LOCK, UNLOCK, MOVE, COPY,
145: MKCOL, PROPFIND, PROPPATCH (See <a
146: href="http://www.ietf.org/rfc/rfc2518.txt">RFC2518</a> for details).</p>
147:
148: <h3>LOCK Requests</h3>
149:
150: <p>A LOCK request create or refresh a lock over the destiny URI. If it wants
151: to create a new lock, the request should have a XML body (parameter
152: "xmlbody"), but if it is a refresh request, this body may be NULL and the
153: header "If" should be set in HTDAVHeaders object.</p>
154: <pre>extern BOOL HTLOCKDocumentAnchor(HTRequest * request, HTAnchor * dst,
155: HTParentAnchor *xmlbody, HTDAVHeaders *headers);
156: extern BOOL HTLOCKAnchor (HTRequest * request,HTAnchor * dst,
157: char * xmlbody, HTDAVHeaders * headers);
158: extern BOOL HTLOCKAbsolute (HTRequest * request, const char * uri,
159: char * xmlbody, HTDAVHeaders * headers);
160: extern BOOL HTLOCKRelative (HTRequest * request, const char * relative,
161: HTParentAnchor * base, char * xmlbody,
162: HTDAVHeaders * headers);</pre>
163:
164: <h3>UNLOCK Requests</h3>
165:
166: <p>An UNLOCK request removes a lock from the destiny URI. The request must
167: contain the Lock-Token header set in HTDAVHeaders object (so, the
168: HTDAVHeaders * headers parameter can't be NULL).</p>
169: <pre>extern BOOL HTUNLOCKAnchor (HTRequest * request, HTAnchor * dst,
170: HTDAVHeaders * headers);
171: extern BOOL HTUNLOCKAbsolute (HTRequest * request, const char * uri,
172: HTDAVHeaders * headers);
173: extern BOOL HTUNLOCKRelative (HTRequest * request, const char * relative,
174: HTParentAnchor * base, HTDAVHeaders * headers);</pre>
175:
176: <h3>PROPFIND Requests</h3>
177:
178: <p>PROPFIND requests returns properties defined for the resource. The request
179: may contain xml entity body with a "propfind" element, which may include an
180: "allprop" element (to get all properties), a "propname" element (the name of
181: all properties defined), and a "prop" element containing the desired
182: properties.</p>
183: <pre>extern BOOL HTPROPFINDAnchor (HTRequest * request, HTAnchor * dst,
184: const char * xmlbody, HTDAVHeaders * headers);
185: extern BOOL HTPROPFINDDocumentAnchor (HTRequest * request, HTAnchor * dst,
186: HTParentAnchor * xmlbody, HTDAVHeaders * headers);
187: extern BOOL HTPROPFINDAbsolute (HTRequest * request, const char * uri,
188: const char * xmlbody, HTDAVHeaders * headers);
189: extern BOOL HTPROPFINDRelative (HTRequest * request, const char * relative,
190: HTParentAnchor * base, const char * xmlbody,
191: HTDAVHeaders * headers);</pre>
192:
193: <h3>PROPPATCH Requests</h3>
194:
195: <p>PROPPATCH requests sets or removes properties defined for the resource.
196: The request MUST contain xml message body (parameter xmlbody) with a
197: "propertyupdate" element, which may include a "set" element (to set the
198: properties) or a "remove" element (to remove the properties).</p>
199: <pre>extern BOOL HTPROPPATCHAnchor (HTRequest * request, HTAnchor * dst,
200: const char * xmlbody,HTDAVHeaders * headers);
201: extern BOOL HTPROPPATCHDocumentAnchor (HTRequest * request,HTAnchor * dst,
202: HTParentAnchor * xmlbody,HTDAVHeaders * headers);
203: extern BOOL HTPROPPATCHAbsolute (HTRequest * request, const char * uri,
204: const char * xmlbody, HTDAVHeaders * headers);
205: extern BOOL HTPROPPATCHRelative (HTRequest * request, const char * relative,
206: HTParentAnchor * base, const char * xmlbody,
207: HTDAVHeaders * headers);</pre>
208:
209: <h3>MKCOL Requests</h3>
210:
211: <p>MKCOL requests are used to create Collections. The resource indicated by
212: the Request-URI (parameters HTAnchor *dst or char *absolute/relative) MUST
213: not exist, but all the resource's ancestros MUST exist.</p>
214: <pre>extern BOOL HTMKCOLAnchor (HTRequest * request, HTAnchor * dst,
215: HTDAVHeaders * headers);
216: extern BOOL HTMKCOLAbsolute (HTRequest * request, const char * uri,
217: HTDAVHeaders * headers);
218: extern BOOL HTMKCOLRelative (HTRequest * request, const char * relative,
219: HTParentAnchor * base, HTDAVHeaders * headers);</pre>
220:
221: <h3>COPY Requests</h3>
222:
223: <p>COPY requests copies the Request-URI (parameters HTAnchor *src or char
224: *absolute/relative) to the resource indicated in Destinarion header. The
225: HTDAVHeaders *headers parameter MUST be a non-null object and it MUST have
226: the Destination header set. Other headers may also be used, like Depth (0 or
227: infinity), If and Overwrite headers.</p>
228: <pre>extern BOOL HTCOPYAnchor (HTRequest * request, HTAnchor * src,
229: const char * xmlbody, HTDAVHeaders * headers);
230: extern BOOL HTCOPYDocumentAnchor (HTRequest * request, HTAnchor * src,
231: HTParentAnchor * xmlbody, HTDAVHeaders * headers);
232: extern BOOL HTCOPYAbsolute (HTRequest * request, const char * uri,
233: const char * xmlbody, HTDAVHeaders * headers);
234: extern BOOL HTCOPYRelative (HTRequest * request, const char * relative,
235: HTParentAnchor * base, const char * xmlbody,
236: HTDAVHeaders * headers);</pre>
237:
238: <h3>MOVE Requests</h3>
239:
240: <p>MOVE requests moves the Request-URI (parameters HTAnchor *src or char
241: *absolute/relative) to the resource indicated in Destinarion header. The
242: HTDAVHeaders *headers parameter MUST be a non-null object and it MUST have
243: the Destination header set. Other headers may also be used, like Depth ("0"
244: or "infinity" - if the resource is a Collection, Depth must only be
245: "infinity"), If and Overwrite headers.</p>
246: <pre>extern BOOL HTMOVEAnchor (HTRequest * request, HTAnchor * src,
247: const char * xmlbody, HTDAVHeaders * headers);
248: extern BOOL HTMOVEDocumentAnchor (HTRequest * request, HTAnchor * src,
249: HTParentAnchor * xmlbody, HTDAVHeaders * headers);
250: extern BOOL HTMOVEAbsolute (HTRequest * request, const char * uri,
251: const char * xmlbody, HTDAVHeaders * headers);
252: extern BOOL HTMOVERelative (HTRequest * request, const char * relative,
253: HTParentAnchor * base, const char * xmlbody,
254: HTDAVHeaders * headers);
255:
256: #endif /* HT_DAV */
257: #endif /* HTDAV_H */</pre>
258:
259: <p></p>
260: <hr />
261: <address>
1.2 ! kirschpi 262: $Id: HTDAV.html,v 1.1 2002/03/21 14:16:27 kirschpi Exp $
1.1 kirschpi 263: </address>
264:
265: <p></p>
266:
267: <p></p>
268: </body>
269: </html>
Webmaster