28 css::uno::Reference<css::uno::XComponentContext>
const m_xContext;
30 css::uno::Sequence<css::beans::NamedValue>
const m_Flags;
45 ::std::unique_ptr<CURLM, deleter_from_fn<CURLM, curl_multi_cleanup>>
m_pCurlMulti;
47 ::std::unique_ptr<CURL, deleter_from_fn<CURL, curl_easy_cleanup>>
m_pCurl;
53 explicit CurlSession(css::uno::Reference<css::uno::XComponentContext> xContext,
55 css::uno::Sequence<css::beans::NamedValue>
const& rFlags,
59 virtual auto CanUse(OUString
const& rURI,
60 css::uno::Sequence<css::beans::NamedValue>
const& rFlags) ->
bool override;
62 virtual auto UsesProxy() ->
bool override;
68 virtual auto PROPFIND(OUString
const& rURIReference,
Depth depth,
69 ::std::vector<OUString>
const& rPropertyNames,
70 ::std::vector<DAVResource>& o_rResources,
73 virtual auto PROPFIND(OUString
const& rURIReference,
Depth depth,
74 ::std::vector<DAVResourceInfo>& o_rResourceInfos,
77 virtual auto PROPPATCH(OUString
const& rURIReference,
78 ::std::vector<ProppatchValue>
const& rValues,
81 virtual auto HEAD(OUString
const& rURIReference, ::std::vector<OUString>
const& rHeaderNames,
86 -> css::uno::Reference<css::io::XInputStream>
override;
88 virtual auto GET(OUString
const& rURIReference,
89 css::uno::Reference<css::io::XOutputStream>& rxOutStream,
92 virtual auto GET(OUString
const& rURIReference, ::std::vector<OUString>
const& rHeaderNames,
94 -> css::uno::Reference<css::io::XInputStream>
override;
96 virtual auto GET(OUString
const& rURIReference,
97 css::uno::Reference<css::io::XOutputStream>& rxOutStream,
98 ::std::vector<OUString>
const& rHeaderNames,
DAVResource& io_rResource,
101 virtual auto PUT(OUString
const& rURIReference,
102 css::uno::Reference<css::io::XInputStream>
const& rxInStream,
105 virtual auto POST(OUString
const& rURIReference, OUString
const& rContentType,
106 OUString
const& rReferer,
107 css::uno::Reference<css::io::XInputStream>
const& rxInStream,
109 -> css::uno::Reference<css::io::XInputStream>
override;
111 virtual auto POST(OUString
const& rURIReference, OUString
const& rContentType,
112 OUString
const& rReferer,
113 css::uno::Reference<css::io::XInputStream>
const& rxInStream,
114 css::uno::Reference<css::io::XOutputStream>& rxOutStream,
120 virtual auto COPY(OUString
const& rSourceURIReference, OUString
const& rDestinationURI,
123 virtual auto MOVE(OUString
const& rSourceURIReference, OUString
const& rDestinationURI,
129 virtual auto LOCK(OUString
const& rURIReference, css::ucb::Lock & rLock,
135 virtual auto abort() ->
void override;
138 sal_Int32& o_rLastChanceToSendRefreshRequest,
bool& o_rIsAuthFailed)
implementation of libcurl HTTP/DAV back-end
::std::mutex m_Mutex
mutex required to access all other non-const members
virtual auto PUT(OUString const &rURIReference, css::uno::Reference< css::io::XInputStream > const &rxInStream, DAVRequestEnvironment const &rEnv) -> void override
virtual auto PROPPATCH(OUString const &rURIReference, ::std::vector< ProppatchValue > const &rValues, DAVRequestEnvironment const &rEnv) -> void override
int m_nReadTimeout
read timeout in milliseconds (connection timeout is stored in m_pCurl)
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 LOCK(OUString const &rURIReference, css::ucb::Lock &rLock, 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 HEAD(OUString const &rURIReference, ::std::vector< OUString > const &rHeaderNames, DAVResource &io_rResource, DAVRequestEnvironment const &rEnv) -> void override
virtual auto abort() -> void override
::std::unique_ptr< CURLM, deleter_from_fn< CURLM, curl_multi_cleanup > > m_pCurlMulti
libcurl multi handle
virtual auto UNLOCK(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
auto NonInteractive_UNLOCK(OUString const &rURI) -> void
virtual ~CurlSession() override
virtual auto DESTROY(OUString const &rURIReference, DAVRequestEnvironment const &rEnv) -> void override
css::uno::Sequence< css::beans::NamedValue > const m_Flags
flags may be passed to constructor, e.g. "KeepAlive"
virtual auto GET(OUString const &rURIReference, css::uno::Reference< css::io::XOutputStream > &rxOutStream, DAVRequestEnvironment const &rEnv) -> void override
char m_ErrorBuffer[CURL_ERROR_SIZE]
buffer for libcurl detailed error messages
virtual auto UsesProxy() -> bool override
auto NonInteractive_LOCK(OUString const &rURI, ::std::u16string_view rLockToken, sal_Int32 &o_rLastChanceToSendRefreshRequest, bool &o_rIsAuthFailed) -> bool
virtual auto MKCOL(OUString const &rURIReference, DAVRequestEnvironment const &rEnv) -> void override
bool m_isAuthenticated
once authentication was successful, rely on m_pCurl's data
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 MOVE(OUString const &rSourceURIReference, OUString const &rDestinationURI, DAVRequestEnvironment const &rEnv, bool isOverwrite=false) -> void override
virtual auto GET(OUString const &rURIReference, DAVRequestEnvironment const &rEnv) -> css::uno::Reference< css::io::XInputStream > override
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)
::std::atomic< bool > m_AbortFlag
flag to signal abort to transferring thread
::std::unique_ptr< CURL, deleter_from_fn< CURL, curl_easy_cleanup > > m_pCurl
libcurl easy handle
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 CanUse(OUString const &rURI, css::uno::Sequence< css::beans::NamedValue > const &rFlags) -> bool override
::ucbhelper::InternetProxyServer const m_Proxy
proxy is used if aName is non-empty
css::uno::Reference< css::uno::XComponentContext > const m_xContext
virtual auto OPTIONS(OUString const &rURIReference, DAVOptions &rOptions, DAVRequestEnvironment const &rEnv) -> void override
bool m_isAuthenticatedProxy
this is just a bunch of static member functions called from CurlSession