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 Depth inDepth, 41 const std::vector< ::rtl::OUString > & inPropNames, 42 std::vector< DAVResource > & ioResources ) 43 { 44 SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 45 inDepth, 46 inPropNames, 47 ioResources ); 48 return pReqProcImpl; 49 } 50 51 SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, 52 const Depth inDepth, 53 std::vector< DAVResourceInfo > & ioResInfo ) 54 { 55 SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 56 inDepth, 57 ioResInfo ); 58 return pReqProcImpl; 59 } 60 61 SerfRequestProcessorImpl* createPropPatchReqProcImpl( const char* inPath, 62 const std::vector< ProppatchValue > & inProperties ) 63 { 64 SerfRequestProcessorImpl* pReqProcImpl = new SerfPropPatchReqProcImpl( inPath, 65 inProperties ); 66 return pReqProcImpl; 67 } 68 69 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 70 const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 71 { 72 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 73 xioInStrm ); 74 return pReqProcImpl; 75 } 76 77 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 78 const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm, 79 const std::vector< ::rtl::OUString > & inHeaderNames, 80 DAVResource& ioResource ) 81 { 82 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 83 xioInStrm, 84 inHeaderNames, 85 ioResource ); 86 return pReqProcImpl; 87 } 88 89 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 90 const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 91 { 92 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 93 xioOutStrm ); 94 return pReqProcImpl; 95 } 96 97 SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 98 const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream >& xioOutStrm, 99 const std::vector< ::rtl::OUString > & inHeaderNames, 100 DAVResource& ioResource ) 101 { 102 SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 103 xioOutStrm, 104 inHeaderNames, 105 ioResource ); 106 return pReqProcImpl; 107 } 108 109 SerfRequestProcessorImpl* createHeadReqProcImpl( const char* inPath, 110 const std::vector< ::rtl::OUString > & inHeaderNames, 111 DAVResource& ioResource ) 112 { 113 SerfRequestProcessorImpl* pReqProcImpl = new SerfHeadReqProcImpl( inPath, 114 inHeaderNames, 115 ioResource ); 116 return pReqProcImpl; 117 } 118 119 120 SerfRequestProcessorImpl* createPutReqProcImpl( const char* inPath, 121 const char* inData, 122 apr_size_t inDataLen ) 123 { 124 SerfRequestProcessorImpl* pReqProcImpl = new SerfPutReqProcImpl( inPath, 125 inData, 126 inDataLen ); 127 return pReqProcImpl; 128 } 129 130 SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 131 const char* inData, 132 apr_size_t inDataLen, 133 const char* inContentType, 134 const char* inReferer, 135 const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 136 { 137 SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 138 inData, 139 inDataLen, 140 inContentType, 141 inReferer, 142 xioInStrm ); 143 return pReqProcImpl; 144 } 145 146 SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 147 const char* inData, 148 apr_size_t inDataLen, 149 const char* inContentType, 150 const char* inReferer, 151 const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 152 { 153 SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 154 inData, 155 inDataLen, 156 inContentType, 157 inReferer, 158 xioOutStrm ); 159 return pReqProcImpl; 160 } 161 162 SerfRequestProcessorImpl* createDeleteReqProcImpl( const char* inPath ) 163 { 164 SerfRequestProcessorImpl* pReqProcImpl = new SerfDeleteReqProcImpl( inPath ); 165 return pReqProcImpl; 166 } 167 168 SerfRequestProcessorImpl* createMkColReqProcImpl( const char* inPath ) 169 { 170 SerfRequestProcessorImpl* pReqProcImpl = new SerfMkColReqProcImpl( inPath ); 171 return pReqProcImpl; 172 } 173 174 SerfRequestProcessorImpl* createCopyReqProcImpl( const char* inSourcePath, 175 const char* inDestinationPath, 176 const bool inOverwrite ) 177 { 178 SerfRequestProcessorImpl* pReqProcImpl = new SerfCopyReqProcImpl( inSourcePath, 179 inDestinationPath, 180 inOverwrite ); 181 return pReqProcImpl; 182 } 183 184 SerfRequestProcessorImpl* createMoveReqProcImpl( const char* inSourcePath, 185 const char* inDestinationPath, 186 const bool inOverwrite ) 187 { 188 SerfRequestProcessorImpl* pReqProcImpl = new SerfMoveReqProcImpl( inSourcePath, 189 inDestinationPath, 190 inOverwrite ); 191 return pReqProcImpl; 192 } 193 194 } // namespace http_dav_ucp 195