LibreOffice Module ucb (master)  1
SerfGetReqProcImpl.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_UCB_SOURCE_UCP_WEBDAV_SERFGETREQPROCIMPL_HXX
21 #define INCLUDED_UCB_SOURCE_UCP_WEBDAV_SERFGETREQPROCIMPL_HXX
22 
24 
25 #include <vector>
26 #include <rtl/ustring.hxx>
27 #include "DAVResource.hxx"
28 
29 #include "SerfInputStream.hxx"
30 #include <com/sun/star/io/XOutputStream.hpp>
31 
32 namespace http_dav_ucp
33 {
34 
36 {
37 public:
38  SerfGetReqProcImpl( const char* inPath,
39  const DAVRequestHeaders& inRequestHeaders,
40  const rtl::Reference< SerfInputStream > & xioInStrm );
41 
42  SerfGetReqProcImpl( const char* inPath,
43  const DAVRequestHeaders& inRequestHeaders,
44  const rtl::Reference< SerfInputStream > & xioInStrm,
45  const std::vector< OUString > & inHeaderNames,
46  DAVResource & ioResource );
47 
48  SerfGetReqProcImpl( const char* inPath,
49  const DAVRequestHeaders& inRequestHeaders,
50  const css::uno::Reference< css::io::XOutputStream > & xioOutStrm );
51 
52  SerfGetReqProcImpl( const char* inPath,
53  const DAVRequestHeaders& inRequestHeaders,
54  const css::uno::Reference< css::io::XOutputStream > & xioOutStrm,
55  const std::vector< OUString > & inHeaderNames,
56  DAVResource & ioResource );
57 
58  virtual ~SerfGetReqProcImpl() override;
59 
60  virtual
61  serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
62 
63  void processSingleResponseHeader( const char* inHeaderName,
64  const char* inHeaderValue );
65 
66 protected:
67  virtual
68  void processChunkOfResponseData( const char* data, apr_size_t len ) override;
69 
70  virtual
71  void handleEndOfResponseData( serf_bucket_t * inSerfResponseBucket ) override;
72 
73 private:
75  css::uno::Reference< css::io::XOutputStream > xOutputStream;
76  const std::vector< OUString > * mpHeaderNames;
78 };
79 
80 } // namespace http_dav_ucp
81 
82 #endif // INCLUDED_UCB_SOURCE_UCP_WEBDAV_SERFGETREQPROCIMPL_HXX
83 
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< DAVRequestHeader > DAVRequestHeaders
SerfGetReqProcImpl(const char *inPath, const DAVRequestHeaders &inRequestHeaders, const rtl::Reference< SerfInputStream > &xioInStrm)
virtual void handleEndOfResponseData(serf_bucket_t *inSerfResponseBucket) override
virtual serf_bucket_t * createSerfRequestBucket(serf_request_t *inSerfRequest) override
void processSingleResponseHeader(const char *inHeaderName, const char *inHeaderValue)
virtual void processChunkOfResponseData(const char *data, apr_size_t len) override
rtl::Reference< SerfInputStream > xInputStream
css::uno::Reference< css::io::XOutputStream > xOutputStream
const std::vector< OUString > * mpHeaderNames