xref: /AOO41X/main/ucb/source/ucp/webdav/SerfRequestProcessorImpl.hxx (revision e9ff7e89dc60331091effa944f46dac083d27a7b)
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_SERFREQUESTPROCESSORIMPL_HXX
238590a0fdSAndre Fischer #define INCLUDED_SERFREQUESTPROCESSORIMPL_HXX
248590a0fdSAndre Fischer 
258590a0fdSAndre Fischer #include <serf.h>
268590a0fdSAndre Fischer 
278590a0fdSAndre Fischer #include <sal/types.h>
28*e9ff7e89SOliver-Rainer Wittmann #include <DAVRequestEnvironment.hxx>
298590a0fdSAndre Fischer 
308590a0fdSAndre Fischer namespace http_dav_ucp
318590a0fdSAndre Fischer {
328590a0fdSAndre Fischer 
338590a0fdSAndre Fischer class SerfRequestProcessorImpl
348590a0fdSAndre Fischer {
358590a0fdSAndre Fischer public:
36*e9ff7e89SOliver-Rainer Wittmann     SerfRequestProcessorImpl( const char* inPath,
37*e9ff7e89SOliver-Rainer Wittmann                               const DAVRequestHeaders& inRequestHeaders );
388590a0fdSAndre Fischer 
398590a0fdSAndre Fischer     virtual ~SerfRequestProcessorImpl();
408590a0fdSAndre Fischer 
418590a0fdSAndre Fischer     /*pure*/ virtual
428590a0fdSAndre Fischer     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) = 0;
438590a0fdSAndre Fischer 
448590a0fdSAndre Fischer     bool processSerfResponseBucket( serf_request_t * inSerfRequest,
45*e9ff7e89SOliver-Rainer Wittmann 
468590a0fdSAndre Fischer                                     serf_bucket_t * inSerfResponseBucket,
478590a0fdSAndre Fischer                                     apr_pool_t * inAprPool,
4849989859SOliver-Rainer Wittmann                                     apr_status_t & outStatus );
4949989859SOliver-Rainer Wittmann 
5049989859SOliver-Rainer Wittmann     void activateChunkedEncoding();
518590a0fdSAndre Fischer 
528590a0fdSAndre Fischer protected:
53*e9ff7e89SOliver-Rainer Wittmann     void setRequestHeaders( serf_bucket_t* inoutSerfHeaderBucket );
54*e9ff7e89SOliver-Rainer Wittmann 
5549989859SOliver-Rainer Wittmann     /*pure*/ virtual
5649989859SOliver-Rainer Wittmann     void processChunkOfResponseData( const char* data, apr_size_t len ) = 0;
5749989859SOliver-Rainer Wittmann 
5849989859SOliver-Rainer Wittmann     /*pure*/ virtual
5949989859SOliver-Rainer Wittmann     void handleEndOfResponseData( serf_bucket_t * inSerfResponseBucket ) = 0;
6049989859SOliver-Rainer Wittmann 
618590a0fdSAndre Fischer     const char* getPathStr() const;
6249989859SOliver-Rainer Wittmann     const bool useChunkedEncoding() const;
638590a0fdSAndre Fischer 
648590a0fdSAndre Fischer private:
658590a0fdSAndre Fischer     const char* mPathStr;
66*e9ff7e89SOliver-Rainer Wittmann     const DAVRequestHeaders& mrRequestHeaders;
6749989859SOliver-Rainer Wittmann     bool mbUseChunkedEncoding;
688590a0fdSAndre Fischer };
698590a0fdSAndre Fischer 
708590a0fdSAndre Fischer } // namespace http_dav_ucp
718590a0fdSAndre Fischer 
728590a0fdSAndre Fischer #endif // INCLUDED_SERFREQUESTPROCESSORIMPL_HXX
73