LibreOffice Module ucb (master) 1
|
implementation of libcurl HTTP/DAV back-end More...
#include <CurlSession.hxx>
Public Member Functions | |
CurlSession (css::uno::Reference< css::uno::XComponentContext > 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 bool | UsesProxy ()=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 |
virtual void | abort ()=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 > xFactory) | |
virtual | ~DAVSession () |
implementation of libcurl HTTP/DAV back-end
Definition at line 23 of file CurlSession.hxx.
|
explicit |
Definition at line 589 of file CurlSession.cxx.
References ucbhelper::InternetProxyServer::aName, http_dav_ucp::ConnectionEndPointString(), http_dav_ucp::DAVException::DAV_SESSION_CREATE, http_dav_ucp::debug_callback(), http_dav_ucp::CurlUri::GetHost(), http_dav_ucp::CurlUri::GetPort(), http_dav_ucp::CurlUri::GetScheme(), http_dav_ucp::header_callback(), comphelper::LibreOfficeKit::isActive(), m_ErrorBuffer, m_Flags, m_nReadTimeout, m_pCurl, m_pCurlMulti, m_Proxy, m_URI, m_xContext, ucbhelper::InternetProxyServer::nPort, OUStringToOString(), http_dav_ucp::read_callback(), SAL_INFO, SAL_WARN, and http_dav_ucp::write_callback().
|
overridevirtual |
Definition at line 731 of file CurlSession.cxx.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 755 of file CurlSession.cxx.
|
overridevirtual |
Definition at line 733 of file CurlSession.cxx.
References http_dav_ucp::CurlUri::GetHost(), http_dav_ucp::CurlUri::GetPort(), and http_dav_ucp::CurlUri::GetScheme().
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 2120 of file CurlSession.cxx.
References SAL_INFO.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 2138 of file CurlSession.cxx.
References SAL_INFO.
|
overridevirtual |
Definition at line 1899 of file CurlSession.cxx.
References m_xContext, and SAL_INFO.
|
overridevirtual |
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 1856 of file CurlSession.cxx.
References m_xContext, and SAL_INFO.
|
overridevirtual |
Definition at line 1840 of file CurlSession.cxx.
References SAL_INFO.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 2222 of file CurlSession.cxx.
References http_dav_ucp::CurlUri::GetURI(), m_xContext, and SAL_INFO.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 2076 of file CurlSession.cxx.
References SAL_INFO.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 2129 of file CurlSession.cxx.
References SAL_INFO.
auto http_dav_ucp::CurlSession::NonInteractive_LOCK | ( | OUString const & | rURI, |
::std::u16string_view | rLockToken, | ||
sal_Int32 & | o_rLastChanceToSendRefreshRequest, | ||
bool & | o_rIsAuthFailed | ||
) | -> bool |
Definition at line 2378 of file CurlSession.cxx.
References http_dav_ucp::DAVException::getError(), OUStringToOString(), SAL_INFO, and SAL_WARN_IF.
auto http_dav_ucp::CurlSession::NonInteractive_UNLOCK | ( | OUString const & | rURI | ) | -> void |
Definition at line 2434 of file CurlSession.cxx.
References SAL_INFO.
|
overridevirtual |
Implements http_dav_ucp::DAVSession.
Definition at line 1523 of file CurlSession.cxx.
References http_dav_ucp::CurlUri::GetURI(), result, SAL_INFO, v, and value.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
|
overridevirtual |
Definition at line 1740 of file CurlSession.cxx.
References SAL_INFO.
|
overridevirtual |
Definition at line 1725 of file CurlSession.cxx.
|
overridevirtual |
Definition at line 1751 of file CurlSession.cxx.
References m_xContext, name, http_dav_ucp::PROPREMOVE, http_dav_ucp::PROPSET, SAL_INFO, and value.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 1945 of file CurlSession.cxx.
References http_dav_ucp::CurlUri::GetURI(), OUStringToOString(), and SAL_INFO.
|
overridevirtual |
DAVException |
Implements http_dav_ucp::DAVSession.
Definition at line 2365 of file CurlSession.cxx.
References http_dav_ucp::CurlUri::GetURI(), and SAL_INFO.
|
overridevirtual |
Implements http_dav_ucp::DAVSession.
Definition at line 749 of file CurlSession.cxx.
|
friend |
Definition at line 50 of file CurlSession.hxx.
|
private |
flag to signal abort to transferring thread
Definition at line 42 of file CurlSession.hxx.
|
private |
buffer for libcurl detailed error messages
Definition at line 33 of file CurlSession.hxx.
Referenced by CurlSession().
|
private |
flags may be passed to constructor, e.g. "KeepAlive"
Definition at line 30 of file CurlSession.hxx.
Referenced by CurlSession().
|
private |
once authentication was successful, rely on m_pCurl's data
Definition at line 37 of file CurlSession.hxx.
|
private |
Definition at line 38 of file CurlSession.hxx.
|
private |
mutex required to access all other non-const members
Definition at line 27 of file CurlSession.hxx.
|
private |
read timeout in milliseconds (connection timeout is stored in m_pCurl)
Definition at line 40 of file CurlSession.hxx.
Referenced by CurlSession().
|
private |
|
private |
|
private |
proxy is used if aName is non-empty
Definition at line 35 of file CurlSession.hxx.
Referenced by CurlSession().
|
private |
Definition at line 31 of file CurlSession.hxx.
Referenced by CurlSession().
|
private |
Definition at line 28 of file CurlSession.hxx.