diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-03-20 09:20:30 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-03-26 16:39:52 +0100 |
commit | 9f586e2fbe41ec4d808369fac9501e3e9aea08f5 (patch) | |
tree | d69f750924f134227781e89f9a61ebc6fac1f9f2 /ucb | |
parent | 70cc2b191b95fbc210bc1f0f6a7159f341894f0f (diff) |
Remove pointless SerfRequestProcessorImplFac indirection.
Change-Id: If8549893a686c7a665adde0436d377d6d695e5bf
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/Library_ucpdav1.mk | 1 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfRequestProcessor.cxx | 42 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfRequestProcessorImplFac.cxx | 221 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfRequestProcessorImplFac.hxx | 115 |
4 files changed, 25 insertions, 354 deletions
diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk index 4f6f4c26bb90..2e23ba861ec9 100644 --- a/ucb/Library_ucpdav1.mk +++ b/ucb/Library_ucpdav1.mk @@ -92,7 +92,6 @@ $(eval $(call gb_Library_add_exception_objects,ucpdav1,\ ucb/source/ucp/webdav/SerfPutReqProcImpl \ ucb/source/ucp/webdav/SerfRequestProcessor \ ucb/source/ucp/webdav/SerfRequestProcessorImpl \ - ucb/source/ucp/webdav/SerfRequestProcessorImplFac \ ucb/source/ucp/webdav/SerfSession \ ucb/source/ucp/webdav/SerfUri \ ucb/source/ucp/webdav/UCBDeadPropertyValue \ diff --git a/ucb/source/ucp/webdav/SerfRequestProcessor.cxx b/ucb/source/ucp/webdav/SerfRequestProcessor.cxx index 5e2b67e3086d..70d5575081e1 100644 --- a/ucb/source/ucp/webdav/SerfRequestProcessor.cxx +++ b/ucb/source/ucp/webdav/SerfRequestProcessor.cxx @@ -18,10 +18,18 @@ */ #include "SerfRequestProcessor.hxx" -#include "SerfRequestProcessorImpl.hxx" -#include "SerfRequestProcessorImplFac.hxx" #include "SerfCallbacks.hxx" #include "SerfSession.hxx" +#include "SerfPropFindReqProcImpl.hxx" +#include "SerfPropPatchReqProcImpl.hxx" +#include "SerfGetReqProcImpl.hxx" +#include "SerfHeadReqProcImpl.hxx" +#include "SerfPutReqProcImpl.hxx" +#include "SerfPostReqProcImpl.hxx" +#include "SerfDeleteReqProcImpl.hxx" +#include "SerfMkColReqProcImpl.hxx" +#include "SerfCopyReqProcImpl.hxx" +#include "SerfMoveReqProcImpl.hxx" #include <apr_strings.h> @@ -80,7 +88,7 @@ bool SerfRequestProcessor::processPropFind( const Depth inDepth, std::vector< DAVResource > & ioResources, apr_status_t& outSerfStatus ) { - mpProcImpl = createPropFindReqProcImpl( mPathStr, + mpProcImpl = new SerfPropFindReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, inDepth, inPropNames, @@ -95,7 +103,7 @@ bool SerfRequestProcessor::processPropFind( const Depth inDepth, std::vector< DAVResourceInfo > & ioResInfo, apr_status_t& outSerfStatus ) { - mpProcImpl = createPropFindReqProcImpl( mPathStr, + mpProcImpl = new SerfPropFindReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, inDepth, ioResInfo ); @@ -108,7 +116,7 @@ bool SerfRequestProcessor::processPropFind( const Depth inDepth, bool SerfRequestProcessor::processPropPatch( const std::vector< ProppatchValue > & inProperties, apr_status_t& outSerfStatus ) { - mpProcImpl = createPropPatchReqProcImpl( mPathStr, + mpProcImpl = new SerfPropPatchReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, inProperties ); outSerfStatus = runProcessor(); @@ -120,7 +128,7 @@ bool SerfRequestProcessor::processPropPatch( const std::vector< ProppatchValue > bool SerfRequestProcessor::processGet( const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm, apr_status_t& outSerfStatus ) { - mpProcImpl = createGetReqProcImpl( mPathStr, + mpProcImpl = new SerfGetReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, xioInStrm ); outSerfStatus = runProcessor(); @@ -134,7 +142,7 @@ bool SerfRequestProcessor::processGet( const com::sun::star::uno::Reference< Ser DAVResource & ioResource, apr_status_t& outSerfStatus ) { - mpProcImpl = createGetReqProcImpl( mPathStr, + mpProcImpl = new SerfGetReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, xioInStrm, inHeaderNames, @@ -148,7 +156,7 @@ bool SerfRequestProcessor::processGet( const com::sun::star::uno::Reference< Ser bool SerfRequestProcessor::processGet( const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm, apr_status_t& outSerfStatus ) { - mpProcImpl = createGetReqProcImpl( mPathStr, + mpProcImpl = new SerfGetReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, xioOutStrm ); outSerfStatus = runProcessor(); @@ -162,7 +170,7 @@ bool SerfRequestProcessor::processGet( const com::sun::star::uno::Reference< com DAVResource & ioResource, apr_status_t& outSerfStatus ) { - mpProcImpl = createGetReqProcImpl( mPathStr, + mpProcImpl = new SerfGetReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, xioOutStrm, inHeaderNames, @@ -177,7 +185,7 @@ bool SerfRequestProcessor::processHead( const std::vector< OUString > & inHeader DAVResource & ioResource, apr_status_t& outSerfStatus ) { - mpProcImpl = createHeadReqProcImpl( mPathStr, + mpProcImpl = new SerfHeadReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, inHeaderNames, ioResource ); @@ -191,7 +199,7 @@ bool SerfRequestProcessor::processPut( const char* inData, apr_size_t inDataLen, apr_status_t& outSerfStatus ) { - mpProcImpl = createPutReqProcImpl( mPathStr, + mpProcImpl = new SerfPutReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, inData, inDataLen ); @@ -212,7 +220,7 @@ bool SerfRequestProcessor::processPost( const char* inData, OUStringToOString( inContentType, RTL_TEXTENCODING_UTF8 ).getStr() ); mReferer = apr_pstrdup( mrSerfSession.getAprPool(), OUStringToOString( inReferer, RTL_TEXTENCODING_UTF8 ).getStr() ); - mpProcImpl = createPostReqProcImpl( mPathStr, + mpProcImpl = new SerfPostReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, inData, inDataLen, @@ -236,7 +244,7 @@ bool SerfRequestProcessor::processPost( const char* inData, OUStringToOString( inContentType, RTL_TEXTENCODING_UTF8 ).getStr() ); mReferer = apr_pstrdup( mrSerfSession.getAprPool(), OUStringToOString( inReferer, RTL_TEXTENCODING_UTF8 ).getStr() ); - mpProcImpl = createPostReqProcImpl( mPathStr, + mpProcImpl = new SerfPostReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, inData, inDataLen, @@ -251,7 +259,7 @@ bool SerfRequestProcessor::processPost( const char* inData, // DELETE bool SerfRequestProcessor::processDelete( apr_status_t& outSerfStatus ) { - mpProcImpl = createDeleteReqProcImpl( mPathStr, + mpProcImpl = new SerfDeleteReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders ); outSerfStatus = runProcessor(); @@ -261,7 +269,7 @@ bool SerfRequestProcessor::processDelete( apr_status_t& outSerfStatus ) // MKCOL bool SerfRequestProcessor::processMkCol( apr_status_t& outSerfStatus ) { - mpProcImpl = createMkColReqProcImpl( mPathStr, + mpProcImpl = new SerfMkColReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders ); outSerfStatus = runProcessor(); @@ -275,7 +283,7 @@ bool SerfRequestProcessor::processCopy( const OUString & inDestinationPath, { mDestPathStr = apr_pstrdup( mrSerfSession.getAprPool(), OUStringToOString( inDestinationPath, RTL_TEXTENCODING_UTF8 ).getStr() ); - mpProcImpl = createCopyReqProcImpl( mPathStr, + mpProcImpl = new SerfCopyReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, mDestPathStr, inOverwrite ); @@ -291,7 +299,7 @@ bool SerfRequestProcessor::processMove( const OUString & inDestinationPath, { mDestPathStr = apr_pstrdup( mrSerfSession.getAprPool(), OUStringToOString( inDestinationPath, RTL_TEXTENCODING_UTF8 ).getStr() ); - mpProcImpl = createMoveReqProcImpl( mPathStr, + mpProcImpl = new SerfMoveReqProcImpl( mPathStr, mrSerfSession.getRequestEnvironment().m_aRequestHeaders, mDestPathStr, inOverwrite ); diff --git a/ucb/source/ucp/webdav/SerfRequestProcessorImplFac.cxx b/ucb/source/ucp/webdav/SerfRequestProcessorImplFac.cxx deleted file mode 100644 index cbd45a197732..000000000000 --- a/ucb/source/ucp/webdav/SerfRequestProcessorImplFac.cxx +++ /dev/null @@ -1,221 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "SerfRequestProcessorImplFac.hxx" -#include "SerfPropFindReqProcImpl.hxx" -#include "SerfPropPatchReqProcImpl.hxx" -#include "SerfGetReqProcImpl.hxx" -#include "SerfHeadReqProcImpl.hxx" -#include "SerfPutReqProcImpl.hxx" -#include "SerfPostReqProcImpl.hxx" -#include "SerfDeleteReqProcImpl.hxx" -#include "SerfMkColReqProcImpl.hxx" -#include "SerfCopyReqProcImpl.hxx" -#include "SerfMoveReqProcImpl.hxx" - -namespace http_dav_ucp -{ - SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const Depth inDepth, - const std::vector< OUString > & inPropNames, - std::vector< DAVResource > & ioResources ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, - inRequestHeaders, - inDepth, - inPropNames, - ioResources ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const Depth inDepth, - std::vector< DAVResourceInfo > & ioResInfo ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfPropFindReqProcImpl( inPath, - inRequestHeaders, - inDepth, - ioResInfo ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createPropPatchReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const std::vector< ProppatchValue > & inProperties ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfPropPatchReqProcImpl( inPath, - inRequestHeaders, - inProperties ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, - inRequestHeaders, - xioInStrm ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm, - const std::vector< OUString > & inHeaderNames, - DAVResource& ioResource ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, - inRequestHeaders, - xioInStrm, - inHeaderNames, - ioResource ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, - inRequestHeaders, - xioOutStrm ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream >& xioOutStrm, - const std::vector< OUString > & inHeaderNames, - DAVResource& ioResource ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfGetReqProcImpl( inPath, - inRequestHeaders, - xioOutStrm, - inHeaderNames, - ioResource ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createHeadReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const std::vector< OUString > & inHeaderNames, - DAVResource& ioResource ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfHeadReqProcImpl( inPath, - inRequestHeaders, - inHeaderNames, - ioResource ); - return pReqProcImpl; - } - - - SerfRequestProcessorImpl* createPutReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const char* inData, - apr_size_t inDataLen ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfPutReqProcImpl( inPath, - inRequestHeaders, - inData, - inDataLen ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const char* inData, - apr_size_t inDataLen, - const char* inContentType, - const char* inReferer, - const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, - inRequestHeaders, - inData, - inDataLen, - inContentType, - inReferer, - xioInStrm ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const char* inData, - apr_size_t inDataLen, - const char* inContentType, - const char* inReferer, - const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfPostReqProcImpl( inPath, - inRequestHeaders, - inData, - inDataLen, - inContentType, - inReferer, - xioOutStrm ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createDeleteReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfDeleteReqProcImpl( inPath, - inRequestHeaders ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createMkColReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfMkColReqProcImpl( inPath, - inRequestHeaders ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createCopyReqProcImpl( const char* inSourcePath, - const DAVRequestHeaders& inRequestHeaders, - const char* inDestinationPath, - const bool inOverwrite ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfCopyReqProcImpl( inSourcePath, - inRequestHeaders, - inDestinationPath, - inOverwrite ); - return pReqProcImpl; - } - - SerfRequestProcessorImpl* createMoveReqProcImpl( const char* inSourcePath, - const DAVRequestHeaders& inRequestHeaders, - const char* inDestinationPath, - const bool inOverwrite ) - { - SerfRequestProcessorImpl* pReqProcImpl = new SerfMoveReqProcImpl( inSourcePath, - inRequestHeaders, - inDestinationPath, - inOverwrite ); - return pReqProcImpl; - } - -} // namespace http_dav_ucp - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/SerfRequestProcessorImplFac.hxx b/ucb/source/ucp/webdav/SerfRequestProcessorImplFac.hxx deleted file mode 100644 index f31d96a170d4..000000000000 --- a/ucb/source/ucp/webdav/SerfRequestProcessorImplFac.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SERFREQUESTPROCESSORIMPLFAC_HXX -#define INCLUDED_SERFREQUESTPROCESSORIMPLFAC_HXX - -#include <vector> -#include <rtl/ustring.hxx> -#include "DAVTypes.hxx" -#include "DAVResource.hxx" - -#include "SerfRequestProcessorImpl.hxx" -#include "SerfInputStream.hxx" -#include <com/sun/star/io/XOutputStream.hpp> - -namespace http_dav_ucp -{ - SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const Depth inDepth, - const std::vector< OUString > & inPropNames, - std::vector< DAVResource > & ioResources ); - - SerfRequestProcessorImpl* createPropFindReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const Depth inDepth, - std::vector< DAVResourceInfo > & ioResInfo ); - - SerfRequestProcessorImpl* createPropPatchReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const std::vector< ProppatchValue > & inProperties ); - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ); - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm, - const std::vector< OUString > & inHeaderNames, - DAVResource& ioResource ); - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ); - - SerfRequestProcessorImpl* createGetReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm, - const std::vector< OUString > & inHeaderNames, - DAVResource& ioResource ); - - SerfRequestProcessorImpl* createHeadReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const std::vector< OUString > & inHeaderNames, - DAVResource& ioResource ); - - SerfRequestProcessorImpl* createPutReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const char* inData, - apr_size_t inDataLen ); - - SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const char* inData, - apr_size_t inDataLen, - const char* inContentType, - const char* inReferer, - const com::sun::star::uno::Reference< SerfInputStream >& xioInStrm ); - - SerfRequestProcessorImpl* createPostReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders, - const char* inData, - apr_size_t inDataLen, - const char* inContentType, - const char* inReferer, - const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xioOutStrm ); - - SerfRequestProcessorImpl* createDeleteReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders ); - - SerfRequestProcessorImpl* createMkColReqProcImpl( const char* inPath, - const DAVRequestHeaders& inRequestHeaders ); - - SerfRequestProcessorImpl* createCopyReqProcImpl( const char* inSourcePath, - const DAVRequestHeaders& inRequestHeaders, - const char* inDestinationPath, - const bool inOverwrite ); - - SerfRequestProcessorImpl* createMoveReqProcImpl( const char* inSourcePath, - const DAVRequestHeaders& inRequestHeaders, - const char* inDestinationPath, - const bool inOverwrite ); - -} // namespace http_dav_ucp - -#endif // INCLUDED_SERFREQUESTPROCESSORIMPLFAC_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |