OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
otb::CurlHelper Class Reference

#include <otbCurlHelper.h>

+ Inheritance diagram for otb::CurlHelper:
+ Collaboration diagram for otb::CurlHelper:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef CurlHelper Self
 
typedef CurlHelperInterface Superclass
 
- Public Types inherited from otb::CurlHelperInterface
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef CurlHelperInterface Self
 
typedef itk::Object Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual long int GetTimeout ()
 
bool IsCurlReturnHttpError (const std::string &url) const
 
int RetrieveFile (const std::ostringstream &urlStream, std::string filename) const override
 
int RetrieveFile (const std::string &urlString, std::string filename) const override
 
int RetrieveFileMulti (const std::vector< std::string > &listURLs, const std::vector< std::string > &listFiles, int maxConnect) const override
 
int RetrieveUrlInMemory (const std::string &urlString, std::string &output) const override
 
virtual void SetTimeout (long int _arg)
 
bool TestUrlAvailability (const std::string &url) const override
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::CurlHelperInterface
static bool IsCurlAvailable ()
 
static bool IsCurlMultiAvailable ()
 

Protected Member Functions

 CurlHelper ()
 
 ~CurlHelper () override
 
- Protected Member Functions inherited from otb::CurlHelperInterface
 CurlHelperInterface ()
 
 ~CurlHelperInterface () override
 

Private Member Functions

 CurlHelper (const Self &)=delete
 
void operator= (const Self &)=delete
 

Static Private Member Functions

static vcl_size_t CallbackWriteDataDummy (void *ptr, vcl_size_t size, vcl_size_t nmemb, void *data)
 
static vcl_size_t CallbackWriteDataToFile (void *ptr, vcl_size_t size, vcl_size_t nmemb, void *data)
 
static vcl_size_t CallbackWriteDataToStringStream (void *ptr, vcl_size_t size, vcl_size_t nmemb, void *data)
 

Private Attributes

std::string m_Browser
 
long int m_Timeout
 

Detailed Description

Class to use the curl capabilities from OTB.

This class is responsible for behaving properly when curl is not available, i.e. the compilation should pass, the runtime should not segfault but of course, the behavior will be different.

Definition at line 40 of file otbCurlHelper.h.

Member Typedef Documentation

◆ ConstPointer

typedef itk::SmartPointer<const Self> otb::CurlHelper::ConstPointer

Definition at line 47 of file otbCurlHelper.h.

◆ Pointer

typedef itk::SmartPointer<Self> otb::CurlHelper::Pointer

Definition at line 46 of file otbCurlHelper.h.

◆ Self

Standard class typedefs.

Definition at line 45 of file otbCurlHelper.h.

◆ Superclass

Definition at line 48 of file otbCurlHelper.h.

Constructor & Destructor Documentation

◆ CurlHelper() [1/2]

otb::CurlHelper::CurlHelper ( )
inlineprotected

Definition at line 70 of file otbCurlHelper.h.

◆ ~CurlHelper()

otb::CurlHelper::~CurlHelper ( )
inlineoverrideprotected

Definition at line 77 of file otbCurlHelper.h.

◆ CurlHelper() [2/2]

otb::CurlHelper::CurlHelper ( const Self )
privatedelete

Member Function Documentation

◆ CallbackWriteDataDummy()

static vcl_size_t otb::CurlHelper::CallbackWriteDataDummy ( void *  ptr,
vcl_size_t  size,
vcl_size_t  nmemb,
void *  data 
)
staticprivate

◆ CallbackWriteDataToFile()

static vcl_size_t otb::CurlHelper::CallbackWriteDataToFile ( void *  ptr,
vcl_size_t  size,
vcl_size_t  nmemb,
void *  data 
)
staticprivate

◆ CallbackWriteDataToStringStream()

static vcl_size_t otb::CurlHelper::CallbackWriteDataToStringStream ( void *  ptr,
vcl_size_t  size,
vcl_size_t  nmemb,
void *  data 
)
staticprivate

◆ CreateAnother()

virtual::itk::LightObject::Pointer otb::CurlHelper::CreateAnother ( void  ) const

◆ GetNameOfClass()

virtual const char* otb::CurlHelper::GetNameOfClass ( ) const
virtual

Reimplemented from otb::CurlHelperInterface.

◆ GetTimeout()

virtual long int otb::CurlHelper::GetTimeout ( )
virtual

◆ IsCurlReturnHttpError()

bool otb::CurlHelper::IsCurlReturnHttpError ( const std::string &  url) const

◆ New()

static Pointer otb::CurlHelper::New ( )
static

◆ operator=()

void otb::CurlHelper::operator= ( const Self )
privatedelete

◆ RetrieveFile() [1/2]

int otb::CurlHelper::RetrieveFile ( const std::ostringstream &  urlStream,
std::string  filename 
) const
overridevirtual

◆ RetrieveFile() [2/2]

int otb::CurlHelper::RetrieveFile ( const std::string &  urlString,
std::string  filename 
) const
overridevirtual

◆ RetrieveFileMulti()

int otb::CurlHelper::RetrieveFileMulti ( const std::vector< std::string > &  listURLs,
const std::vector< std::string > &  listFiles,
int  maxConnect 
) const
overridevirtual

◆ RetrieveUrlInMemory()

int otb::CurlHelper::RetrieveUrlInMemory ( const std::string &  urlString,
std::string &  output 
) const
overridevirtual

◆ SetTimeout()

virtual void otb::CurlHelper::SetTimeout ( long int  _arg)
virtual

◆ TestUrlAvailability()

bool otb::CurlHelper::TestUrlAvailability ( const std::string &  url) const
overridevirtual

Member Data Documentation

◆ m_Browser

std::string otb::CurlHelper::m_Browser
private

Definition at line 95 of file otbCurlHelper.h.

◆ m_Timeout

long int otb::CurlHelper::m_Timeout
private

Definition at line 96 of file otbCurlHelper.h.


The documentation for this class was generated from the following file: