OTB  9.0.0
Orfeo Toolbox
otbCurlHelperStub.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbCurlHelperStub_h
22 #define otbCurlHelperStub_h
23 
24 #include "otbCurlHelperInterface.h"
25 
26 namespace otb
27 {
37 class ITK_ABI_EXPORT CurlHelperStub : public CurlHelperInterface
38 {
39 public:
40 
43  typedef itk::SmartPointer<Self> Pointer;
44  typedef itk::SmartPointer<const Self> ConstPointer;
46 
47  itkTypeMacro(CurlHelperStub, CurlHelperInterface);
48 
49  itkNewMacro(Self);
50 
51  bool TestUrlAvailability(const std::string& url) const override;
52 
53  int RetrieveUrlInMemory(const std::string& urlString, std::string& output) const override;
54 
55  int RetrieveFile(const std::ostringstream& urlStream, std::string filename) const override;
56 
57  int RetrieveFile(const std::string& urlString, std::string filename) const override;
58 
59  int RetrieveFileMulti(const std::vector<std::string>& listURLs, const std::vector<std::string>& listFiles, int maxConnect) const override;
60 
61 protected:
63  {
64  }
65  ~CurlHelperStub() override
66  {
67  }
68 
69 private:
70  CurlHelperStub(const Self&) = delete;
71  void operator=(const Self&) = delete;
72 };
73 }
74 #endif
otb::CurlHelperStub::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbCurlHelperStub.h:44
otb::CurlHelperStub::Self
CurlHelperStub Self
Definition: otbCurlHelperStub.h:42
otb::CurlHelperStub::Superclass
CurlHelperInterface Superclass
Definition: otbCurlHelperStub.h:45
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbCurlHelperInterface.h
otb::CurlHelperStub::~CurlHelperStub
~CurlHelperStub() override
Definition: otbCurlHelperStub.h:65
otb::CurlHelperStub::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbCurlHelperStub.h:43
otb::CurlHelperStub
Class to test classes using the curl capabilities from OTB.
Definition: otbCurlHelperStub.h:37
otb::CurlHelperInterface
Class to use the curl capabilities from OTB.
Definition: otbCurlHelperInterface.h:41
otb::CurlHelperStub::CurlHelperStub
CurlHelperStub()
Definition: otbCurlHelperStub.h:62