xref: /AOO41X/main/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx (revision ca62e2c2083b5d0995f1245bad6c2edfb455fbec)
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 #ifndef INCLUDED_SERFGETREQPROCIMPL_HXX
238590a0fdSAndre Fischer #define INCLUDED_SERFGETREQPROCIMPL_HXX
248590a0fdSAndre Fischer 
25*c1c10f68SAriel Constenla-Haile #include "SerfRequestProcessorImpl.hxx"
268590a0fdSAndre Fischer 
278590a0fdSAndre Fischer #include <vector>
288590a0fdSAndre Fischer #include <rtl/ustring.hxx>
29*c1c10f68SAriel Constenla-Haile #include "DAVResource.hxx"
308590a0fdSAndre Fischer 
31*c1c10f68SAriel Constenla-Haile #include "SerfInputStream.hxx"
328590a0fdSAndre Fischer #include <com/sun/star/io/XOutputStream.hpp>
338590a0fdSAndre Fischer 
348590a0fdSAndre Fischer namespace http_dav_ucp
358590a0fdSAndre Fischer {
368590a0fdSAndre Fischer 
378590a0fdSAndre Fischer class SerfGetReqProcImpl : public SerfRequestProcessorImpl
388590a0fdSAndre Fischer {
398590a0fdSAndre Fischer public:
408590a0fdSAndre Fischer     SerfGetReqProcImpl( const char* inPath,
41e9ff7e89SOliver-Rainer Wittmann                         const DAVRequestHeaders& inRequestHeaders,
428590a0fdSAndre Fischer                         const com::sun::star::uno::Reference< SerfInputStream > & xioInStrm );
438590a0fdSAndre Fischer 
448590a0fdSAndre Fischer     SerfGetReqProcImpl( const char* inPath,
45e9ff7e89SOliver-Rainer Wittmann                         const DAVRequestHeaders& inRequestHeaders,
468590a0fdSAndre Fischer                         const com::sun::star::uno::Reference< SerfInputStream > & xioInStrm,
478590a0fdSAndre Fischer                         const std::vector< ::rtl::OUString > & inHeaderNames,
488590a0fdSAndre Fischer                         DAVResource & ioResource );
498590a0fdSAndre Fischer 
508590a0fdSAndre Fischer     SerfGetReqProcImpl( const char* inPath,
51e9ff7e89SOliver-Rainer Wittmann                         const DAVRequestHeaders& inRequestHeaders,
528590a0fdSAndre Fischer                         const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > & xioOutStrm );
538590a0fdSAndre Fischer 
548590a0fdSAndre Fischer     SerfGetReqProcImpl( const char* inPath,
55e9ff7e89SOliver-Rainer Wittmann                         const DAVRequestHeaders& inRequestHeaders,
568590a0fdSAndre Fischer                         const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > & xioOutStrm,
578590a0fdSAndre Fischer                         const std::vector< ::rtl::OUString > & inHeaderNames,
588590a0fdSAndre Fischer                         DAVResource & ioResource );
598590a0fdSAndre Fischer 
608590a0fdSAndre Fischer     virtual ~SerfGetReqProcImpl();
618590a0fdSAndre Fischer 
628590a0fdSAndre Fischer     virtual
638590a0fdSAndre Fischer     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest );
648590a0fdSAndre Fischer 
658590a0fdSAndre Fischer     void processSingleResponseHeader( const char* inHeaderName,
668590a0fdSAndre Fischer                                       const char* inHeaderValue );
6749989859SOliver-Rainer Wittmann 
6849989859SOliver-Rainer Wittmann protected:
6949989859SOliver-Rainer Wittmann     virtual
7049989859SOliver-Rainer Wittmann     void processChunkOfResponseData( const char* data, apr_size_t len );
7149989859SOliver-Rainer Wittmann 
7249989859SOliver-Rainer Wittmann     virtual
7349989859SOliver-Rainer Wittmann     void handleEndOfResponseData( serf_bucket_t * inSerfResponseBucket );
7449989859SOliver-Rainer Wittmann 
758590a0fdSAndre Fischer private:
768590a0fdSAndre Fischer     com::sun::star::uno::Reference< SerfInputStream > xInputStream;
778590a0fdSAndre Fischer     com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > xOutputStream;
788590a0fdSAndre Fischer     const std::vector< ::rtl::OUString > * mpHeaderNames;
798590a0fdSAndre Fischer     DAVResource* mpResource;
808590a0fdSAndre Fischer };
818590a0fdSAndre Fischer 
828590a0fdSAndre Fischer } // namespace http_dav_ucp
838590a0fdSAndre Fischer 
848590a0fdSAndre Fischer #endif // INCLUDED_SERFGETREQPROCIMPL_HXX
85