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

#include <DAVResourceAccess.hxx>

Collaboration diagram for http_dav_ucp::DAVResourceAccess:
[legend]

Public Member Functions

 DAVResourceAccess ()=default
 
 DAVResourceAccess (css::uno::Reference< css::uno::XComponentContext > xContext, rtl::Reference< DAVSessionFactory > xSessionFactory, OUString aURL)
 
 DAVResourceAccess (const DAVResourceAccess &rOther)
 
DAVResourceAccessoperator= (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< DAVSessionm_xSession
 
rtl::Reference< DAVSessionFactorym_xSessionFactory
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
std::vector< CurlUrim_aRedirectURIs
 

Detailed Description

Definition at line 45 of file DAVResourceAccess.hxx.

Constructor & Destructor Documentation

◆ DAVResourceAccess() [1/3]

http_dav_ucp::DAVResourceAccess::DAVResourceAccess ( )
default

◆ DAVResourceAccess() [2/3]

http_dav_ucp::DAVResourceAccess::DAVResourceAccess ( css::uno::Reference< css::uno::XComponentContext >  xContext,
rtl::Reference< DAVSessionFactory xSessionFactory,
OUString  aURL 
)

◆ DAVResourceAccess() [3/3]

DAVResourceAccess::DAVResourceAccess ( const DAVResourceAccess rOther)

Definition at line 137 of file DAVResourceAccess.cxx.

References m_aURL, and m_xContext.

Member Function Documentation

◆ abort()

void DAVResourceAccess::abort ( )
Exceptions
DAVException

Definition at line 558 of file DAVResourceAccess.cxx.

References m_aMutex, and m_xSession.

◆ COPY()

void DAVResourceAccess::COPY ( const OUString &  rSourcePath,
const OUString &  rDestinationURI,
bool  bOverwrite,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

◆ DESTROY()

void DAVResourceAccess::DESTROY ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)

◆ detectRedirectCycle()

bool DAVResourceAccess::detectRedirectCycle ( ::std::u16string_view  rRedirectURL)
private
Exceptions
DAVException

Definition at line 1084 of file DAVResourceAccess.cxx.

References g_nRedirectLimit, m_aMutex, and m_aRedirectURIs.

Referenced by handleException().

◆ GET() [1/4]

css::uno::Reference< css::io::XInputStream > http_dav_ucp::DAVResourceAccess::GET ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
Exceptions
DAVException

◆ GET() [2/4]

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 
)
Exceptions
DAVException

◆ GET() [3/4]

void http_dav_ucp::DAVResourceAccess::GET ( css::uno::Reference< css::io::XOutputStream > &  rStream,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
Exceptions
DAVException

◆ GET() [4/4]

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 
)
Exceptions
DAVException

◆ GET0()

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

Exceptions
DAVException

Definition at line 477 of file DAVResourceAccess.cxx.

References getRequestURI(), getUserRequestHeaders(), handleException(), initialize(), m_aURL, and m_xSession.

◆ getRequestURI()

const OUString & DAVResourceAccess::getRequestURI ( ) const
private

Definition at line 1043 of file DAVResourceAccess.cxx.

References m_aPath, m_aURL, and m_xSession.

Referenced by COPY(), DESTROY(), GET0(), HEAD(), LOCK(), MKCOL(), MOVE(), OPTIONS(), PROPPATCH(), PUT(), and UNLOCK().

◆ getSessionFactory()

const rtl::Reference< DAVSessionFactory > & http_dav_ucp::DAVResourceAccess::getSessionFactory ( ) const
inline

Definition at line 75 of file DAVResourceAccess.hxx.

References m_xSessionFactory.

◆ getURL()

const OUString & http_dav_ucp::DAVResourceAccess::getURL ( ) const
inline

Definition at line 73 of file DAVResourceAccess.hxx.

References m_aURL.

◆ getUserRequestHeaders()

void DAVResourceAccess::getUserRequestHeaders ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv,
const OUString &  rURI,
css::ucb::WebDAVHTTPMethod  eMethod,
DAVRequestHeaders rRequestHeaders 
)
static

Definition at line 1057 of file DAVResourceAccess.cxx.

References First, and n.

