18590a0fdSAndre Fischer /************************************************************** 28590a0fdSAndre Fischer * 38590a0fdSAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 48590a0fdSAndre Fischer * or more contributor license agreements. See the NOTICE file 58590a0fdSAndre Fischer * distributed with this work for additional information 68590a0fdSAndre Fischer * regarding copyright ownership. The ASF licenses this file 78590a0fdSAndre Fischer * to you under the Apache License, Version 2.0 (the 88590a0fdSAndre Fischer * "License"); you may not use this file except in compliance 98590a0fdSAndre Fischer * with the License. You may obtain a copy of the License at 108590a0fdSAndre Fischer * 118590a0fdSAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 128590a0fdSAndre Fischer * 138590a0fdSAndre Fischer * Unless required by applicable law or agreed to in writing, 148590a0fdSAndre Fischer * software distributed under the License is distributed on an 158590a0fdSAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 168590a0fdSAndre Fischer * KIND, either express or implied. See the License for the 178590a0fdSAndre Fischer * specific language governing permissions and limitations 188590a0fdSAndre Fischer * under the License. 198590a0fdSAndre Fischer * 208590a0fdSAndre Fischer *************************************************************/ 218590a0fdSAndre Fischer 228590a0fdSAndre Fischer // MARKER(update_precomp.py): autogen include statement, do not remove 238590a0fdSAndre Fischer #include "precompiled_ucb.hxx" 248590a0fdSAndre Fischer 25*3edf6992SAndrea Pescetti #include "SerfTypes.hxx" 26c1c10f68SAriel Constenla-Haile #include "SerfRequestProcessorImplFac.hxx" 27c1c10f68SAriel Constenla-Haile #include "SerfPropFindReqProcImpl.hxx" 28c1c10f68SAriel Constenla-Haile #include "SerfPropPatchReqProcImpl.hxx" 29c1c10f68SAriel Constenla-Haile #include "SerfGetReqProcImpl.hxx" 30c1c10f68SAriel Constenla-Haile #include "SerfHeadReqProcImpl.hxx" 31c1c10f68SAriel Constenla-Haile #include "SerfPutReqProcImpl.hxx" 32c1c10f68SAriel Constenla-Haile #include "SerfPostReqProcImpl.hxx" 33c1c10f68SAriel Constenla-Haile #include "SerfDeleteReqProcImpl.hxx" 34c1c10f68SAriel Constenla-Haile #include "SerfMkColReqProcImpl.hxx" 35c1c10f68SAriel Constenla-Haile #include "SerfCopyReqProcImpl.hxx" 36c1c10f68SAriel Constenla-Haile #include "SerfMoveReqProcImpl.hxx" 37*3edf6992SAndrea Pescetti #include "SerfLockReqProcImpl.hxx" 38*3edf6992SAndrea Pescetti #include "SerfLockRefreshProcImpl.hxx" 39*3edf6992SAndrea Pescetti #include "SerfUnlockProcImpl.hxx" 408590a0fdSAndre Fischer 418590a0fdSAndre Fischer namespace http_dav_ucp 428590a0fdSAndre Fischer { createPropFindReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const Depth inDepth,const std::vector<::rtl::OUString> & inPropNames,std::vector<DAVResource> & ioResources)438590a0fdSAndre Fischer SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, 44e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 458590a0fdSAndre Fischer const Depth inDepth, 468590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inPropNames, 478590a0fdSAndre Fischer std::vector< DAVResource > & ioResources ) 488590a0fdSAndre Fischer { 498590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 50e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 518590a0fdSAndre Fischer inDepth, 528590a0fdSAndre Fischer inPropNames, 538590a0fdSAndre Fischer ioResources ); 548590a0fdSAndre Fischer return pReqProcImpl; 558590a0fdSAndre Fischer } 568590a0fdSAndre Fischer createPropFindReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const Depth inDepth,std::vector<DAVResourceInfo> & ioResInfo)578590a0fdSAndre Fischer SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, 58e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 598590a0fdSAndre Fischer const Depth inDepth, 608590a0fdSAndre Fischer std::vector< DAVResourceInfo > & ioResInfo ) 618590a0fdSAndre Fischer { 628590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, 63e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 648590a0fdSAndre Fischer inDepth, 658590a0fdSAndre Fischer ioResInfo ); 668590a0fdSAndre Fischer return pReqProcImpl; 678590a0fdSAndre Fischer } 688590a0fdSAndre Fischer createPropPatchReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const std::vector<ProppatchValue> & inProperties,const char * inLockToken)698590a0fdSAndre Fischer SerfRequestProcessorImpl* createPropPatchReqProcImpl( const char* inPath, 70e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 71*3edf6992SAndrea Pescetti const std::vector< ProppatchValue > & inProperties, 72*3edf6992SAndrea Pescetti const char* inLockToken ) 738590a0fdSAndre Fischer { 748590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPropPatchReqProcImpl( inPath, 75e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 76*3edf6992SAndrea Pescetti inProperties, 77*3edf6992SAndrea Pescetti inLockToken ); 788590a0fdSAndre Fischer return pReqProcImpl; 798590a0fdSAndre Fischer } 808590a0fdSAndre Fischer createGetReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const com::sun::star::uno::Reference<SerfInputStream> & xioInStrm)818590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 82e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 838590a0fdSAndre Fischer const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 848590a0fdSAndre Fischer { 858590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 86e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 878590a0fdSAndre Fischer xioInStrm ); 888590a0fdSAndre Fischer return pReqProcImpl; 898590a0fdSAndre Fischer } 908590a0fdSAndre Fischer createGetReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const com::sun::star::uno::Reference<SerfInputStream> & xioInStrm,const std::vector<::rtl::OUString> & inHeaderNames,DAVResource & ioResource)918590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 92e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 938590a0fdSAndre Fischer const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm, 948590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inHeaderNames, 958590a0fdSAndre Fischer DAVResource& ioResource ) 968590a0fdSAndre Fischer { 978590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 98e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 998590a0fdSAndre Fischer xioInStrm, 1008590a0fdSAndre Fischer inHeaderNames, 1018590a0fdSAndre Fischer ioResource ); 1028590a0fdSAndre Fischer return pReqProcImpl; 1038590a0fdSAndre Fischer } 1048590a0fdSAndre Fischer createGetReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> & xioOutStrm)1058590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 106e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 1078590a0fdSAndre Fischer const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 1088590a0fdSAndre Fischer { 1098590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 110e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 1118590a0fdSAndre Fischer xioOutStrm ); 1128590a0fdSAndre Fischer return pReqProcImpl; 1138590a0fdSAndre Fischer } 1148590a0fdSAndre Fischer createGetReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> & xioOutStrm,const std::vector<::rtl::OUString> & inHeaderNames,DAVResource & ioResource)1158590a0fdSAndre Fischer SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, 116e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 1178590a0fdSAndre Fischer const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream >& xioOutStrm, 1188590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inHeaderNames, 1198590a0fdSAndre Fischer DAVResource& ioResource ) 1208590a0fdSAndre Fischer { 1218590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, 122e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 1238590a0fdSAndre Fischer xioOutStrm, 1248590a0fdSAndre Fischer inHeaderNames, 1258590a0fdSAndre Fischer ioResource ); 1268590a0fdSAndre Fischer return pReqProcImpl; 1278590a0fdSAndre Fischer } 1288590a0fdSAndre Fischer createHeadReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const std::vector<::rtl::OUString> & inHeaderNames,DAVResource & ioResource)1298590a0fdSAndre Fischer SerfRequestProcessorImpl* createHeadReqProcImpl( const char* inPath, 130e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 1318590a0fdSAndre Fischer const std::vector< ::rtl::OUString > & inHeaderNames, 1328590a0fdSAndre Fischer DAVResource& ioResource ) 1338590a0fdSAndre Fischer { 1348590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfHeadReqProcImpl( inPath, 135e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 1368590a0fdSAndre Fischer inHeaderNames, 1378590a0fdSAndre Fischer ioResource ); 1388590a0fdSAndre Fischer return pReqProcImpl; 1398590a0fdSAndre Fischer } 1408590a0fdSAndre Fischer 1418590a0fdSAndre Fischer createPutReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const char * inData,const char * inLockToken,apr_size_t inDataLen)1428590a0fdSAndre Fischer SerfRequestProcessorImpl* createPutReqProcImpl( const char* inPath, 143e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 1448590a0fdSAndre Fischer const char* inData, 145*3edf6992SAndrea Pescetti const char* inLockToken, 1468590a0fdSAndre Fischer apr_size_t inDataLen ) 1478590a0fdSAndre Fischer { 1488590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPutReqProcImpl( inPath, 149e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 1508590a0fdSAndre Fischer inData, 151*3edf6992SAndrea Pescetti inLockToken, 1528590a0fdSAndre Fischer inDataLen ); 1538590a0fdSAndre Fischer return pReqProcImpl; 1548590a0fdSAndre Fischer } 1558590a0fdSAndre Fischer createPostReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const char * inData,apr_size_t inDataLen,const char * inLockToken,const char * inContentType,const char * inReferer,const com::sun::star::uno::Reference<SerfInputStream> & xioInStrm)1568590a0fdSAndre Fischer SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 157e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 1588590a0fdSAndre Fischer const char* inData, 1598590a0fdSAndre Fischer apr_size_t inDataLen, 160*3edf6992SAndrea Pescetti const char* inLockToken, 1618590a0fdSAndre Fischer const char* inContentType, 1628590a0fdSAndre Fischer const char* inReferer, 1638590a0fdSAndre Fischer const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) 1648590a0fdSAndre Fischer { 1658590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 166e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 1678590a0fdSAndre Fischer inData, 1688590a0fdSAndre Fischer inDataLen, 169*3edf6992SAndrea Pescetti inLockToken, 1708590a0fdSAndre Fischer inContentType, 1718590a0fdSAndre Fischer inReferer, 1728590a0fdSAndre Fischer xioInStrm ); 1738590a0fdSAndre Fischer return pReqProcImpl; 1748590a0fdSAndre Fischer } 1758590a0fdSAndre Fischer createPostReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const char * inData,apr_size_t inDataLen,const char * inLockToken,const char * inContentType,const char * inReferer,const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> & xioOutStrm)1768590a0fdSAndre Fischer SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, 177e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 1788590a0fdSAndre Fischer const char* inData, 1798590a0fdSAndre Fischer apr_size_t inDataLen, 180*3edf6992SAndrea Pescetti const char* inLockToken, 1818590a0fdSAndre Fischer const char* inContentType, 1828590a0fdSAndre Fischer const char* inReferer, 1838590a0fdSAndre Fischer const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) 1848590a0fdSAndre Fischer { 1858590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, 186e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 1878590a0fdSAndre Fischer inData, 1888590a0fdSAndre Fischer inDataLen, 189*3edf6992SAndrea Pescetti inLockToken, 1908590a0fdSAndre Fischer inContentType, 1918590a0fdSAndre Fischer inReferer, 1928590a0fdSAndre Fischer xioOutStrm ); 1938590a0fdSAndre Fischer return pReqProcImpl; 1948590a0fdSAndre Fischer } 1958590a0fdSAndre Fischer createDeleteReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const char * inLockToken)196e9ff7e89SOliver-Rainer Wittmann SerfRequestProcessorImpl* createDeleteReqProcImpl( const char* inPath, 197*3edf6992SAndrea Pescetti const DAVRequestHeaders& inRequestHeaders, 198*3edf6992SAndrea Pescetti const char * inLockToken ) 1998590a0fdSAndre Fischer { 200e9ff7e89SOliver-Rainer Wittmann SerfRequestProcessorImpl* pReqProcImpl = new SerfDeleteReqProcImpl( inPath, 201*3edf6992SAndrea Pescetti inRequestHeaders, 202*3edf6992SAndrea Pescetti inLockToken ); 2038590a0fdSAndre Fischer return pReqProcImpl; 2048590a0fdSAndre Fischer } 2058590a0fdSAndre Fischer createMkColReqProcImpl(const char * inPath,const DAVRequestHeaders & inRequestHeaders,const char * inLockToken)206e9ff7e89SOliver-Rainer Wittmann SerfRequestProcessorImpl* createMkColReqProcImpl( const char* inPath, 207*3edf6992SAndrea Pescetti const DAVRequestHeaders& inRequestHeaders, 208*3edf6992SAndrea Pescetti const char * inLockToken ) 2098590a0fdSAndre Fischer { 210e9ff7e89SOliver-Rainer Wittmann SerfRequestProcessorImpl* pReqProcImpl = new SerfMkColReqProcImpl( inPath, 211*3edf6992SAndrea Pescetti inRequestHeaders, 212*3edf6992SAndrea Pescetti inLockToken ); 2138590a0fdSAndre Fischer return pReqProcImpl; 2148590a0fdSAndre Fischer } 2158590a0fdSAndre Fischer createCopyReqProcImpl(const char * inSourcePath,const DAVRequestHeaders & inRequestHeaders,const char * inDestinationPath,const bool inOverwrite,const char * inLockToken)2168590a0fdSAndre Fischer SerfRequestProcessorImpl* createCopyReqProcImpl( const char* inSourcePath, 217e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 2188590a0fdSAndre Fischer const char* inDestinationPath, 219*3edf6992SAndrea Pescetti const bool inOverwrite, 220*3edf6992SAndrea Pescetti const char* inLockToken ) 2218590a0fdSAndre Fischer { 2228590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfCopyReqProcImpl( inSourcePath, 223e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 2248590a0fdSAndre Fischer inDestinationPath, 225*3edf6992SAndrea Pescetti inOverwrite, 226*3edf6992SAndrea Pescetti inLockToken ); 2278590a0fdSAndre Fischer return pReqProcImpl; 2288590a0fdSAndre Fischer } 2298590a0fdSAndre Fischer createMoveReqProcImpl(const char * inSourcePath,const DAVRequestHeaders & inRequestHeaders,const char * inDestinationPath,const bool inOverwrite,const char * inLockToken)2308590a0fdSAndre Fischer SerfRequestProcessorImpl* createMoveReqProcImpl( const char* inSourcePath, 231e9ff7e89SOliver-Rainer Wittmann const DAVRequestHeaders& inRequestHeaders, 2328590a0fdSAndre Fischer const char* inDestinationPath, 233*3edf6992SAndrea Pescetti const bool inOverwrite, 234*3edf6992SAndrea Pescetti const char* inLockToken ) 2358590a0fdSAndre Fischer { 2368590a0fdSAndre Fischer SerfRequestProcessorImpl* pReqProcImpl = new SerfMoveReqProcImpl( inSourcePath, 237e9ff7e89SOliver-Rainer Wittmann inRequestHeaders, 2388590a0fdSAndre Fischer inDestinationPath, 239*3edf6992SAndrea Pescetti inOverwrite, 240*3edf6992SAndrea Pescetti inLockToken ); 241*3edf6992SAndrea Pescetti return pReqProcImpl; 242*3edf6992SAndrea Pescetti } 243*3edf6992SAndrea Pescetti createLockReqProcImpl(const char * inSourcePath,const DAVRequestHeaders & inRequestHeaders,const ucb::Lock & inLock,const char * inTimeout,DAVPropertyValue & outLock)244*3edf6992SAndrea Pescetti SerfRequestProcessorImpl* createLockReqProcImpl( const char* inSourcePath, 245*3edf6992SAndrea Pescetti const DAVRequestHeaders& inRequestHeaders, 246*3edf6992SAndrea Pescetti const ucb::Lock& inLock, 247*3edf6992SAndrea Pescetti const char* inTimeout, 248*3edf6992SAndrea Pescetti DAVPropertyValue & outLock) 249*3edf6992SAndrea Pescetti { 250*3edf6992SAndrea Pescetti SerfRequestProcessorImpl* pReqProcImpl = new SerfLockReqProcImpl( inSourcePath, 251*3edf6992SAndrea Pescetti inRequestHeaders, 252*3edf6992SAndrea Pescetti inLock, 253*3edf6992SAndrea Pescetti inTimeout, 254*3edf6992SAndrea Pescetti outLock); 255*3edf6992SAndrea Pescetti return pReqProcImpl; 256*3edf6992SAndrea Pescetti } 257*3edf6992SAndrea Pescetti createLockRefreshProcImpl(const char * inSourcePath,const DAVRequestHeaders & inRequestHeaders,const ucb::Lock & inLock,const char * inLockToken,const char * inTimeout,DAVPropertyValue & outLock)258*3edf6992SAndrea Pescetti SerfRequestProcessorImpl* createLockRefreshProcImpl( const char* inSourcePath, 259*3edf6992SAndrea Pescetti const DAVRequestHeaders& inRequestHeaders, 260*3edf6992SAndrea Pescetti const ucb::Lock& inLock, 261*3edf6992SAndrea Pescetti const char* inLockToken, 262*3edf6992SAndrea Pescetti const char* inTimeout, 263*3edf6992SAndrea Pescetti DAVPropertyValue & outLock) 264*3edf6992SAndrea Pescetti { 265*3edf6992SAndrea Pescetti SerfRequestProcessorImpl* pReqProcImpl = new SerfLockRefreshProcImpl( inSourcePath, 266*3edf6992SAndrea Pescetti inRequestHeaders, 267*3edf6992SAndrea Pescetti inLock, 268*3edf6992SAndrea Pescetti inLockToken, 269*3edf6992SAndrea Pescetti inTimeout, 270*3edf6992SAndrea Pescetti outLock); 271*3edf6992SAndrea Pescetti return pReqProcImpl; 272*3edf6992SAndrea Pescetti } 273*3edf6992SAndrea Pescetti createUnlockProcImpl(const char * inSourcePath,const DAVRequestHeaders & inRequestHeaders,const ucb::Lock & inLock,const char * inToken)274*3edf6992SAndrea Pescetti SerfRequestProcessorImpl* createUnlockProcImpl( const char* inSourcePath, 275*3edf6992SAndrea Pescetti const DAVRequestHeaders& inRequestHeaders, 276*3edf6992SAndrea Pescetti const ucb::Lock& inLock, 277*3edf6992SAndrea Pescetti const char* inToken ) 278*3edf6992SAndrea Pescetti { 279*3edf6992SAndrea Pescetti SerfRequestProcessorImpl* pReqProcImpl = new SerfUnlockProcImpl( inSourcePath, 280*3edf6992SAndrea Pescetti inRequestHeaders, 281*3edf6992SAndrea Pescetti inLock, 282*3edf6992SAndrea Pescetti inToken ); 2838590a0fdSAndre Fischer return pReqProcImpl; 2848590a0fdSAndre Fischer } 2858590a0fdSAndre Fischer 2868590a0fdSAndre Fischer } // namespace http_dav_ucp 287