LibreOffice Module ucb (master)  1
Classes | Typedefs | Enumerations | Functions | Variables
http_dav_ucp Namespace Reference

Classes

class  CachableContentProperties
 
class  Content
 
class  ContentProperties
 
class  ContentProvider
 
struct  CurlProcessor
 this is just a bunch of static member functions called from CurlSession More...
 
class  CurlSession
 implementation of libcurl HTTP/DAV back-end More...
 
class  CurlUri
 
class  DataSupplier
 
class  DateTimeHelper
 
class  DAVAuthListener
 
class  DAVAuthListener_Impl
 
class  DAVException
 
class  DAVOptions
 
class  DAVOptionsCache
 
struct  DAVProperties
 
struct  DAVPropertyValue
 
struct  DAVRequestEnvironment
 
struct  DAVResource
 
class  DAVResourceAccess
 
struct  DAVResourceInfo
 
class  DAVSession
 
class  DAVSessionFactory
 
struct  deleter_from_fn
 
class  DynamicResultSet
 
struct  equalPropertyName
 
struct  hashPropertyName
 
struct  LockInfo
 
class  PropertyNames
 
class  PropertyNamesCache
 
class  PropertyValue
 
struct  ProppatchValue
 
class  SerfLockStore
 
struct  SerfPropName
 
class  TickerThread
 
class  UCBDeadPropertyValue
 

Typedefs

typedef std::unordered_map< OUString, PropertyValuePropertyValueMap
 
template<typename T >
using CurlUniquePtr = ::std::unique_ptr< T, deleter_from_fn< T, curl_free >>
 
typedef std::pair< OUString, OUString > DAVRequestHeader
 
typedef std::vector< DAVRequestHeaderDAVRequestHeaders
 
typedef std::map< OUString, DAVOptions, std::less< OUString > > DAVOptionsMap
 
typedef std::unordered_set< css::beans::Property, hashPropertyName, equalPropertyNamePropertyMap
 
typedef std::map< OUString, PropertyNames, std::less< OUString > > PropNameCache
 
typedef std::map< OUString, LockInfoLockInfoMap
 

Enumerations

enum  Depth {
  DAVZERO = 0,
  DAVONE = 1,
  DAVINFINITY = -1
}
 
enum  ProppatchOperation {
  PROPSET = 0,
  PROPREMOVE = 1
}
 

Functions

static int debug_callback (CURL *handle, curl_infotype type, char *data, size_t size, void *)
 
static size_t write_callback (char *const ptr, size_t const size, size_t const nmemb, void *const userdata)
 
static size_t read_callback (char *const buffer, size_t const size, size_t const nitems, void *const userdata)
 
static size_t header_callback (char *const buffer, size_t const size, size_t const nitems, void *const userdata)
 
static auto ProcessHeaders (::std::vector< OString > const &rHeaders) ->::std::map< OUString, OUString >
 
static auto ExtractRequestedHeaders (ResponseHeaders const &rHeaders,::std::pair<::std::vector< OUString > const &, DAVResource & > const *const pRequestedHeaders) -> void
 
static auto ExtractRealm (ResponseHeaders const &rHeaders, char const *const pAuthHeaderName) ->::std::optional< OUString >
 
static auto TryRemoveExpiredLockToken (CurlSession &rSession, CurlUri const &rURI, DAVRequestEnvironment const *const pEnv) -> bool
 
static::std::optional< OUString > GetURLComponent (CURLU &rURI, CURLUPart const what, CURLUcode const expected, unsigned int const flags=0)
 
OUString EncodeSegment (OUString const &rSegment)
 
OUString DecodeURI (OUString const &rURI)
 
OUString ConnectionEndPointString (std::u16string_view rHostName, sal_uInt16 const nPort)
 
std::vector< ucb::Lock > parseWebDAVLockResponse (const uno::Reference< io::XInputStream > &xInputStream)
 
std::vector< DAVResourceparseWebDAVPropFindResponse (const uno::Reference< io::XInputStream > &xInputStream)
 
std::vector< DAVResourceInfoparseWebDAVPropNameResponse (const uno::Reference< io::XInputStream > &xInputStream)
 
std::vector< css::ucb::Lock > parseWebDAVLockResponse (const css::uno::Reference< css::io::XInputStream > &xInputStream)
 
