xref: /aoo42x/main/ucb/source/ucp/webdav/DAVTypes.hxx (revision 9c0c1533)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _DAVTYPES_HXX_
25 #define _DAVTYPES_HXX_
26 
27 #include <rtl/ustring.hxx>
28 #include <com/sun/star/uno/Any.hxx>
29 
30 namespace http_dav_ucp
31 {
32 /* RFC 2518
33 
34 15.1 Class 1
35 
36    A class 1 compliant resource MUST meet all "MUST" requirements in all
37    sections of this document.
38 
39    Class 1 compliant resources MUST return, at minimum, the value "1" in
40    the DAV header on all responses to the OPTIONS method.
41 
42 15.2 Class 2
43 
44    A class 2 compliant resource MUST meet all class 1 requirements and
45    support the LOCK method, the supportedlock property, the
46    lockdiscovery property, the Time-Out response header and the Lock-
47    Token request header.  A class "2" compliant resource SHOULD also
48    support the Time-Out request header and the owner XML element.
49 
50    Class 2 compliant resources MUST return, at minimum, the values "1"
51    and "2" in the DAV header on all responses to the OPTIONS method.
52 */
53 
54 struct DAVCapabilities
55 {
56 	bool class1;
57 	bool class2;
58 	bool executable; // supports "executable" property (introduced by mod_dav)
59 
DAVCapabilitieshttp_dav_ucp::DAVCapabilities60 	DAVCapabilities() : class1( false ), class2( false ), executable( false ) {}
61 };
62 
63 enum Depth { DAVZERO = 0, DAVONE = 1, DAVINFINITY = -1 };
64 
65 enum ProppatchOperation { PROPSET = 0, PROPREMOVE = 1 };
66 
67 struct ProppatchValue
68 {
69 	ProppatchOperation 		 operation;
70 	rtl::OUString            name;
71 	com::sun::star::uno::Any value;
72 
ProppatchValuehttp_dav_ucp::ProppatchValue73 	ProppatchValue( const ProppatchOperation o,
74 					const rtl::OUString & n,
75 					const com::sun::star::uno::Any & v )
76 	: operation( o ), name( n ), value( v ) {}
77 };
78 
79 enum LockScope { EXCLUSIVE = 0, SHARED = 1 };
80 
81 } // namespace http_dav_ucp
82 
83 #endif // _DAVTYPES_HXX_
84