LibreOffice » ucb
View module in: git
Universal Content Broker (has ucps) which do things like convert files to strings in content broker world, or connect LibreOffice with various DMS and fileshare systems like WebDAV, CMIS, or GIO.
The UCPs implement the Universal Content Provider UNO interfaces in
C++, in particular the
The WebDAV content provider is based on
libcurl for much of the
network and protocol stuff, including authentication.
WebDAV as implemented here is defined in an IETF RFC 4918 extensions, and the code supports both unencrypted HTTP/1.1 (IETF RFC 2616) as well as TLS 1.2 or later.
com.sun.star.ucb.ContentProvider service implementation
http URI schemes (and their
encrypted TLS variants). See here for the specification:
Historically, webdav had two ucps, one based on
neon, the second one
serf. Both are superseded by the current
implementation (since LibreOffice 7.3), but in case of behavioural
differences, go hunt for code differences (ucb/source/ucp/webdav-neon
The WebDAV protocol is implemented on top of libcurl basic http GET,
PUT, and POST requests (and is relatively straight-forward - see
ucb/source/ucp/webdav-curl/webdavcontent.cxx for the main
functionality), but incorporates custom handling for a number of
WebDAVResponseParserfor the code)
To a first approximation, there are 3 parts involved in the UCP:
The most important classes are: * ContentProvider: the UNO entry point/factory, creates Content instances * Content: the main UNO service, translates the UCP API to WebDAV methods, one instance per URL * DAVResourceAccess: sits between Content and CurlSession * DAVSessionFactory: creates CurlSession for DAVResourceAccess * CurlSession: low-level interfacing with libcurl * SerfLockStore: singleton used by CurlSession to store DAV lock tokens, runs a thread to refresh locks when they expire * WebDAVResponseParser: parse XML responses to LOCK, PROPFIND requests * DAVAuthListener_Impl: request credentials from UI via UNO