std::vector< DAVResourceparseWebDAVPropFindResponse (const css::uno::Reference< css::io::XInputStream > &xInputStream)
 
std::vector< DAVResourceInfoparseWebDAVPropNameResponse (const css::uno::Reference< css::io::XInputStream > &xInputStream)
 

Variables

const auto DEFAULT_HTTP_PORT = 80
 
const auto DEFAULT_HTTPS_PORT = 443
 
const sal_uInt16 SC_NONE = 0
 
const sal_uInt16 SC_CONTINUE = 100
 
const sal_uInt16 SC_SWITCHING_PROTOCOLS = 101
 
const sal_uInt16 SC_PROCESSING = 102
 
const sal_uInt16 SC_OK = 200
 
const sal_uInt16 SC_CREATED = 201
 
const sal_uInt16 SC_ACCEPTED = 202
 
const sal_uInt16 SC_NON_AUTHORITATIVE_INFORMATION = 203
 
const sal_uInt16 SC_NO_CONTENT = 204
 
const sal_uInt16 SC_RESET_CONTENT = 205
 
const sal_uInt16 SC_PARTIAL_CONTENT = 206
 
const sal_uInt16 SC_MULTISTATUS = 207
 
const sal_uInt16 SC_MULTIPLE_CHOICES = 300
 
const sal_uInt16 SC_MOVED_PERMANENTLY = 301
 
const sal_uInt16 SC_MOVED_TEMPORARILY = 302
 
const sal_uInt16 SC_SEE_OTHER = 303
 
const sal_uInt16 SC_NOT_MODIFIED = 304
 
const sal_uInt16 SC_USE_PROXY = 305
 
const sal_uInt16 SC_TEMPORARY_REDIRECT = 307
 
const sal_uInt16 SC_BAD_REQUEST = 400
 
const sal_uInt16 SC_UNAUTHORIZED = 401
 
const sal_uInt16 SC_PAYMENT_REQUIRED = 402
 
const sal_uInt16 SC_FORBIDDEN = 403
 
const sal_uInt16 SC_NOT_FOUND = 404
 
const sal_uInt16 SC_METHOD_NOT_ALLOWED = 405
 
const sal_uInt16 SC_NOT_ACCEPTABLE = 406
 
const sal_uInt16 SC_PROXY_AUTHENTICATION_REQUIRED = 407
 
const sal_uInt16 SC_REQUEST_TIMEOUT = 408
 
const sal_uInt16 SC_CONFLICT = 409
 
const sal_uInt16 SC_GONE = 410
 
const sal_uInt16 SC_LENGTH_REQUIRED = 411
 
const sal_uInt16 SC_PRECONDITION_FAILED = 412
 
const sal_uInt16 SC_REQUEST_ENTITY_TOO_LARGE = 413
 
const sal_uInt16 SC_REQUEST_URI_TOO_LONG = 414
 
const sal_uInt16 SC_UNSUPPORTED_MEDIA_TYPE = 415
 
const sal_uInt16 SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416
 
const sal_uInt16 SC_EXPECTATION_FAILED = 417
 
const sal_uInt16 SC_UNPROCESSABLE_ENTITY = 422
 
const sal_uInt16 SC_LOCKED = 423
 
const sal_uInt16 SC_FAILED_DEPENDENCY = 424
 
const sal_uInt16 SC_INTERNAL_SERVER_ERROR = 500
 
const sal_uInt16 SC_NOT_IMPLEMENTED = 501
 
const sal_uInt16 SC_BAD_GATEWAY = 502
 
const sal_uInt16 SC_SERVICE_UNAVAILABLE = 503
 
const sal_uInt16 SC_GATEWAY_TIMEOUT = 504
 
const sal_uInt16 SC_HTTP_VERSION_NOT_SUPPORTED = 505
 
const sal_uInt16 SC_INSUFFICIENT_STORAGE = 507
 
const sal_uInt16 USC_CONNECTION_TIMED_OUT = 908
 
const sal_uInt16 USC_LOOKUP_FAILED = 909
 
const sal_uInt16 USC_AUTH_FAILED = 910
 
const sal_uInt16 USC_AUTHPROXY_FAILED = 911
 
constexpr OUStringLiteral WEBDAV_CONTENT_SERVICE_NAME = u"com.sun.star.ucb.WebDAVContent"
 
