LibreOffice Module ucb (master)  1
Public Member Functions | Private Attributes | Friends | List of all members
http_dav_ucp::CurlSession Class Reference

implementation of libcurl HTTP/DAV back-end More...

#include <CurlSession.hxx>

Inheritance diagram for http_dav_ucp::CurlSession:
[legend]
Collaboration diagram for http_dav_ucp::CurlSession:
[legend]

Public Member Functions

 CurlSession (css::uno::Reference< css::uno::XComponentContext > const &xContext,::rtl::Reference< DAVSessionFactory > const &rpFactory, OUString const &rURI, css::uno::Sequence< css::beans::NamedValue > const &rFlags,::ucbhelper::InternetProxyDecider const &rProxyDecider)
 
virtual ~CurlSession () override
 
virtual auto CanUse (OUString const &rURI, css::uno::Sequence< css::beans::NamedValue > const &rFlags) -> bool override
 
virtual auto UsesProxy () -> bool override
 
virtual auto OPTIONS (OUString const &rURIReference, DAVOptions &rOptions, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto PROPFIND (OUString const &rURIReference, Depth depth,::std::vector< OUString > const &rPropertyNames,::std::vector< DAVResource > &o_rResources, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto PROPFIND (OUString const &rURIReference, Depth depth,::std::vector< DAVResourceInfo > &o_rResourceInfos, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto PROPPATCH (OUString const &rURIReference,::std::vector< ProppatchValue > const &rValues, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto HEAD (OUString const &rURIReference,::std::vector< OUString > const &rHeaderNames, DAVResource &io_rResource, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto GET (OUString const &rURIReference, DAVRequestEnvironment const &rEnv) -> css::uno::Reference< css::io::XInputStream > override
 
virtual auto GET (OUString const &rURIReference, css::uno::Reference< css::io::XOutputStream > &rxOutStream, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto GET (OUString const &rURIReference,::std::vector< OUString > const &rHeaderNames, DAVResource &io_rResource, DAVRequestEnvironment const &rEnv) -> css::uno::Reference< css::io::XInputStream > override
 
virtual auto GET (OUString const &rURIReference, css::uno::Reference< css::io::XOutputStream > &rxOutStream,::std::vector< OUString > const &rHeaderNames, DAVResource &io_rResource, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto PUT (OUString const &rURIReference, css::uno::Reference< css::io::XInputStream > const &rxInStream, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto POST (OUString const &rURIReference, OUString const &rContentType, OUString const &rReferer, css::uno::Reference< css::io::XInputStream > const &rxInStream, DAVRequestEnvironment const &rEnv) -> css::uno::Reference< css::io::XInputStream > override
 
virtual auto POST (OUString const &rURIReference, OUString const &rContentType, OUString const &rReferer, css::uno::Reference< css::io::XInputStream > const &rxInStream, css::uno::Reference< css::io::XOutputStream > &rxOutStream, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto MKCOL (OUString const &rURIReference, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto COPY (OUString const &rSourceURIReference, OUString const &rDestinationURI, DAVRequestEnvironment const &rEnv, bool isOverwrite=false) -> void override
 
virtual auto MOVE (OUString const &rSourceURIReference, OUString const &rDestinationURI, DAVRequestEnvironment const &rEnv, bool isOverwrite=false) -> void override
 
virtual auto DESTROY (OUString const &rURIReference, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto LOCK (OUString const &rURIReference, css::ucb::Lock &rLock, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto UNLOCK (OUString const &rURIReference, DAVRequestEnvironment const &rEnv) -> void override
 
virtual auto abort () -> void override
 
auto NonInteractive_LOCK (OUString const &rURI,::std::u16string_view rLockToken, sal_Int32 &o_rLastChanceToSendRefreshRequest, bool &o_rIsAuthFailed) -> bool
 
auto NonInteractive_UNLOCK (OUString const &rURI) -> void
 
- Public Member Functions inherited from http_dav_ucp::DAVSession
void acquire ()
 
void release ()
 
virtual bool CanUse (const OUString &rURI, const ::com::sun::star::uno::Sequence<::com::sun::star::beans::NamedValue > &rFlags)=0
 
virtual void OPTIONS (const OUString &inPath, DAVOptions &rOptions, const DAVRequestEnvironment &rEnv)=0
 
virtual void PROPFIND (const OUString &inPath, const Depth inDepth, const std::vector< OUString > &inPropertyNames, std::vector< DAVResource > &ioResources, const DAVRequestEnvironment &rEnv)=0
 
virtual void PROPFIND (const OUString &inPath, const Depth inDepth, std::vector< DAVResourceInfo > &ioResInfo, const DAVRequestEnvironment &rEnv)=0
 
virtual void PROPPATCH (const OUString &inPath, const std::vector< ProppatchValue > &inValues, const DAVRequestEnvironment &rEnv)=0
 
virtual void HEAD (const OUString &inPath, const std::vector< OUString > &inHeaderNames, DAVResource &ioResource, const DAVRequestEnvironment &rEnv)=0
 
virtual css::uno::Reference< css::io::XInputStream > GET (const OUString &inPath, const DAVRequestEnvironment &rEnv)=0
 
virtual void GET (const OUString &inPath, css::uno::Reference< css::io::XOutputStream > &o, const DAVRequestEnvironment &rEnv)=0
 
virtual css::uno::Reference< css::io::XInputStream > GET (const OUString &inPath, const std::vector< OUString > &inHeaderNames, DAVResource &ioResource, const DAVRequestEnvironment &rEnv)=0
 
virtual void GET (const OUString &inPath, css::uno::Reference< css::io::XOutputStream > &o, const std::vector< OUString > &inHeaderNames, DAVResource &ioResource, const DAVRequestEnvironment &rEnv)=0
 
virtual void PUT (const OUString &inPath, const css::uno::Reference< css::io::XInputStream > &s, const DAVRequestEnvironment &rEnv)=0
 
virtual css::uno::Reference< css::io::XInputStream > POST (const OUString &inPath, const OUString &rContentType, const OUString &rReferer, const css::uno::Reference< css::io::XInputStream > &inInputStream, const DAVRequestEnvironment &rEnv)=0
 
virtual void POST (const OUString &inPath, const OUString &rContentType, const OUString &rReferer, const css::uno::Reference< css::io::XInputStream > &inInputStream, css::uno::Reference< css::io::XOutputStream > &oOutputStream, const DAVRequestEnvironment &rEnv)=0
 
virtual void MKCOL (const OUString &inPath, const DAVRequestEnvironment &rEnv)=0
 
virtual void COPY (const OUString &inSource, const OUString &inDestination, const DAVRequestEnvironment &rEnv, bool inOverwrite=false)=0
 
virtual void MOVE (const OUString &inSource, const OUString &inDestination, const DAVRequestEnvironment &rEnv, bool inOverwrite=false)=0
 
virtual void DESTROY (const OUString &inPath, const DAVRequestEnvironment &rEnv)=0
 
virtual void LOCK (const OUString &inPath, css::ucb::Lock &inLock, const DAVRequestEnvironment &rEnv)=0
 
virtual void UNLOCK (const OUString &inPath, const DAVRequestEnvironment &rEnv)=0
 

Private Attributes

::std::mutex m_Mutex
 mutex required to access all other non-const members More...
 
css::uno::Reference< css::uno::XComponentContext > const m_xContext
 
css::uno::Sequence< css::beans::NamedValue > const m_Flags
 flags may be passed to constructor, e.g. "KeepAlive" More...
 
CurlUri const m_URI
 
char m_ErrorBuffer [CURL_ERROR_SIZE]
 buffer for libcurl detailed error messages More...
 
::ucbhelper::InternetProxyServer const m_Proxy
 proxy is used if aName is non-empty More...
 
bool m_isAuthenticated = false
 once authentication was successful, rely on m_pCurl's data More...
 
bool m_isAuthenticatedProxy = false
 
int m_nReadTimeout = 0
 read timeout in milliseconds (connection timeout is stored in m_pCurl) More...
 
::std::atomic< bool > m_AbortFlag = false
 flag to signal abort to transferring thread More...
 
::std::unique_ptr< CURLM, deleter_from_fn< CURLM, curl_multi_cleanup > > m_pCurlMulti
 libcurl multi handle More...
 
::std::unique_ptr< CURL, deleter_from_fn< CURL, curl_easy_cleanup > > m_pCurl
 libcurl easy handle More...
 

Friends

struct CurlProcessor
 

Additional Inherited Members

- Protected Member Functions inherited from http_dav_ucp::DAVSession
 DAVSession (rtl::Reference< DAVSessionFactory > const &rFactory)
 
virtual ~DAVSession ()
 
- Protected Attributes inherited from http_dav_ucp::DAVSession
rtl::Reference< DAVSessionFactorym_xFactory
 

Detailed Description

implementation of libcurl HTTP/DAV back-end

Definition at line 23 of file CurlSession.hxx.

Constructor & Destructor Documentation

http_dav_ucp::CurlSession::CurlSession ( css::uno::Reference< css::uno::XComponentContext > const &  xContext,
::rtl::Reference< DAVSessionFactory > const &  rpFactory,
OUString const &  rURI,
css::uno::Sequence< css::beans::NamedValue > const &  rFlags,
::ucbhelper::InternetProxyDecider const &  rProxyDecider 
)
explicit
http_dav_ucp::CurlSession::~CurlSession ( )
overridevirtual

Definition at line 712 of file CurlSession.cxx.

Member Function Documentation

auto http_dav_ucp::CurlSession::abort ( ) -> void
overridevirtual
Exceptions
DAVException

Implements http_dav_ucp::DAVSession.

Definition at line 736 of file CurlSession.cxx.

auto http_dav_ucp::CurlSession::CanUse ( OUString const &  rURI,
css::uno::Sequence< css::beans::NamedValue > const &  rFlags 
) -> bool
overridevirtual
auto http_dav_ucp::CurlSession::COPY ( OUString const &  rSourceURIReference,
OUString const &  rDestinationURI,
DAVRequestEnvironment const &  rEnv,
bool  isOverwrite = false 
) -> void
overridevirtual

Definition at line 2071 of file CurlSession.cxx.

References http_dav_ucp::CurlProcessor::MoveOrCopy(), and SAL_INFO.

auto http_dav_ucp::CurlSession::DESTROY ( OUString const &  rURIReference,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::GET ( OUString const &  rURIReference,
DAVRequestEnvironment const &  rEnv 
) -> css::uno::Reference<css::io::XInputStream>
overridevirtual
virtual auto http_dav_ucp::CurlSession::GET ( OUString const &  rURIReference,
css::uno::Reference< css::io::XOutputStream > &  rxOutStream,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::GET ( OUString const &  rURIReference,
::std::vector< OUString > const &  rHeaderNames,
DAVResource io_rResource,
DAVRequestEnvironment const &  rEnv 
) -> css::uno::Reference<css::io::XInputStream>
overridevirtual
virtual auto http_dav_ucp::CurlSession::GET ( OUString const &  rURIReference,
css::uno::Reference< css::io::XOutputStream > &  rxOutStream,
::std::vector< OUString > const &  rHeaderNames,
DAVResource io_rResource,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::HEAD ( OUString const &  rURIReference,
::std::vector< OUString > const &  rHeaderNames,
DAVResource io_rResource,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::LOCK ( OUString const &  rURIReference,
css::ucb::Lock &  rLock,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::MKCOL ( OUString const &  rURIReference,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::MOVE ( OUString const &  rSourceURIReference,
OUString const &  rDestinationURI,
DAVRequestEnvironment const &  rEnv,
bool  isOverwrite = false 
) -> void
overridevirtual

Definition at line 2080 of file CurlSession.cxx.

References http_dav_ucp::CurlProcessor::MoveOrCopy(), and SAL_INFO.

auto http_dav_ucp::CurlSession::NonInteractive_LOCK ( OUString const &  rURI,
::std::u16string_view  rLockToken,
sal_Int32 &  o_rLastChanceToSendRefreshRequest,
bool &  o_rIsAuthFailed 
) -> bool
auto http_dav_ucp::CurlSession::NonInteractive_UNLOCK ( OUString const &  rURI) -> void

Definition at line 2384 of file CurlSession.cxx.

References SAL_INFO, http_dav_ucp::CurlProcessor::Unlock(), and uri.

auto http_dav_ucp::CurlSession::OPTIONS ( OUString const &  rURIReference,
DAVOptions rOptions,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
virtual auto http_dav_ucp::CurlSession::POST ( OUString const &  rURIReference,
OUString const &  rContentType,
OUString const &  rReferer,
css::uno::Reference< css::io::XInputStream > const &  rxInStream,
DAVRequestEnvironment const &  rEnv 
) -> css::uno::Reference< css::io::XInputStream >
overridevirtual
virtual auto http_dav_ucp::CurlSession::POST ( OUString const &  rURIReference,
OUString const &  rContentType,
OUString const &  rReferer,
css::uno::Reference< css::io::XInputStream > const &  rxInStream,
css::uno::Reference< css::io::XOutputStream > &  rxOutStream,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::PROPFIND ( OUString const &  rURIReference,
Depth  depth,
::std::vector< OUString > const &  rPropertyNames,
::std::vector< DAVResource > &  o_rResources,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::PROPFIND ( OUString const &  rURIReference,
Depth  depth,
::std::vector< DAVResourceInfo > &  o_rResourceInfos,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::PROPPATCH ( OUString const &  rURIReference,
::std::vector< ProppatchValue > const &  rValues,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::PUT ( OUString const &  rURIReference,
css::uno::Reference< css::io::XInputStream > const &  rxInStream,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::UNLOCK ( OUString const &  rURIReference,
DAVRequestEnvironment const &  rEnv 
) -> void
overridevirtual
auto http_dav_ucp::CurlSession::UsesProxy ( ) -> bool
overridevirtual

Implements http_dav_ucp::DAVSession.

Definition at line 730 of file CurlSession.cxx.

Friends And Related Function Documentation

friend struct CurlProcessor
friend

Definition at line 50 of file CurlSession.hxx.

Member Data Documentation

::std::atomic<bool> http_dav_ucp::CurlSession::m_AbortFlag = false
private

flag to signal abort to transferring thread

Definition at line 42 of file CurlSession.hxx.

char http_dav_ucp::CurlSession::m_ErrorBuffer[CURL_ERROR_SIZE]
private

buffer for libcurl detailed error messages

Definition at line 33 of file CurlSession.hxx.

Referenced by CurlSession().

css::uno::Sequence<css::beans::NamedValue> const http_dav_ucp::CurlSession::m_Flags
private

flags may be passed to constructor, e.g. "KeepAlive"

Definition at line 30 of file CurlSession.hxx.

Referenced by CurlSession().

bool http_dav_ucp::CurlSession::m_isAuthenticated = false
private

once authentication was successful, rely on m_pCurl's data

Definition at line 37 of file CurlSession.hxx.

bool http_dav_ucp::CurlSession::m_isAuthenticatedProxy = false
private

Definition at line 38 of file CurlSession.hxx.

::std::mutex http_dav_ucp::CurlSession::m_Mutex
private

mutex required to access all other non-const members

Definition at line 27 of file CurlSession.hxx.

int http_dav_ucp::CurlSession::m_nReadTimeout = 0
private

read timeout in milliseconds (connection timeout is stored in m_pCurl)

Definition at line 40 of file CurlSession.hxx.

Referenced by CurlSession().

::std::unique_ptr<CURL, deleter_from_fn<CURL, curl_easy_cleanup> > http_dav_ucp::CurlSession::m_pCurl
private

libcurl easy handle

Definition at line 47 of file CurlSession.hxx.

::std::unique_ptr<CURLM, deleter_from_fn<CURLM, curl_multi_cleanup> > http_dav_ucp::CurlSession::m_pCurlMulti
private

libcurl multi handle

Definition at line 45 of file CurlSession.hxx.

Referenced by CurlSession().

::ucbhelper::InternetProxyServer const http_dav_ucp::CurlSession::m_Proxy
private

proxy is used if aName is non-empty

Definition at line 35 of file CurlSession.hxx.

Referenced by CurlSession().

CurlUri const http_dav_ucp::CurlSession::m_URI
private

Definition at line 31 of file CurlSession.hxx.

Referenced by CurlSession().

css::uno::Reference<css::uno::XComponentContext> const http_dav_ucp::CurlSession::m_xContext
private

Definition at line 28 of file CurlSession.hxx.


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