27#include <osl/mutex.hxx>
28#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
40 const uno::Reference< uno::XComponentContext >& rContext )
41: ::
ucbhelper::ContentProviderImplHelper( rContext ),
48ContentProvider::~ContentProvider()
55 OWeakObject::acquire();
60 OWeakObject::release();
66 static_cast< lang::XTypeProvider*
>(
this),
67 static_cast< lang::XServiceInfo*
>(
this),
68 static_cast< ucb::XContentProvider*
>(
this)
70 return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
79 ucb::XContentProvider );
87 return "com.sun.star.comp.WebDAVContentProvider";
90css::uno::Sequence< OUString >
106uno::Reference< ucb::XContent > SAL_CALL
108 const uno::Reference<
109 ucb::XContentIdentifier >& Identifier )
114 if (
aURL.isSchemeEqualTo(INetProtocol::NotValid))
115 throw ucb::IllegalIdentifierException();
117 if (!
aURL.isAnyKnownWebDAVScheme())
118 throw ucb::IllegalIdentifierException();
120 uno::Reference< ucb::XContentIdentifier > xCanonicId;
122 if (
aURL.isSchemeEqualTo(INetProtocol::VndSunStarWebdav) ||
126 aURL.changeScheme(INetProtocol::Http);
127 xCanonicId = new ::ucbhelper::ContentIdentifier(
aURL.getExternalURL() );
133 aURL.changeScheme(INetProtocol::Https);
134 xCanonicId = new ::ucbhelper::ContentIdentifier(
aURL.getExternalURL() );
152 xContent = new ::http_dav_ucp::Content(
156 catch ( ucb::ContentCreationException
const & )
158 throw ucb::IllegalIdentifierException();
161 if ( !xContent->getIdentifier().is() )
162 throw ucb::IllegalIdentifierException();
167extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
169 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier) override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL acquire() noexcept override
rtl::Reference< DAVSessionFactory > m_xDAVSessionFactory
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
rtl::Reference< ContentImplHelper > queryExistingContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
void registerNewContent(const css::uno::Reference< css::ucb::XContent > &xContent)
css::uno::Reference< css::uno::XComponentContext > m_xContext
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral WEBDAV_CONTENT_PROVIDER_SERVICE_NAME
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ucb_webdav_ContentProvider_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
XTYPEPROVIDER_IMPL_3(ContentProvider, lang::XTypeProvider, lang::XServiceInfo, ucb::XContentProvider)
#define WEBDAV_URL_SCHEME
#define WEBDAVS_URL_SCHEME
#define VNDSUNSTARWEBDAVS_URL_SCHEME