constexpr OUStringLiteral WEBDAV_CONTENT_PROVIDER_SERVICE_NAME = u"com.sun.star.ucb.WebDAVContentProvider"
 
constexpr OUStringLiteral HTTP_CONTENT_TYPE = u"application/" HTTP_URL_SCHEME "-content"
 
constexpr OUStringLiteral WEBDAV_COLLECTION_TYPE = u"application/" VNDSUNSTARWEBDAV_URL_SCHEME "-collection"
 

Typedef Documentation

template<typename T >
using http_dav_ucp::CurlUniquePtr = typedef ::std::unique_ptr<T, deleter_from_fn<T, curl_free>>

Definition at line 36 of file CurlUri.hxx.

typedef std::map< OUString, DAVOptions, std::less< OUString > > http_dav_ucp::DAVOptionsMap

Definition at line 157 of file DAVTypes.hxx.

typedef std::pair< OUString, OUString > http_dav_ucp::DAVRequestHeader

Definition at line 29 of file DAVRequestEnvironment.hxx.

Definition at line 30 of file DAVRequestEnvironment.hxx.

Definition at line 57 of file SerfLockStore.hxx.

typedef std::unordered_set< css::beans::Property, hashPropertyName, equalPropertyName> http_dav_ucp::PropertyMap

Definition at line 51 of file PropertyMap.hxx.

typedef std::unordered_map< OUString, PropertyValue > http_dav_ucp::PropertyValueMap

Definition at line 61 of file ContentProperties.hxx.

typedef std::map< OUString, PropertyNames, std::less< OUString > > http_dav_ucp::PropNameCache

Definition at line 60 of file PropfindCache.hxx.

Enumeration Type Documentation

Enumerator
DAVZERO 
DAVONE 
DAVINFINITY 

Definition at line 183 of file DAVTypes.hxx.

Enumerator
PROPSET 
PROPREMOVE 

Definition at line 185 of file DAVTypes.hxx.

Function Documentation

OUString http_dav_ucp::ConnectionEndPointString ( std::u16string_view  rHostName,
sal_uInt16 const  nPort 
)
static int http_dav_ucp::debug_callback ( CURL *  handle,
curl_infotype  type,
char *  data,
size_t  size,
void  
)
static

Definition at line 279 of file CurlSession.cxx.

References end, SAL_INFO, SAL_N_ELEMENTS, SAL_WARN, and start.

Referenced by http_dav_ucp::CurlSession::CurlSession().

OUString http_dav_ucp::DecodeURI ( OUString const &  rURI)
OUString http_dav_ucp::EncodeSegment ( OUString const &  rSegment)

Definition at line 291 of file CurlUri.cxx.

static auto http_dav_ucp::ExtractRealm ( ResponseHeaders const &  rHeaders,
char const *const  pAuthHeaderName 
) -> ::std::optional<OUString>
static

Definition at line 534 of file CurlSession.cxx.

References i, ProcessHeaders(), SAL_INFO, and SAL_WARN.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequest().

static auto http_dav_ucp::ExtractRequestedHeaders ( ResponseHeaders const &  rHeaders,
::std::pair<::std::vector< OUString > const &, DAVResource & > const *const  pRequestedHeaders 
) -> void
static
static ::std::optional<OUString> http_dav_ucp::GetURLComponent ( CURLU &  rURI,
CURLUPart const  what,
CURLUcode const  expected,
unsigned int const  flags = 0 
)
static size_t http_dav_ucp::header_callback ( char *const  buffer,
size_t const  size,
size_t const  nitems,
void *const  userdata 
)
static

Definition at line 385 of file CurlSession.cxx.

References i, SAL_WARN, SC_NONE, and void().

Referenced by http_dav_ucp::CurlSession::CurlSession().

std::vector<css::ucb::Lock> http_dav_ucp::parseWebDAVLockResponse ( const css::uno::Reference< css::io::XInputStream > &  xInputStream)
std::vector< ucb::Lock > http_dav_ucp::parseWebDAVLockResponse ( const uno::Reference< io::XInputStream > &  xInputStream)
std::vector<DAVResource> http_dav_ucp::parseWebDAVPropFindResponse ( const css::uno::Reference< css::io::XInputStream > &  xInputStream)
std::vector< DAVResource > http_dav_ucp::parseWebDAVPropFindResponse ( const uno::Reference< io::XInputStream > &  xInputStream)

