20#include <osl/diagnose.h>
21#include <osl/thread.h>
22#include <rtl/strbuf.hxx>
25#include <com/sun/star/lang/XInitialization.hpp>
26#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
55 return "com.sun.star.comp.ucb.UcbContentProviderProxyFactory";
63 return {
"com.sun.star.ucb.ContentProviderProxyFactory" };
69extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
71 css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any>
const&)
83 const OUString& Service )
114 OWeakObject::acquire();
120 OWeakObject::release();
128 static_cast< XTypeProvider *
>(
this ),
129 static_cast< XServiceInfo *
>(
this ),
130 static_cast< XContentProvider *
>(
this ),
131 static_cast< XParameterizedContentProvider *
>(
this ),
132 static_cast< XContentProviderSupplier *
>(
this ) );
134 if ( !aRet.hasValue() )
135 aRet = OWeakObject::queryInterface( rType );
137 if ( !aRet.hasValue() )
141 if ( xProvider.is() )
142 aRet = xProvider->queryInterface( rType );
159 if ( xProvider.is() )
161 return xProvider->getTypes();
180 return "com.sun.star.comp.ucb.UcbContentProviderProxy";
190 return {
"com.sun.star.ucb.ContentProviderProxy" };
204 if ( xProvider.is() )
219 if ( xProvider.is() )
220 return xProvider->compareContentIds( Id1, Id2 );
235 const OUString& Arguments,
240 std::scoped_lock aGuard(
m_aMutex );
258 const OUString& Arguments )
260 std::scoped_lock aGuard(
m_aMutex );
270 if ( xParamProvider.is() )
274 xParamProvider->deregisterInstance(
Template, Arguments );
276 catch ( IllegalIdentifierException
const & )
278 OSL_FAIL(
"UcbContentProviderProxy::deregisterInstance - "
279 "Caught IllegalIdentifierException!" );
295 std::scoped_lock aGuard(
m_aMutex );
323 if ( xParamProvider.is() )
332 catch ( IllegalIdentifierException
const & )
334 OSL_FAIL(
"UcbContentProviderProxy::getContentProvider - "
335 "Caught IllegalIdentifierException!" );
339 "UcbContentProviderProxy::getContentProvider - "
348 OStringBuffer(
"UcbContentProviderProxy::getContentProvider - No provider for '" +
Reference< XComponentContext > m_xContext
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL createContentProvider(const OUString &Service) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual ~UcbContentProviderProxyFactory() override
virtual OUString SAL_CALL getImplementationName() override
UcbContentProviderProxyFactory(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual ~UcbContentProviderProxy() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
UcbContentProviderProxy(const css::uno::Reference< css::uno::XComponentContext > &rxContext, OUString Service)
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier) override
virtual sal_Int32 SAL_CALL compareContentIds(const css::uno::Reference< css::ucb::XContentIdentifier > &Id1, const css::uno::Reference< css::ucb::XContentIdentifier > &Id2) override
css::uno::Reference< css::ucb::XContentProvider > m_xProvider
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL registerInstance(const OUString &Template, const OUString &Arguments, sal_Bool ReplaceExisting) override
css::uno::Reference< css::ucb::XContentProvider > m_xTargetProvider
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL deregisterInstance(const OUString &Template, const OUString &Arguments) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL getContentProvider() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
#define TOOLS_INFO_EXCEPTION(area, stream)
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)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ucb_UcbContentProviderProxyFactory_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
XTYPEPROVIDER_COMMON_IMPL(UcbContentProviderProxy)