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 // MARKER(update_precomp.py): autogen include statement, do not remove 23 #include "precompiled_ucb.hxx" 24 25 #include "SerfRequestProcessorImplFac.hxx" 26 #include "SerfPropFindReqProcImpl.hxx" 27 #include "SerfPropPatchReqProcImpl.hxx" 28 #include "SerfGetReqProcImpl.hxx" 29 #include "SerfHeadReqProcImpl.hxx" 30 #include "SerfPutReqProcImpl.hxx" 31 #include "SerfPostReqProcImpl.hxx" 32 #include "SerfDeleteReqProcImpl.hxx" 33 #include "SerfMkColReqProcImpl.hxx" 34 #include "SerfCopyReqProcImpl.hxx" 35 #include "SerfMoveReqProcImpl.hxx" 36 37 namespace http_dav_ucp 38 { 39 SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, 40 const DAVRequestHeaders& inRequestHeaders, 41 const Depth inDepth, 42 const std::vector< ::rtl::OUString > & inPropNames, 43 std::vector< DAVResource > & ioResources ) 44 { 45 SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 46 inRequestHeaders, 47 inDepth, 48 inPropNames, 49 ioResources ); 50 return pReqProcImpl; 51 } 52 53 SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, 54 const DAVRequestHeaders& inRequestHeaders, 55 const Depth inDepth, 56 std::vector< DAVResourceInfo > & ioResInfo ) 57 { 58 SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 59 inRequestHeaders, 60 inDepth, 61 ioResInfo ); 62 return pReqProcImpl; 63 } 64 65 SerfRequestProcessorImpl* createPropPatchReqProcImpl( const char* inPath, 66 const DAVRequestHeaders& inRequestHeaders, 67 const std::vector< ProppatchValue > & inProperties ) 68 { 69 SerfRequestProcessorImpl* pReqProcImpl = new SerfPropPatchReqProcImpl( inPath, 70 inRequestHeaders, 71 inProperties ); 72 return pReqProcImpl; 73 } 74 75 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 76 const DAVRequestHeaders& inRequestHeaders, 77 const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 78 { 79 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 80 inRequestHeaders, 81 xioInStrm ); 82 return pReqProcImpl; 83 } 84 85 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 86 const DAVRequestHeaders& inRequestHeaders, 87 const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm, 88 const std::vector< ::rtl::OUString > & inHeaderNames, 89 DAVResource& ioResource ) 90 { 91 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 92 inRequestHeaders, 93 xioInStrm, 94 inHeaderNames, 95 ioResource ); 96 return pReqProcImpl; 97 } 98 99 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 100 const DAVRequestHeaders& inRequestHeaders, 101 const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 102 { 103 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 104 inRequestHeaders, 105 xioOutStrm ); 106 return pReqProcImpl; 107 } 108 109 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 110 const DAVRequestHeaders& inRequestHeaders, 111 const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream >& xioOutStrm, 112 const std::vector< ::rtl::OUString > & inHeaderNames, 113 DAVResource& ioResource ) 114 { 115 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 116 inRequestHeaders, 117 xioOutStrm, 118 inHeaderNames, 119 ioResource ); 120 return pReqProcImpl; 121 } 122 123 SerfRequestProcessorImpl* createHeadReqProcImpl( const char* inPath, 124 const DAVRequestHeaders& inRequestHeaders, 125 const std::vector< ::rtl::OUString > & inHeaderNames, 126 DAVResource& ioResource ) 127 { 128 SerfRequestProcessorImpl* pReqProcImpl = new SerfHeadReqProcImpl( inPath, 129 inRequestHeaders, 130 inHeaderNames, 131 ioResource ); 132 return pReqProcImpl; 133 } 134 135 136 SerfRequestProcessorImpl* createPutReqProcImpl( const char* inPath, 137 const DAVRequestHeaders& inRequestHeaders, 138 const char* inData, 139 apr_size_t inDataLen ) 140 { 141 SerfRequestProcessorImpl* pReqProcImpl = new SerfPutReqProcImpl( inPath, 142 inRequestHeaders, 143 inData, 144 inDataLen ); 145 return pReqProcImpl; 146 } 147 148 SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 149 const DAVRequestHeaders& inRequestHeaders, 150 const char* inData, 151 apr_size_t inDataLen, 152 const char* inContentType, 153 const char* inReferer, 154 const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 155 { 156 SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 157 inRequestHeaders, 158 inData, 159 inDataLen, 160 inContentType, 161 inReferer, 162 xioInStrm ); 163 return pReqProcImpl; 164 } 165 166 SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 167 const DAVRequestHeaders& inRequestHeaders, 168 const char* inData, 169 apr_size_t inDataLen, 170 const char* inContentType, 171 const char* inReferer, 172 const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 173 { 174 SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 175 inRequestHeaders, 176 inData, 177 inDataLen, 178 inContentType, 179 inReferer, 180 xioOutStrm ); 181 return pReqProcImpl; 182 } 183 184 SerfRequestProcessorImpl* createDeleteReqProcImpl( const char* inPath, 185 const DAVRequestHeaders& inRequestHeaders ) 186 { 187 SerfRequestProcessorImpl* pReqProcImpl = new SerfDeleteReqProcImpl( inPath, 188 inRequestHeaders ); 189 return pReqProcImpl; 190 } 191 192 SerfRequestProcessorImpl* createMkColReqProcImpl( const char* inPath, 193 const DAVRequestHeaders& inRequestHeaders ) 194 { 195 SerfRequestProcessorImpl* pReqProcImpl = new SerfMkColReqProcImpl( inPath, 196 inRequestHeaders ); 197 return pReqProcImpl; 198 } 199 200 SerfRequestProcessorImpl* createCopyReqProcImpl( const char* inSourcePath, 201 const DAVRequestHeaders& inRequestHeaders, 202 const char* inDestinationPath, 203 const bool inOverwrite ) 204 { 205 SerfRequestProcessorImpl* pReqProcImpl = new SerfCopyReqProcImpl( inSourcePath, 206 inRequestHeaders, 207 inDestinationPath, 208 inOverwrite ); 209 return pReqProcImpl; 210 } 211 212 SerfRequestProcessorImpl* createMoveReqProcImpl( const char* inSourcePath, 213 const DAVRequestHeaders& inRequestHeaders, 214 const char* inDestinationPath, 215 const bool inOverwrite ) 216 { 217 SerfRequestProcessorImpl* pReqProcImpl = new SerfMoveReqProcImpl( inSourcePath, 218 inRequestHeaders, 219 inDestinationPath, 220 inOverwrite ); 221 return pReqProcImpl; 222 } 223 224 } // namespace http_dav_ucp 225