# Universal Content Broker (UCB)
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 `com.sun.star.ucb.ContentProvider` service.
## WebDAV UCP
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.
Our WebDAV `com.sun.star.ucb.ContentProvider` service implementation
registers the `vnd.sun.star.webdav` and `http` URI schemes (and their
encrypted TLS variants). See here for the specification:
https://wiki.openoffice.org/wiki/Documentation/DevGuide/AppendixC/The_WebDAV_Content_Provider
Historically, webdav had two ucps, one based on `neon`, the second one
based on `serf`. Both are superseded by the current `libcurl`
implementation (since LibreOffice 7.3), but in case of behavioural
differences, go hunt for code differences (ucb/source/ucp/webdav-neon
and ucb/source/ucp/webdav).
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
server idiosyncrasies:
* Nextcloud will reply to a PROPFIND request with "100 Continue" and
then after the data is uploaded it will send a "401 Unauthorized" if
the auth header is missing in the headers to which it replied with
"100 Continue".
* Sharepoint 16 responds to PROPFIND, PROPPATCH and LOCK with
"Transfer-Encoding: chunked"
with "HTTP/1.1 200 OK" and an actual error message in the response *body*.
* apparently setting Content-Length works better, so we use that
* Sharepoint returns redirect urls that curl can't parse, so we encode
them (check `WebDAVResponseParser` for the code)
* Sharepoint may reply to HEAD with 200 OK but then 404 NOT FOUND to PROPFIND
* Sharepoint does not appear to support Dead Properties
* avoiding chunked encoding for PUT, since for Nextcloud:
* Transfer-Encoding: chunked creates a 0 byte file with response
"201 Created"
* see upstream bug: https://github.com/nextcloud/server/issues/7995
To a first approximation, there are 3 parts involved in the UCP:
* The upper layer implements the UNO API which is called by LibreOffice, and
translates the calls from generic sequence-of-any stringly typed abstractness
into HTTP or WebDAV protocol calls, and does some high level protocol
handling to figure out what the server supports and so on. This is
independent of the low-level library.
* Then there is the lower layer of the UCP, which translates the generic HTTP
or WebDAV protocol calls to something that the particular third-party library
can understand, hook up its callbacks for data transfer and authentication,
and parse the reply XML documents.
* At the bottom, there is the third-party library that implements the HTTP
protocol.
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
/cp-5.0
distro/collabora/cp-5.1
distro/collabora/cp-5.3
distro/collabora/cp-5.3-desktop
distro/collabora/cp-6.0
distro/collabora/cp-6.0-29
distro/collabora/cp-6.2
distro/collabora/cp-6.4
distro/collabora/dcm-6.2
distro/collabora/dcm-7.5
distro/collabora/dcm-7.6
distro/collabora/libreoffice-4.0.6.2
distro/collabora/libreoffice-7-5+backports
distro/collabora/libreoffice-7-6+backports
distro/collabora/lof-4.3
distro/collabora/lov-4.4
distro/collabora/lov-5.0
distro/collabora/lov-5.1
distro/collabora/lov-5.2
distro/collabora/lov-6.0.4
distro/collabora/lov-6.0.5
distro/collabora/lov-6.1
distro/collabora/lov-6.4
distro/collabora/viewer
distro/collabora/viewer2
distro/escriba/escriba-5.2
distro/escriba/escriba-5.2.1
distro/escriba/escriba-5.4
distro/lhm/libreoffice-4-1-6+backports
distro/lhm/libreoffice-5-2+backports
distro/lhm/libreoffice-6-1+backports
distro/lhm/libreoffice-6-4+backports
distro/lhm/libreoffice-7-0+backports
distro/lhm/libreoffice-7-1+backports
distro/lhm/libreoffice-7-2+backports
distro/lhm/libreoffice-7-3+backports
distro/lhm/libreoffice-7-4+backports
distro/lhm/libreoffice-7-5+backports
distro/lhm/libreoffice-7-6+backports
distro/mimo/mimo-4-1-4-2
distro/mimo/mimo-5-4-7-2
distro/mimo/mimo-6-0
distro/mimo/mimo-6-1
distro/mimo/mimo-6-2
distro/mimo/mimo-6-3
distro/mimo/mimo-6-4
distro/mimo/mimo-7-0
distro/mimo/mimo-7-1
distro/mimo/mimo-7-2
distro/mimo/mimo-7-3
distro/mimo/mimo-7-4
distro/mimo/mimo-7-5
distro/mimo/mimo-7-6
distro/nisz/libreoffice-6-4
distro/nisz/libreoffice-7-0
distro/nisz/libreoffice-7-1
distro/suse/suse-3.6
distro/suse/suse-3.6-appup
distro/suse/suse-3.6.3
distro/suse/suse-4.0
distro/suse/suse-4.0.3
distro/ubuntu/oneiric-3.4
distro/ubuntu/oneiric-3.4-all
distro/vector/vector-24.2
distro/vector/vector-24.2-release
distro/vector/vector-5.4
distro/vector/vector-7.0
distro/vector/vector-7.0-10.0
distro/vector/vector-7.5
distro/vector/vector-7.5.9
distro/vector/vector-7.5.9-release
distro/vector/vtext-6.5
feature/5-1-pick
feature/BorderlineFix
feature/OperationSmiley
feature/RotGrfFlyFrame
feature/RotateFlyFrame
feature/RotateFlyFrame2
feature/RotateFlyFrame3
feature/SOSAW080
feature/SfxShell_refcount
feature/SwFrameBorder
feature/accessibilitycheck
feature/accfixes2
feature/allo_contract34185
feature/allo_contract45533
feature/allo_contract45533b
feature/autostyle
feature/barcode
feature/base-preview
feature/benchmarks
feature/borderline3
feature/bplustree
feature/cairo
feature/calc-coordinates
feature/calc-data-table
feature/calc-parallel
feature/calctiledrendering
feature/calctiledrendering2
feature/calctiledrendering3
feature/calctiledrendering4
feature/calctiledrendering5
feature/calctiledrendering_alt
feature/calctiledrendering_attempt3
feature/calctiledrendering_attempt3_2
feature/calczoom
feature/chained-text-boxes
feature/change-tracking
feature/chart-style-experiment-markus
feature/chartdatatable
feature/cib_contract101
feature/cib_contract116
feature/cib_contract136
feature/cib_contract138
feature/cib_contract138b
feature/cib_contract138c
feature/cib_contract138d
feature/cib_contract138e
feature/cib_contract139
feature/cib_contract152
feature/cib_contract152b
feature/cib_contract3197
feature/cib_contract3753
feature/cib_contract3756
feature/cib_contract3756b
feature/cib_contract4236
feature/cib_contract4236b
feature/cib_contract49
feature/cib_contract49b
feature/cib_contract49c
feature/cib_contract49d
feature/cib_contract561
feature/cib_contract57
feature/cib_contract57b
feature/cib_contract57c
feature/cib_contract57d
feature/cib_contract57d+hotfix
feature/cib_contract57d_p1
feature/cib_contract57e
feature/cib_contract57l
feature/cib_contract6721b
feature/cib_contract6721c
feature/cib_contract7409
feature/cib_contract8161
feature/cib_contract891
feature/cib_contract891b
feature/cib_contract891c
feature/cib_contract935
feature/cib_contract935b
feature/clipboard
feature/cmis
feature/components
feature/controlstate
feature/coretext
feature/coverrest-featuretests
feature/cp-5.0-cairo-svp
feature/cpu_intrinsics_support
feature/custom-widgets
feature/dataprovider
feature/debugevent
feature/dematurize01
feature/dialog-screenshots
feature/docking_windows
feature/docx-commentsex
feature/drawinglayercore
feature/drawinglayercore2
feature/droid_calcimpress3
feature/droid_calimpress4
feature/drop-findcmap
feature/editviewoverlay
feature/eszka
feature/extended-tooltips
feature/external-data-ui
feature/fastparser
feature/firebird-sdbc
feature/firebird-sdbc2
feature/firebird-sdbc3
feature/fixstyles3
feature/fontsubtitutions
feature/foo
feature/gbuild_cli
feature/gccwrapper
feature/glyphy
feature/go2
feature/gpg4libre
feature/gpg4libre-5-4
feature/gpg4libre-6-0
feature/gpg4libre2
feature/graphicobject
feature/gsoc-basic-ide-completion-and-other-bits
feature/gsoc-calc-enhanced-db-range
feature/gsoc-svm-writer
feature/gsoc-uitest-2019
feature/gsoc14-colors
feature/gsoc14-draw-chained-text-boxes
feature/gsoc14-draw-text-background-color
feature/gsoc14-libcmis
feature/gsoc14-libcmis2
feature/gsoc14-personas
feature/gsoc14-personas2
feature/gsoc15-online-update
feature/gsoc15-open-remote-files-dialog
feature/gsoc17-revamp-customize-dialog
feature/gsoc19-chart-style
feature/gsoc2011_wizards
feature/gsoc24-lua
feature/gtk3_kde5
feature/gtk3nativedialogs
feature/gtktiledviewer
feature/ia2
feature/ia2.2
feature/ia2.3
feature/ia2.4
feature/ia2.5
feature/improvexlsximport
feature/instdirlinktargets
feature/item_refactor2
feature/jsdialogs
feature/jssidebar
feature/lfrb-vcl-opengl
feature/libffi
feature/lok-calc-rtl
feature/lok-clipboard
feature/lok_cellcursor
feature/lok_dialog
feature/lok_dialog-backport
feature/lok_dialog2
feature/lok_sofficemain
feature/lok_sofficemain2
feature/mac-opengl-fixes
feature/macOS-weld
feature/mailmerge-toolbar
feature/mar-updater
feature/mariadb
feature/misc-vba-rework
feature/mork
feature/nativealpha
feature/notebookbar
feature/notes-refactoring
feature/ooxml-analyze
feature/opengl-canvas-rework
feature/opengl-transitions-rework
feature/opengl-vcl-text
feature/orcus-continuous-integration
feature/orcus-odf
feature/orcus-odf-rebased
feature/orcus-odf-rebased2
feature/orcus-rebased
feature/owncloud-provider-for-android
feature/pdfium-master
feature/perfwork4
feature/perfwork5
feature/pivotcharts
feature/print_revamp
feature/priorities
feature/profilesafemode
feature/propose-master-cib
feature/pytable
feature/pyweb-wizard
feature/qt5-win+mac
feature/refactor-god-objects
feature/rendercontext
feature/resolve-comments
feature/scaling-geometry-provider
feature/screenshotannotation
feature/sgexperiment
feature/skia
feature/slidehack
feature/slidehack2
feature/slideshow_onlySprites
feature/slideshowprimitives
feature/sparklines
feature/spellig_popup_SID
feature/stub_writer
feature/svg-export
feature/svg-optimisations
feature/svg-optimisations-5-0
feature/sw-delete-undo-rework
feature/sw_redlinehide_4a_for_libreoffice-6-2
feature/sw_redlinehide_4b_for_libreoffice-6-2
feature/table-style
feature/table-style-rebased
feature/table_panel
feature/table_rotated_text
feature/taggedPDF
feature/template_manager_improvements
feature/template_manager_improvements2
feature/themesupport
feature/themesupport2
feature/tiled-editing
feature/tscp3
feature/unitver
feature/unocrsrptr
feature/unostyles
feature/unostyles2
feature/unostyles3
feature/use-ogl-context-in-canvas
feature/vcl-opengl
feature/vcl-opengl-integration
feature/vcl-opengl2
feature/vclptr
feature/vlc
feature/vlc-rb
feature/vs2012
feature/wasm
feature/window-iter
feature/windows-cross-build
feature/windowsupdater
feature/xtiledrenderable
libreoffice-24-2
libreoffice-24-2-0
libreoffice-24-2-1
libreoffice-24-2-2
libreoffice-24-2-3
libreoffice-24-2-4
libreoffice-24-2-5
libreoffice-24-2-6
libreoffice-24-2-7
libreoffice-24-8
libreoffice-24-8-0
libreoffice-24-8-1
libreoffice-24-8-2
libreoffice-24-8-3
libreoffice-24-8-4
libreoffice-25-2
libreoffice-3-5
libreoffice-3-5-0
libreoffice-3-5-1
libreoffice-3-5-2
libreoffice-3-5-3
libreoffice-3-5-4
libreoffice-3-5-5
libreoffice-3-5-6
libreoffice-3-5-7
libreoffice-3-6
libreoffice-3-6-0
libreoffice-3-6-1
libreoffice-3-6-2
libreoffice-3-6-3
libreoffice-3-6-4
libreoffice-3-6-5
libreoffice-3-6-6
libreoffice-3-6-7
libreoffice-4-0
libreoffice-4-0-0
libreoffice-4-0-1
libreoffice-4-0-2
libreoffice-4-0-3
libreoffice-4-0-4
libreoffice-4-0-5
libreoffice-4-0-6
libreoffice-4-1
libreoffice-4-1-0
libreoffice-4-1-1
libreoffice-4-1-2
libreoffice-4-1-3
libreoffice-4-1-4
libreoffice-4-1-5
libreoffice-4-1-6
libreoffice-4-2
libreoffice-4-2-0
libreoffice-4-2-1
libreoffice-4-2-2
libreoffice-4-2-3
libreoffice-4-2-4
libreoffice-4-2-5
libreoffice-4-2-6
libreoffice-4-2-7
libreoffice-4-2-8
libreoffice-4-3
libreoffice-4-3-0
libreoffice-4-3-1
libreoffice-4-3-2
libreoffice-4-3-3
libreoffice-4-3-4
libreoffice-4-3-5
libreoffice-4-3-6
libreoffice-4-3-7
libreoffice-4-4
libreoffice-4-4-0
libreoffice-4-4-1
libreoffice-4-4-2
libreoffice-4-4-3
libreoffice-4-4-4
libreoffice-4-4-5
libreoffice-4-4-6
libreoffice-4-4-7
libreoffice-5-0
libreoffice-5-0-0
libreoffice-5-0-1
libreoffice-5-0-2
libreoffice-5-0-3
libreoffice-5-0-4
libreoffice-5-0-5
libreoffice-5-0-6
libreoffice-5-1
libreoffice-5-1-0
libreoffice-5-1-1
libreoffice-5-1-2
libreoffice-5-1-3
libreoffice-5-1-4
libreoffice-5-1-5
libreoffice-5-1-6
libreoffice-5-2
libreoffice-5-2-0
libreoffice-5-2-1
libreoffice-5-2-2
libreoffice-5-2-3
libreoffice-5-2-4
libreoffice-5-2-5
libreoffice-5-2-6
libreoffice-5-2-7
libreoffice-5-3
libreoffice-5-3-0
libreoffice-5-3-1
libreoffice-5-3-2
libreoffice-5-3-3
libreoffice-5-3-4
libreoffice-5-3-5
libreoffice-5-3-6
libreoffice-5-3-7
libreoffice-5-4
libreoffice-5-4-0
libreoffice-5-4-1
libreoffice-5-4-2
libreoffice-5-4-3
libreoffice-5-4-4
libreoffice-5-4-5
libreoffice-5-4-6
libreoffice-5-4-7
libreoffice-6-0
libreoffice-6-0-0
libreoffice-6-0-1
libreoffice-6-0-2
libreoffice-6-0-3
libreoffice-6-0-4
libreoffice-6-0-5
libreoffice-6-0-6
libreoffice-6-0-7
libreoffice-6-1
libreoffice-6-1-0
libreoffice-6-1-1
libreoffice-6-1-2
libreoffice-6-1-3
libreoffice-6-1-4
libreoffice-6-1-5
libreoffice-6-1-6
libreoffice-6-2
libreoffice-6-2-0
libreoffice-6-2-1
libreoffice-6-2-2
libreoffice-6-2-3
libreoffice-6-2-4
libreoffice-6-2-5
libreoffice-6-2-6
libreoffice-6-2-7
libreoffice-6-2-8
libreoffice-6-3
libreoffice-6-3-0
libreoffice-6-3-1
libreoffice-6-3-2
libreoffice-6-3-3
libreoffice-6-3-4
libreoffice-6-3-5
libreoffice-6-3-6
libreoffice-6-4
libreoffice-6-4-0
libreoffice-6-4-1
libreoffice-6-4-2
libreoffice-6-4-3
libreoffice-6-4-4
libreoffice-6-4-5
libreoffice-6-4-6
libreoffice-6-4-7
libreoffice-7-0
libreoffice-7-0-0
libreoffice-7-0-1
libreoffice-7-0-2
libreoffice-7-0-3
libreoffice-7-0-4
libreoffice-7-0-5
libreoffice-7-0-6
libreoffice-7-1
libreoffice-7-1-0
libreoffice-7-1-1
libreoffice-7-1-2
libreoffice-7-1-3
libreoffice-7-1-4
libreoffice-7-1-5
libreoffice-7-1-6
libreoffice-7-1-7
libreoffice-7-2
libreoffice-7-2-0
libreoffice-7-2-1
libreoffice-7-2-2
libreoffice-7-2-3
libreoffice-7-2-5
libreoffice-7-2-6
libreoffice-7-2-7
libreoffice-7-3
libreoffice-7-3-0
libreoffice-7-3-1
libreoffice-7-3-2
libreoffice-7-3-3
libreoffice-7-3-4
libreoffice-7-3-5
libreoffice-7-3-6
libreoffice-7-3-7
libreoffice-7-4
libreoffice-7-4-0
libreoffice-7-4-1
libreoffice-7-4-2
libreoffice-7-4-3
libreoffice-7-4-4
libreoffice-7-4-6
libreoffice-7-4-7
libreoffice-7-5
libreoffice-7-5-0
libreoffice-7-5-1
libreoffice-7-5-2
libreoffice-7-5-3
libreoffice-7-5-4
libreoffice-7-5-5
libreoffice-7-5-6
libreoffice-7-5-7
libreoffice-7-5-8
libreoffice-7-5-9
libreoffice-7-6
libreoffice-7-6-0
libreoffice-7-6-1
libreoffice-7-6-2
libreoffice-7-6-3
libreoffice-7-6-4
libreoffice-7-6-5
libreoffice-7-6-6
libreoffice-7-6-7
master
ports/macosx10.5/master
private/Ashod/cd-5.3-3.2_import_unloaded
private/Ashod/cd-5.3-3.2_import_unloaded_share_GfxLink
private/Ashod/cd-5.3.3.2
private/Ashod/cp-5.0-preinit
private/Ashod/fast-calc-rendering
private/Ashod/pdfium
private/Ashod/pdfium_on_master
private/Ashod/pdfium_on_master_fixed
private/EL-SHREIF/ui_logger
private/Minion3665/swf-export
private/Rosemary/change-tracking
private/Sweetshark/killswclient
private/Sweetshark/lessdepend
private/Sweetshark/multilistenerfix
private/ajrhunt/c4
private/ajrhunt/cunit
private/ajrhunt/cunitdemo
private/ajrhunt/firebird-improvement
private/bansan/chardraw
private/bubli/textboxchaining
private/hcvcastro/preinit
private/hcvcastro/undo-row-comment
private/jmux/armin-strip-before-squash
private/jmux/broken-static-win
private/jmux/current-reorga
private/jmux/meson
private/jmux/meson-gsoc-2021
private/jmux/oss-fuzz
private/jmux/oss-fuzz-wip
private/jmux/scheduler-fixes
private/jmux/shape.odt
private/jmux/wasm-for-master
private/jmux/wasm-tmp
private/jmux/wasm_for_master_catchall
private/jmux/win-arm64
private/jmux/win-test-nohang
private/juergen/Tests
private/juergen/check-cjk
private/kendy/condformat-api
private/kendy/condformat-fdo82014
private/kendy/mailmerge-04
private/kendy/mailmerge-05
private/kendy/swinterpreter
private/kendy/testcl
private/khaledhosny/color-fonts
private/khaledhosny/vcl-cleanup-font
private/kohei/chart-bugs
private/kohei/find-replace-all-perf
private/kohei/headless-perf
private/kohei/if-or-not-if-jump
private/kohei/sort-ref-update
private/lfrb/opengl-vcl
private/lgodard/calc_notes_import_export
private/lgodard/tdf#117202
private/llunak/mailmerge
private/llunak/mailmerge_01
private/llunak/mailmerge_02
private/llunak/mailmerge_03
private/llunak/munich_12587
private/llunak/skia
private/lmamane/basetest
private/lmamane/for-julien2412
private/lmamane/for-julien2412-master
private/lmamane/tdf110997
private/lmamane/timedate-controls-nanosecond
private/lmamane/validation
private/mcecchetti/23H1/a11y/paragraph
private/mcecchetti/accessibility/paragraph
private/mcecchetti/amd/pdf-export-jpeg
private/mcecchetti/bitmapcrc64
private/mcecchetti/bitmapcrc64-5-0
private/mcecchetti/calc-perf-unit-test
private/mcecchetti/calc-unit-test
private/mcecchetti/gl-program-binary
private/mert/wip_deepl
private/mikekaganski/multicolumn
private/mmeeks/aafixes44
private/mmeeks/backports
private/mmeeks/binarydatacache
private/mmeeks/bitmapcrc64
private/mmeeks/copy-paste
private/mmeeks/copypaste
private/mmeeks/cp-6.2-bits
private/mmeeks/cp64merge
private/mmeeks/currency-dropdown
private/mmeeks/foo
private/mmeeks/formula-iterator
private/mmeeks/gldebug
private/mmeeks/hidpi-bits
private/mmeeks/icontest
private/mmeeks/opengl-backbuffer
private/mmeeks/opengl-backbuffer2
private/mmeeks/sandbox
private/mmeeks/swapdatacontainer
private/mmeeks/vcl-opengl3
private/moggi/fix-opengl-context-problems
private/moggi/improved-dxf-xls-export
private/moggi/opengl-4-4-build-test
private/moggi/opengl-preparation
private/moggi/opengl-vcl-win
private/moggi/orcus-improvements
private/moggi/track-win-dc
private/moggi/ui-test
private/moggi/vcl-opengl3
private/mst/sw_fieldmarkhide
private/mst/sw_redlinehide
private/mst/sw_redlinehide_2
private/mst/sw_redlinehide_3
private/mst/sw_redlinehide_4a
private/mst/sw_redlinehide_4b
private/pranavk/modernize_gtktiledviewer
private/quwex/gsoc-box2d-experimental
private/quwex/notespane-search
private/quwex/notespaneflat
private/quwex/notespanesquashed
private/quwex/tdf59323
private/s.mehrbrodt/colorpicker-backport
private/sweetshark/swdepend
private/tbsdy/clipping
private/tbsdy/drawserverfontlayout
private/tbsdy/emf
private/tbsdy/osl_getAllEnvironment
private/tbsdy/outdev
private/tbsdy/printinfomgr
private/tbsdy/workbench
private/thb/libo-6-1+backports
private/thb/libreoffice-5-2+backports
private/thb/sw_redlinehide-6-1
private/thb/tdf149754
private/thb/wasm-upstreaming
private/timar/cp-6.2-centos7
private/timar/fontconfigcrash
private/timar/pythonupgrademsp
private/tml/Use-the-iOS-French-and-Italian-dictionaries-for-othe
private/tml/android-use-bionic-linker-copy
private/tml/android-use-faulty.lib
private/tml/cp-6-4-28-1
private/tml/fixwintext
private/tml/iculess
private/tml/lov-6.1.5.2
private/tml/lov-6.2.1
private/tml/lov-7.0.3.3
private/tml/lov-7.0.4
private/tml/lov-7.1.2
private/tml/opencl-default-1
private/tvajngerl/staging
ref/for/distro/collabora/cp-6.2
LibreOffice 核心代码仓库 文档基金会