1*8590a0fdSAndre Fischer /************************************************************** 2*8590a0fdSAndre Fischer * 3*8590a0fdSAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 4*8590a0fdSAndre Fischer * or more contributor license agreements. See the NOTICE file 5*8590a0fdSAndre Fischer * distributed with this work for additional information 6*8590a0fdSAndre Fischer * regarding copyright ownership. The ASF licenses this file 7*8590a0fdSAndre Fischer * to you under the Apache License, Version 2.0 (the 8*8590a0fdSAndre Fischer * "License"); you may not use this file except in compliance 9*8590a0fdSAndre Fischer * with the License. You may obtain a copy of the License at 10*8590a0fdSAndre Fischer * 11*8590a0fdSAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 12*8590a0fdSAndre Fischer * 13*8590a0fdSAndre Fischer * Unless required by applicable law or agreed to in writing, 14*8590a0fdSAndre Fischer * software distributed under the License is distributed on an 15*8590a0fdSAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*8590a0fdSAndre Fischer * KIND, either express or implied. See the License for the 17*8590a0fdSAndre Fischer * specific language governing permissions and limitations 18*8590a0fdSAndre Fischer * under the License. 19*8590a0fdSAndre Fischer * 20*8590a0fdSAndre Fischer *************************************************************/ 21*8590a0fdSAndre Fischer 22*8590a0fdSAndre Fischer // MARKER(update_precomp.py): autogen include statement, do not remove 23*8590a0fdSAndre Fischer #include "precompiled_ucb.hxx" 24*8590a0fdSAndre Fischer 25*8590a0fdSAndre Fischer #include <SerfRequestProcessorImplFac.hxx> 26*8590a0fdSAndre Fischer #include <SerfPropFindReqProcImpl.hxx> 27*8590a0fdSAndre Fischer #include <SerfPropPatchReqProcImpl.hxx> 28*8590a0fdSAndre Fischer #include <SerfGetReqProcImpl.hxx> 29*8590a0fdSAndre Fischer #include <SerfHeadReqProcImpl.hxx> 30*8590a0fdSAndre Fischer #include <SerfPutReqProcImpl.hxx> 31*8590a0fdSAndre Fischer #include <SerfPostReqProcImpl.hxx> 32*8590a0fdSAndre Fischer #include <SerfDeleteReqProcImpl.hxx> 33*8590a0fdSAndre Fischer #include <SerfMkColReqProcImpl.hxx> 34*8590a0fdSAndre Fischer #include <SerfCopyReqProcImpl.hxx> 35*8590a0fdSAndre Fischer #include <SerfMoveReqProcImpl.hxx> 36*8590a0fdSAndre Fischer 37*8590a0fdSAndre Fischer namespace http_dav_ucp 38*8590a0fdSAndre Fischer { 39*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, 40*8590a0fdSAndre Fischer const Depth inDepth, 41*8590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inPropNames, 42*8590a0fdSAndre Fischer std::vector< DAVResource > & ioResources ) 43*8590a0fdSAndre Fischer { 44*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 45*8590a0fdSAndre Fischer inDepth, 46*8590a0fdSAndre Fischer inPropNames, 47*8590a0fdSAndre Fischer ioResources ); 48*8590a0fdSAndre Fischer return pReqProcImpl; 49*8590a0fdSAndre Fischer } 50*8590a0fdSAndre Fischer 51*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, 52*8590a0fdSAndre Fischer const Depth inDepth, 53*8590a0fdSAndre Fischer std::vector< DAVResourceInfo > & ioResInfo ) 54*8590a0fdSAndre Fischer { 55*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 56*8590a0fdSAndre Fischer inDepth, 57*8590a0fdSAndre Fischer ioResInfo ); 58*8590a0fdSAndre Fischer return pReqProcImpl; 59*8590a0fdSAndre Fischer } 60*8590a0fdSAndre Fischer 61*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createPropPatchReqProcImpl( const char* inPath, 62*8590a0fdSAndre Fischer const std::vector< ProppatchValue > & inProperties ) 63*8590a0fdSAndre Fischer { 64*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPropPatchReqProcImpl( inPath, 65*8590a0fdSAndre Fischer inProperties ); 66*8590a0fdSAndre Fischer return pReqProcImpl; 67*8590a0fdSAndre Fischer } 68*8590a0fdSAndre Fischer 69*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 70*8590a0fdSAndre Fischer const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 71*8590a0fdSAndre Fischer { 72*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 73*8590a0fdSAndre Fischer xioInStrm ); 74*8590a0fdSAndre Fischer return pReqProcImpl; 75*8590a0fdSAndre Fischer } 76*8590a0fdSAndre Fischer 77*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 78*8590a0fdSAndre Fischer const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm, 79*8590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inHeaderNames, 80*8590a0fdSAndre Fischer DAVResource& ioResource ) 81*8590a0fdSAndre Fischer { 82*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 83*8590a0fdSAndre Fischer xioInStrm, 84*8590a0fdSAndre Fischer inHeaderNames, 85*8590a0fdSAndre Fischer ioResource ); 86*8590a0fdSAndre Fischer return pReqProcImpl; 87*8590a0fdSAndre Fischer } 88*8590a0fdSAndre Fischer 89*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 90*8590a0fdSAndre Fischer const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 91*8590a0fdSAndre Fischer { 92*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 93*8590a0fdSAndre Fischer xioOutStrm ); 94*8590a0fdSAndre Fischer return pReqProcImpl; 95*8590a0fdSAndre Fischer } 96*8590a0fdSAndre Fischer 97*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 98*8590a0fdSAndre Fischer const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream >& xioOutStrm, 99*8590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inHeaderNames, 100*8590a0fdSAndre Fischer DAVResource& ioResource ) 101*8590a0fdSAndre Fischer { 102*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 103*8590a0fdSAndre Fischer xioOutStrm, 104*8590a0fdSAndre Fischer inHeaderNames, 105*8590a0fdSAndre Fischer ioResource ); 106*8590a0fdSAndre Fischer return pReqProcImpl; 107*8590a0fdSAndre Fischer } 108*8590a0fdSAndre Fischer 109*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createHeadReqProcImpl( const char* inPath, 110*8590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inHeaderNames, 111*8590a0fdSAndre Fischer DAVResource& ioResource ) 112*8590a0fdSAndre Fischer { 113*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfHeadReqProcImpl( inPath, 114*8590a0fdSAndre Fischer inHeaderNames, 115*8590a0fdSAndre Fischer ioResource ); 116*8590a0fdSAndre Fischer return pReqProcImpl; 117*8590a0fdSAndre Fischer } 118*8590a0fdSAndre Fischer 119*8590a0fdSAndre Fischer 120*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createPutReqProcImpl( const char* inPath, 121*8590a0fdSAndre Fischer const char* inData, 122*8590a0fdSAndre Fischer apr_size_t inDataLen ) 123*8590a0fdSAndre Fischer { 124*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPutReqProcImpl( inPath, 125*8590a0fdSAndre Fischer inData, 126*8590a0fdSAndre Fischer inDataLen ); 127*8590a0fdSAndre Fischer return pReqProcImpl; 128*8590a0fdSAndre Fischer } 129*8590a0fdSAndre Fischer 130*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 131*8590a0fdSAndre Fischer const char* inData, 132*8590a0fdSAndre Fischer apr_size_t inDataLen, 133*8590a0fdSAndre Fischer const char* inContentType, 134*8590a0fdSAndre Fischer const char* inReferer, 135*8590a0fdSAndre Fischer const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 136*8590a0fdSAndre Fischer { 137*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 138*8590a0fdSAndre Fischer inData, 139*8590a0fdSAndre Fischer inDataLen, 140*8590a0fdSAndre Fischer inContentType, 141*8590a0fdSAndre Fischer inReferer, 142*8590a0fdSAndre Fischer xioInStrm ); 143*8590a0fdSAndre Fischer return pReqProcImpl; 144*8590a0fdSAndre Fischer } 145*8590a0fdSAndre Fischer 146*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 147*8590a0fdSAndre Fischer const char* inData, 148*8590a0fdSAndre Fischer apr_size_t inDataLen, 149*8590a0fdSAndre Fischer const char* inContentType, 150*8590a0fdSAndre Fischer const char* inReferer, 151*8590a0fdSAndre Fischer const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 152*8590a0fdSAndre Fischer { 153*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 154*8590a0fdSAndre Fischer inData, 155*8590a0fdSAndre Fischer inDataLen, 156*8590a0fdSAndre Fischer inContentType, 157*8590a0fdSAndre Fischer inReferer, 158*8590a0fdSAndre Fischer xioOutStrm ); 159*8590a0fdSAndre Fischer return pReqProcImpl; 160*8590a0fdSAndre Fischer } 161*8590a0fdSAndre Fischer 162*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createDeleteReqProcImpl( const char* inPath ) 163*8590a0fdSAndre Fischer { 164*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfDeleteReqProcImpl( inPath ); 165*8590a0fdSAndre Fischer return pReqProcImpl; 166*8590a0fdSAndre Fischer } 167*8590a0fdSAndre Fischer 168*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createMkColReqProcImpl( const char* inPath ) 169*8590a0fdSAndre Fischer { 170*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfMkColReqProcImpl( inPath ); 171*8590a0fdSAndre Fischer return pReqProcImpl; 172*8590a0fdSAndre Fischer } 173*8590a0fdSAndre Fischer 174*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createCopyReqProcImpl( const char* inSourcePath, 175*8590a0fdSAndre Fischer const char* inDestinationPath, 176*8590a0fdSAndre Fischer const bool inOverwrite ) 177*8590a0fdSAndre Fischer { 178*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfCopyReqProcImpl( inSourcePath, 179*8590a0fdSAndre Fischer inDestinationPath, 180*8590a0fdSAndre Fischer inOverwrite ); 181*8590a0fdSAndre Fischer return pReqProcImpl; 182*8590a0fdSAndre Fischer } 183*8590a0fdSAndre Fischer 184*8590a0fdSAndre Fischer SerfRequestProcessorImpl* createMoveReqProcImpl( const char* inSourcePath, 185*8590a0fdSAndre Fischer const char* inDestinationPath, 186*8590a0fdSAndre Fischer const bool inOverwrite ) 187*8590a0fdSAndre Fischer { 188*8590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfMoveReqProcImpl( inSourcePath, 189*8590a0fdSAndre Fischer inDestinationPath, 190*8590a0fdSAndre Fischer inOverwrite ); 191*8590a0fdSAndre Fischer return pReqProcImpl; 192*8590a0fdSAndre Fischer } 193*8590a0fdSAndre Fischer 194*8590a0fdSAndre Fischer } // namespace http_dav_ucp 195