LibreOffice Module ucb (master) 1
|
#include <DAVResourceAccess.hxx>
Public Member Functions | |
DAVResourceAccess ()=default | |
DAVResourceAccess (css::uno::Reference< css::uno::XComponentContext > xContext, rtl::Reference< DAVSessionFactory > xSessionFactory, OUString aURL) | |
DAVResourceAccess (const DAVResourceAccess &rOther) | |
DAVResourceAccess & | operator= (const DAVResourceAccess &rOther) |
void | setFlags (const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > &rFlags) |
void | setURL (const OUString &rNewURL) |
void | resetUri () |
const OUString & | getURL () const |
const rtl::Reference< DAVSessionFactory > & | getSessionFactory () const |
void | OPTIONS (DAVOptions &rOptions, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | PROPFIND (const Depth nDepth, const std::vector< OUString > &rPropertyNames, std::vector< DAVResource > &rResources, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | PROPFIND (const Depth nDepth, std::vector< DAVResourceInfo > &rResInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | PROPPATCH (const std::vector< ProppatchValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | HEAD (const std::vector< OUString > &rHeaderNames, DAVResource &rResource, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
css::uno::Reference< css::io::XInputStream > | GET (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | GET (css::uno::Reference< css::io::XOutputStream > &rStream, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
css::uno::Reference< css::io::XInputStream > | GET (const std::vector< OUString > &rHeaderNames, DAVResource &rResource, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | GET0 (DAVRequestHeaders &rRequestHeaders, const std::vector< OUString > &rHeaderNames, DAVResource &rResource, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
used as HEAD substitute when HEAD is not implemented on server More... | |
void | GET (css::uno::Reference< css::io::XOutputStream > &rStream, const std::vector< OUString > &rHeaderNames, DAVResource &rResource, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | PUT (const css::uno::Reference< css::io::XInputStream > &rStream, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
css::uno::Reference< css::io::XInputStream > | POST (const OUString &rContentType, const OUString &rReferer, const css::uno::Reference< css::io::XInputStream > &rInputStream, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | POST (const OUString &rContentType, const OUString &rReferer, const css::uno::Reference< css::io::XInputStream > &rInputStream, css::uno::Reference< css::io::XOutputStream > &rOutputStream, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | MKCOL (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | COPY (const OUString &rSourcePath, const OUString &rDestinationURI, bool bOverwrite, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | MOVE (const OUString &rSourcePath, const OUString &rDestinationURI, bool bOverwrite, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | DESTROY (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | LOCK (css::ucb::Lock &inLock, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | UNLOCK (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) |
void | abort () |
bool | handleException (DAVException const &e, int errorCount) |
Static Public Member Functions | |
static void | getUserRequestHeaders (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, const OUString &rURI, css::ucb::WebDAVHTTPMethod eMethod, DAVRequestHeaders &rRequestHeaders) |
Private Member Functions | |
const OUString & | getRequestURI () const |
bool | detectRedirectCycle (::std::u16string_view rRedirectURL) |
void | initialize () |
Private Attributes | |
osl::Mutex | m_aMutex |
OUString | m_aURL |
OUString | m_aPath |
::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > | m_aFlags |
rtl::Reference< DAVSession > | m_xSession |
rtl::Reference< DAVSessionFactory > | m_xSessionFactory |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
std::vector< CurlUri > | m_aRedirectURIs |
Definition at line 45 of file DAVResourceAccess.hxx.
|
default |
http_dav_ucp::DAVResourceAccess::DAVResourceAccess | ( | css::uno::Reference< css::uno::XComponentContext > | xContext, |
rtl::Reference< DAVSessionFactory > | xSessionFactory, | ||
OUString | aURL | ||
) |
DAVResourceAccess::DAVResourceAccess | ( | const DAVResourceAccess & | rOther | ) |
Definition at line 137 of file DAVResourceAccess.cxx.
References m_aURL, and m_xContext.
void DAVResourceAccess::abort | ( | ) |
DAVException |
Definition at line 558 of file DAVResourceAccess.cxx.
References m_aMutex, and m_xSession.
void DAVResourceAccess::COPY | ( | const OUString & | rSourcePath, |
const OUString & | rDestinationURI, | ||
bool | bOverwrite, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
Definition at line 802 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
void DAVResourceAccess::DESTROY | ( | const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ) |
DAVException |
Definition at line 882 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
|
private |
DAVException |
Definition at line 1084 of file DAVResourceAccess.cxx.
References g_nRedirectLimit, m_aMutex, and m_aRedirectURIs.
Referenced by handleException().
css::uno::Reference< css::io::XInputStream > http_dav_ucp::DAVResourceAccess::GET | ( | const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ) |
DAVException |
css::uno::Reference< css::io::XInputStream > http_dav_ucp::DAVResourceAccess::GET | ( | const std::vector< OUString > & | rHeaderNames, |
DAVResource & | rResource, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
void http_dav_ucp::DAVResourceAccess::GET | ( | css::uno::Reference< css::io::XOutputStream > & | rStream, |
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
void http_dav_ucp::DAVResourceAccess::GET | ( | css::uno::Reference< css::io::XOutputStream > & | rStream, |
const std::vector< OUString > & | rHeaderNames, | ||
DAVResource & | rResource, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
void DAVResourceAccess::GET0 | ( | DAVRequestHeaders & | rRequestHeaders, |
const std::vector< OUString > & | rHeaderNames, | ||
DAVResource & | rResource, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
used as HEAD substitute when HEAD is not implemented on server
DAVException |
Definition at line 477 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
|
private |
|
inline |
Definition at line 75 of file DAVResourceAccess.hxx.
References m_xSessionFactory.
|
inline |
Definition at line 73 of file DAVResourceAccess.hxx.
References m_aURL.
|
static |
bool DAVResourceAccess::handleException | ( | DAVException const & | e, |
int | errorCount | ||
) |
DAVException |
Definition at line 1120 of file DAVResourceAccess.cxx.
References http_dav_ucp::DAVException::DAV_HTTP_ERROR, http_dav_ucp::DAVException::DAV_HTTP_REDIRECT, http_dav_ucp::DAVException::DAV_HTTP_RETRY, detectRedirectCycle(), http_dav_ucp::DAVException::getData(), http_dav_ucp::DAVException::getError(), http_dav_ucp::DAVException::getStatus(), initialize(), http_dav_ucp::SC_BAD_GATEWAY, http_dav_ucp::SC_BAD_REQUEST, http_dav_ucp::SC_GATEWAY_TIMEOUT, http_dav_ucp::SC_INSUFFICIENT_STORAGE, http_dav_ucp::SC_SERVICE_UNAVAILABLE, and setURL().
Referenced by COPY(), DESTROY(), GET0(), HEAD(), LOCK(), MKCOL(), MOVE(), OPTIONS(), PROPPATCH(), PUT(), and UNLOCK().
void DAVResourceAccess::HEAD | ( | const std::vector< OUString > & | rHeaderNames, |
DAVResource & | rResource, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
Definition at line 318 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
|
private |
DAVException |
Definition at line 1003 of file DAVResourceAccess.cxx.
References http_dav_ucp::DAVException::DAV_INVALID_ARG, http_dav_ucp::CurlUri::GetHost(), http_dav_ucp::CurlUri::GetRelativeReference(), http_dav_ucp::CurlUri::GetURI(), m_aFlags, m_aMutex, m_aPath, m_aRedirectURIs, m_aURL, m_xContext, m_xSession, and m_xSessionFactory.
Referenced by COPY(), DESTROY(), GET0(), handleException(), HEAD(), LOCK(), MKCOL(), MOVE(), OPTIONS(), PROPPATCH(), PUT(), resetUri(), and UNLOCK().
void DAVResourceAccess::LOCK | ( | css::ucb::Lock & | inLock, |
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
Definition at line 918 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
void DAVResourceAccess::MKCOL | ( | const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ) |
DAVException |
Definition at line 767 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
void DAVResourceAccess::MOVE | ( | const OUString & | rSourcePath, |
const OUString & | rDestinationURI, | ||
bool | bOverwrite, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
Definition at line 842 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
DAVResourceAccess & DAVResourceAccess::operator= | ( | const DAVResourceAccess & | rOther | ) |
Definition at line 149 of file DAVResourceAccess.cxx.
References m_aFlags, m_aPath, m_aRedirectURIs, m_aURL, m_xContext, m_xSession, and m_xSessionFactory.
void DAVResourceAccess::OPTIONS | ( | DAVOptions & | rOptions, |
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
Definition at line 163 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
css::uno::Reference< css::io::XInputStream > http_dav_ucp::DAVResourceAccess::POST | ( | const OUString & | rContentType, |
const OUString & | rReferer, | ||
const css::uno::Reference< css::io::XInputStream > & | rInputStream, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
void http_dav_ucp::DAVResourceAccess::POST | ( | const OUString & | rContentType, |
const OUString & | rReferer, | ||
const css::uno::Reference< css::io::XInputStream > & | rInputStream, | ||
css::uno::Reference< css::io::XOutputStream > & | rOutputStream, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
void http_dav_ucp::DAVResourceAccess::PROPFIND | ( | const Depth | nDepth, |
const std::vector< OUString > & | rPropertyNames, | ||
std::vector< DAVResource > & | rResources, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
void http_dav_ucp::DAVResourceAccess::PROPFIND | ( | const Depth | nDepth, |
std::vector< DAVResourceInfo > & | rResInfo, | ||
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
void DAVResourceAccess::PROPPATCH | ( | const std::vector< ProppatchValue > & | rValues, |
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
Definition at line 281 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
void DAVResourceAccess::PUT | ( | const css::uno::Reference< css::io::XInputStream > & | rStream, |
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ||
) |
DAVException |
Definition at line 601 of file DAVResourceAccess.cxx.
References comphelper::OSeekableInputWrapper::CheckSeekableCanWrap(), getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, m_xContext, and m_xSession.
void DAVResourceAccess::resetUri | ( | ) |
Definition at line 1105 of file DAVResourceAccess.cxx.
References http_dav_ucp::CurlUri::GetURI(), initialize(), m_aMutex, m_aRedirectURIs, and setURL().
void DAVResourceAccess::setFlags | ( | const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > & | rFlags | ) |
DAVException |
Definition at line 988 of file DAVResourceAccess.cxx.
void DAVResourceAccess::setURL | ( | const OUString & | rNewURL | ) |
DAVException |
Definition at line 994 of file DAVResourceAccess.cxx.
References m_aMutex, m_aPath, and m_aURL.
Referenced by handleException(), and resetUri().
void DAVResourceAccess::UNLOCK | ( | const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv | ) |
DAVException |
Definition at line 954 of file DAVResourceAccess.cxx.
References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.
|
private |
Definition at line 50 of file DAVResourceAccess.hxx.
Referenced by initialize(), operator=(), and setFlags().
|
private |
Definition at line 47 of file DAVResourceAccess.hxx.
Referenced by abort(), detectRedirectCycle(), initialize(), resetUri(), setFlags(), and setURL().
|
private |
Definition at line 49 of file DAVResourceAccess.hxx.
Referenced by getRequestURI(), initialize(), operator=(), and setURL().
|
private |
Definition at line 54 of file DAVResourceAccess.hxx.
Referenced by detectRedirectCycle(), initialize(), operator=(), and resetUri().
|
private |
Definition at line 48 of file DAVResourceAccess.hxx.
Referenced by COPY(), DESTROY(), GET0(), getRequestURI(), getURL(), HEAD(), initialize(), LOCK(), MKCOL(), MOVE(), operator=(), OPTIONS(), PROPPATCH(), PUT(), setURL(), and UNLOCK().
|
private |
Definition at line 53 of file DAVResourceAccess.hxx.
Referenced by initialize(), operator=(), and PUT().
|
private |
Definition at line 51 of file DAVResourceAccess.hxx.
Referenced by abort(), COPY(), DESTROY(), GET0(), getRequestURI(), HEAD(), initialize(), LOCK(), MKCOL(), MOVE(), operator=(), OPTIONS(), PROPPATCH(), PUT(), and UNLOCK().
|
private |
Definition at line 52 of file DAVResourceAccess.hxx.
Referenced by getSessionFactory(), initialize(), and operator=().