Definition at line 986 of file webdavresponseparser.cxx.

Referenced by http_dav_ucp::CurlProcessor::PropFind().

std::vector<DAVResourceInfo> http_dav_ucp::parseWebDAVPropNameResponse ( const css::uno::Reference< css::io::XInputStream > &  xInputStream)
std::vector< DAVResourceInfo > http_dav_ucp::parseWebDAVPropNameResponse ( const uno::Reference< io::XInputStream > &  xInputStream)

Definition at line 993 of file webdavresponseparser.cxx.

Referenced by http_dav_ucp::CurlProcessor::PropFind().

static auto http_dav_ucp::ProcessHeaders ( ::std::vector< OString > const &  rHeaders) -> ::std::map<OUString, OUString>
static

Definition at line 451 of file CurlSession.cxx.

References line, name, SAL_WARN, and value.

Referenced by ExtractRealm(), and ExtractRequestedHeaders().

static size_t http_dav_ucp::read_callback ( char *const  buffer,
size_t const  size,
size_t const  nitems,
void *const  userdata 
)
static

Definition at line 363 of file CurlSession.cxx.

References o3tl::make_unsigned(), and SAL_WARN.

Referenced by http_dav_ucp::CurlSession::CurlSession().

static auto http_dav_ucp::TryRemoveExpiredLockToken ( CurlSession rSession,
CurlUri const &  rURI,
DAVRequestEnvironment const *const  pEnv 
) -> bool
static
static size_t http_dav_ucp::write_callback ( char *const  ptr,
size_t const  size,
size_t const  nmemb,
void *const  userdata 
)
static

Definition at line 329 of file CurlSession.cxx.

References data, SAL_WARN, and void().

Referenced by http_dav_ucp::CurlSession::CurlSession().

Variable Documentation

const auto http_dav_ucp::DEFAULT_HTTP_PORT = 80

Definition at line 30 of file CurlUri.cxx.

Referenced by ConnectionEndPointString().

const auto http_dav_ucp::DEFAULT_HTTPS_PORT = 443

Definition at line 31 of file CurlUri.cxx.

Referenced by ConnectionEndPointString().

constexpr OUStringLiteral http_dav_ucp::HTTP_CONTENT_TYPE = u"application/" HTTP_URL_SCHEME "-content"
inline

Definition at line 56 of file webdavprovider.hxx.

const sal_uInt16 http_dav_ucp::SC_ACCEPTED = 202

Definition at line 43 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_BAD_GATEWAY = 502

Definition at line 87 of file DAVException.hxx.

Referenced by http_dav_ucp::DAVResourceAccess::handleException().

const sal_uInt16 http_dav_ucp::SC_BAD_REQUEST = 400
const sal_uInt16 http_dav_ucp::SC_CONFLICT = 409

Definition at line 70 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_CONTINUE = 100

Definition at line 35 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_CREATED = 201

Definition at line 42 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_EXPECTATION_FAILED = 417

Definition at line 78 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_FAILED_DEPENDENCY = 424

Definition at line 82 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_FORBIDDEN = 403

Definition at line 64 of file DAVException.hxx.

Referenced by http_dav_ucp::Content::getResourceOptions().

const sal_uInt16 http_dav_ucp::SC_GATEWAY_TIMEOUT = 504

Definition at line 89 of file DAVException.hxx.

Referenced by http_dav_ucp::DAVResourceAccess::handleException().

const sal_uInt16 http_dav_ucp::SC_GONE = 410
const sal_uInt16 http_dav_ucp::SC_HTTP_VERSION_NOT_SUPPORTED = 505

Definition at line 90 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_INSUFFICIENT_STORAGE = 507

Definition at line 92 of file DAVException.hxx.

Referenced by http_dav_ucp::DAVResourceAccess::handleException().

const sal_uInt16 http_dav_ucp::SC_INTERNAL_SERVER_ERROR = 500

Definition at line 85 of file DAVException.hxx.

Referenced by http_dav_ucp::Content::getResourceOptions().

const sal_uInt16 http_dav_ucp::SC_LENGTH_REQUIRED = 411

Definition at line 72 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_LOCKED = 423

Definition at line 81 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequest().

const sal_uInt16 http_dav_ucp::SC_METHOD_NOT_ALLOWED = 405
const sal_uInt16 http_dav_ucp::SC_MOVED_PERMANENTLY = 301

