Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_dav.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Copyright (c) 2000-2007 CollabNet. All rights reserved.
5  *
6  * This software is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution. The terms
8  * are also available at http://subversion.tigris.org/license-1.html.
9  * If newer versions of this license are posted there, you may use a
10  * newer version instead, at your option.
11  *
12  * This software consists of voluntary contributions made by many
13  * individuals. For exact contribution history, see the revision
14  * history and logs, available at http://subversion.tigris.org/.
15  * ====================================================================
16  * @endcopyright
17  *
18  * @file svn_dav.h
19  * @brief Code related to WebDAV/DeltaV usage in Subversion.
20  */
21 
22 
23 
24 
25 #ifndef SVN_DAV_H
26 #define SVN_DAV_H
27 
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32 
33 
34 /** This is the MIME type that Subversion uses for its "svndiff" format.
35  *
36  * This is an application type, for the "svn" vendor. The specific subtype
37  * is "svndiff".
38  */
39 #define SVN_SVNDIFF_MIME_TYPE "application/vnd.svn-svndiff"
40 
41 
42 /** This header is *TEMPORARILY* used to transmit the delta base to the
43  * server. It contains a version resource URL for what is on the client.
44  */
45 #define SVN_DAV_DELTA_BASE_HEADER "X-SVN-VR-Base"
46 
47 /** This header is used when an svn client wants to trigger specific
48  * svn server behaviors. Normal WebDAV or DeltaV clients won't use it.
49  */
50 #define SVN_DAV_OPTIONS_HEADER "X-SVN-Options"
51 
52 /**
53  * @name options-header defines
54  * Specific options that can appear in the options-header:
55  * @{
56  */
57 #define SVN_DAV_OPTION_NO_MERGE_RESPONSE "no-merge-response"
58 #define SVN_DAV_OPTION_LOCK_BREAK "lock-break"
59 #define SVN_DAV_OPTION_LOCK_STEAL "lock-steal"
60 #define SVN_DAV_OPTION_RELEASE_LOCKS "release-locks"
61 #define SVN_DAV_OPTION_KEEP_LOCKS "keep-locks"
62 /** @} */
63 
64 /** This header is used when an svn client wants to tell mod_dav_svn
65  * exactly what revision of a resource it thinks it's operating on.
66  * (For example, an svn server can use it to validate a DELETE request.)
67  * Normal WebDAV or DeltaV clients won't use it.
68  */
69 #define SVN_DAV_VERSION_NAME_HEADER "X-SVN-Version-Name"
70 
71 /** A header generated by mod_dav_svn whenever it responds
72  successfully to a LOCK request. Only svn clients will notice it,
73  and use it to fill in svn_lock_t->creation_date. */
74 #define SVN_DAV_CREATIONDATE_HEADER "X-SVN-Creation-Date"
75 
76 /** A header generated by mod_dav_svn whenever it responds
77  successfully to a PROPFIND for the 'DAV:lockdiscovery' property.
78  Only svn clients will notice it, and use it to fill in
79  svn_lock_t->owner. (Remember that the DAV:owner field maps to
80  svn_lock_t->comment, and that there is no analogue in the DAV
81  universe of svn_lock_t->owner.) */
82 #define SVN_DAV_LOCK_OWNER_HEADER "X-SVN-Lock-Owner"
83 
84 
85 /**
86  * @name Fulltext MD5 headers
87  *
88  * These headers are for client and server to verify that the base
89  * and the result of a change transmission are the same on both
90  * sides, regardless of what transformations (svndiff deltification,
91  * gzipping, etc) the data may have gone through in between.
92  *
93  * The result md5 is always used whenever file contents are
94  * transferred, because every transmission has a resulting text.
95  *
96  * The base md5 is used to verify the base text against which svndiff
97  * data is being applied. Note that even for svndiff transmissions,
98  * base verification is not strictly necessary (and may therefore be
99  * unimplemented), as any error will be caught by the verification of
100  * the final result. However, if the problem is that the base text is
101  * corrupt, the error will be caught earlier if the base md5 is used.
102  *
103  * Normal WebDAV or DeltaV clients don't use these.
104  * @{
105  */
106 #define SVN_DAV_BASE_FULLTEXT_MD5_HEADER "X-SVN-Base-Fulltext-MD5"
107 #define SVN_DAV_RESULT_FULLTEXT_MD5_HEADER "X-SVN-Result-Fulltext-MD5"
108 /** @} */
109 
110 /* ### should add strings for the various XML elements in the reports
111  ### and things. also the custom prop names. etc.
112 */
113 
114 /** The svn-specific object that is placed within a <D:error> response.
115  *
116  * @defgroup svn_dav_error Errors in svn_dav
117  * @{ */
118 
119 /** The error object's namespace */
120 #define SVN_DAV_ERROR_NAMESPACE "svn:"
121 
122 /** The error object's tag */
123 #define SVN_DAV_ERROR_TAG "error"
124 
125 /** @} */
126 
127 
128 /** General property (xml) namespaces that will be used by both ra_dav
129  * and mod_dav_svn for marshalling properties.
130  *
131  * @defgroup svn_dav_property_xml_namespaces DAV property namespaces
132  * @{
133  */
134 
135 /** A property stored in the fs and wc, begins with 'svn:', and is
136  * interpreted either by client or server.
137  */
138 #define SVN_DAV_PROP_NS_SVN "http://subversion.tigris.org/xmlns/svn/"
139 
140 /** A property stored in the fs and wc, but totally ignored by svn
141  * client and server.
142  *
143  * A property simply invented by the users.
144  */
145 #define SVN_DAV_PROP_NS_CUSTOM "http://subversion.tigris.org/xmlns/custom/"
146 
147 /** A property purely generated and consumed by the network layer, not
148  * seen by either fs or wc.
149  */
150 #define SVN_DAV_PROP_NS_DAV "http://subversion.tigris.org/xmlns/dav/"
151 
152 
153 /**
154  * @name Custom (extension) values for the DAV header.
155  * Note that although these share the SVN_DAV_PROP_NS_DAV namespace
156  * prefix, they are not properties; they are header values.
157  *
158  * @{ **/
159 
160 /** Presence of this in a DAV header in an OPTIONS request or response
161  * indicates that the transmitter supports @c svn_depth_t. */
162 #define SVN_DAV_NS_DAV_SVN_DEPTH SVN_DAV_PROP_NS_DAV "svn/depth"
163 
164 /** Presence of this in a DAV header in an OPTIONS request or response
165  * indicates that the server knows how to handle merge-tracking
166  * information.
167  *
168  * Note that this says nothing about whether the repository can handle
169  * mergeinfo, only whether the server does. For more information, see
170  * mod_dav_svn/version.c:get_vsn_options().
171  */
172 #define SVN_DAV_NS_DAV_SVN_MERGEINFO SVN_DAV_PROP_NS_DAV "svn/mergeinfo"
173 
174 /** Presence of this in a DAV header in an OPTIONS response indicates
175  * that the transmitter (in this case, the server) knows how to send
176  * custom revprops in log responses. */
177 #define SVN_DAV_NS_DAV_SVN_LOG_REVPROPS SVN_DAV_PROP_NS_DAV "svn/log-revprops"
178 
179 /** Presence of this in a DAV header in an OPTIONS response indicates
180  * that the transmitter (in this case, the server) knows how to handle
181  * a replay of a directory in the repository (not root). */
182 #define SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY\
183  SVN_DAV_PROP_NS_DAV "svn/partial-replay"
184 
185 /** @} */
186 
187 /** @} */
188 
189 #ifdef __cplusplus
190 }
191 #endif /* __cplusplus */
192 
193 #endif /* SVN_DAV_H */