Referenced by COPY(), DESTROY(), GET0(), HEAD(), LOCK(), MKCOL(), MOVE(), OPTIONS(), PROPPATCH(), PUT(), and UNLOCK().

◆ handleException()

bool DAVResourceAccess::handleException ( DAVException const &  e,
int  errorCount 
)

◆ HEAD()

void DAVResourceAccess::HEAD ( const std::vector< OUString > &  rHeaderNames,
DAVResource rResource,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

◆ initialize()

void DAVResourceAccess::initialize ( )
private

◆ LOCK()

void DAVResourceAccess::LOCK ( css::ucb::Lock &  inLock,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

◆ MKCOL()

void DAVResourceAccess::MKCOL ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)

◆ MOVE()

void DAVResourceAccess::MOVE ( const OUString &  rSourcePath,
const OUString &  rDestinationURI,
bool  bOverwrite,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

◆ operator=()

DAVResourceAccess & DAVResourceAccess::operator= ( const DAVResourceAccess rOther)

◆ OPTIONS()

void DAVResourceAccess::OPTIONS ( DAVOptions rOptions,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

◆ POST() [1/2]

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 
)
Exceptions
DAVException

◆ POST() [2/2]

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 
)
Exceptions
DAVException

◆ PROPFIND() [1/2]

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 
)
Exceptions
DAVException

◆ PROPFIND() [2/2]

void http_dav_ucp::DAVResourceAccess::PROPFIND ( const Depth  nDepth,
std::vector< DAVResourceInfo > &  rResInfo,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
Exceptions
DAVException

◆ PROPPATCH()

void DAVResourceAccess::PROPPATCH ( const std::vector< ProppatchValue > &  rValues,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

◆ PUT()

void DAVResourceAccess::PUT ( const css::uno::Reference< css::io::XInputStream > &  rStream,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

◆ resetUri()

void DAVResourceAccess::resetUri ( )

◆ setFlags()

void DAVResourceAccess::setFlags ( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > &  rFlags)
Exceptions
DAVException

Definition at line 988 of file DAVResourceAccess.cxx.

References m_aFlags, and m_aMutex.

◆ setURL()

void DAVResourceAccess::setURL ( const OUString &  rNewURL)
Exceptions
DAVException

Definition at line 994 of file DAVResourceAccess.cxx.

References m_aMutex, m_aPath, and m_aURL.

Referenced by handleException(), and resetUri().

◆ UNLOCK()

void DAVResourceAccess::UNLOCK ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)

Member Data Documentation

◆ m_aFlags

::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > http_dav_ucp::DAVResourceAccess::m_aFlags
private

Definition at line 50 of file DAVResourceAccess.hxx.

Referenced by initialize(), operator=(), and setFlags().

◆ m_aMutex

osl::Mutex http_dav_ucp::DAVResourceAccess::m_aMutex
private

Definition at line 47 of file DAVResourceAccess.hxx.

Referenced by abort(), detectRedirectCycle(), initialize(), resetUri(), setFlags(), and setURL().

◆ m_aPath

OUString http_dav_ucp::DAVResourceAccess::m_aPath
private

Definition at line 49 of file DAVResourceAccess.hxx.

Referenced by getRequestURI(), initialize(), operator=(), and setURL().

◆ m_aRedirectURIs

std::vector<CurlUri> http_dav_ucp::DAVResourceAccess::m_aRedirectURIs
private

Definition at line 54 of file DAVResourceAccess.hxx.

Referenced by detectRedirectCycle(), initialize(), operator=(), and resetUri().

◆ m_aURL

OUString http_dav_ucp::DAVResourceAccess::m_aURL
private

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > http_dav_ucp::DAVResourceAccess::m_xContext
private

Definition at line 53 of file DAVResourceAccess.hxx.

Referenced by initialize(), operator=(), and PUT().

◆ m_xSession

rtl::Reference< DAVSession > http_dav_ucp::DAVResourceAccess::m_xSession
private

◆ m_xSessionFactory

rtl::Reference< DAVSessionFactory > http_dav_ucp::DAVResourceAccess::m_xSessionFactory
private

Definition at line 52 of file DAVResourceAccess.hxx.

Referenced by getSessionFactory(), initialize(), and operator=().


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