Definition at line 53 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequestImpl().

const sal_uInt16 http_dav_ucp::SC_MOVED_TEMPORARILY = 302

Definition at line 54 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequestImpl().

const sal_uInt16 http_dav_ucp::SC_MULTIPLE_CHOICES = 300

Definition at line 52 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_MULTISTATUS = 207

Definition at line 49 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_NO_CONTENT = 204

Definition at line 45 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_NON_AUTHORITATIVE_INFORMATION = 203

Definition at line 44 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_NONE = 0
const sal_uInt16 http_dav_ucp::SC_NOT_ACCEPTABLE = 406

Definition at line 67 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_NOT_FOUND = 404
const sal_uInt16 http_dav_ucp::SC_NOT_IMPLEMENTED = 501
const sal_uInt16 http_dav_ucp::SC_NOT_MODIFIED = 304

Definition at line 56 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_OK = 200

Definition at line 41 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_PARTIAL_CONTENT = 206

Definition at line 47 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_PAYMENT_REQUIRED = 402

Definition at line 63 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_PRECONDITION_FAILED = 412

Definition at line 73 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequest().

const sal_uInt16 http_dav_ucp::SC_PROCESSING = 102

Definition at line 38 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_PROXY_AUTHENTICATION_REQUIRED = 407

Definition at line 68 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequest().

const sal_uInt16 http_dav_ucp::SC_REQUEST_ENTITY_TOO_LARGE = 413

Definition at line 74 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_REQUEST_TIMEOUT = 408

Definition at line 69 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequestImpl().

const sal_uInt16 http_dav_ucp::SC_REQUEST_URI_TOO_LONG = 414

Definition at line 75 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416

Definition at line 77 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_RESET_CONTENT = 205

Definition at line 46 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_SEE_OTHER = 303

Definition at line 55 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequestImpl().

const sal_uInt16 http_dav_ucp::SC_SERVICE_UNAVAILABLE = 503

Definition at line 88 of file DAVException.hxx.

Referenced by http_dav_ucp::DAVResourceAccess::handleException().

const sal_uInt16 http_dav_ucp::SC_SWITCHING_PROTOCOLS = 101

Definition at line 36 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_TEMPORARY_REDIRECT = 307

Definition at line 58 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequestImpl().

const sal_uInt16 http_dav_ucp::SC_UNAUTHORIZED = 401

Definition at line 62 of file DAVException.hxx.

Referenced by http_dav_ucp::CurlProcessor::ProcessRequest().

const sal_uInt16 http_dav_ucp::SC_UNPROCESSABLE_ENTITY = 422

Definition at line 80 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_UNSUPPORTED_MEDIA_TYPE = 415

Definition at line 76 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::SC_USE_PROXY = 305

Definition at line 57 of file DAVException.hxx.

const sal_uInt16 http_dav_ucp::USC_AUTH_FAILED = 910

Definition at line 99 of file DAVException.hxx.

Referenced by http_dav_ucp::Content::getResourceOptions().

const sal_uInt16 http_dav_ucp::USC_AUTHPROXY_FAILED = 911

Definition at line 100 of file DAVException.hxx.

Referenced by http_dav_ucp::Content::getResourceOptions().

const sal_uInt16 http_dav_ucp::USC_CONNECTION_TIMED_OUT = 908

Definition at line 96 of file DAVException.hxx.

Referenced by http_dav_ucp::Content::getResourceOptions().

const sal_uInt16 http_dav_ucp::USC_LOOKUP_FAILED = 909

Definition at line 98 of file DAVException.hxx.

Referenced by http_dav_ucp::Content::getResourceOptions().

constexpr OUStringLiteral http_dav_ucp::WEBDAV_COLLECTION_TYPE = u"application/" VNDSUNSTARWEBDAV_URL_SCHEME "-collection"
inline
constexpr OUStringLiteral http_dav_ucp::WEBDAV_CONTENT_PROVIDER_SERVICE_NAME = u"com.sun.star.ucb.WebDAVContentProvider"
inline
constexpr OUStringLiteral http_dav_ucp::WEBDAV_CONTENT_SERVICE_NAME = u"com.sun.star.ucb.WebDAVContent"
inline

Definition at line 57 of file webdavcontent.hxx.

Referenced by http_dav_ucp::Content::getSupportedServiceNames().