28#include <com/sun/star/lang/XEventListener.hpp>
29#include <com/sun/star/lang/XServiceInfo.hpp>
30#include <com/sun/star/deployment/XPackageRegistry.hpp>
31#include <com/sun/star/uno/XComponentContext.hpp>
32#include <unordered_map>
39class PackageRegistryBackend;
43typedef ::cppu::WeakComponentImplHelper<
53 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
54 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv );
68 virtual void SAL_CALL
disposing()
override;
74 virtual css::beans::Optional< css::beans::Ambiguous<sal_Bool> >
76 ::osl::ResettableMutexGuard & guard,
78 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
81 ::osl::ResettableMutexGuard & guard,
85 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
93 css::uno::Reference<css::deployment::XPackageTypeInfo>
const & xPackageType,
100 public ::cppu::WeakImplHelper<css::deployment::XPackageTypeInfo>
109 OUString shortDescr )
123 virtual void SAL_CALL
dispose()
override;
125 css::uno::Reference<css::lang::XEventListener>
const & xListener )
override;
127 css::uno::Reference<css::lang::XEventListener>
const & xListener )
override;
131 css::uno::Reference<css::util::XModifyListener>
const & xListener )
override;
133 css::uno::Reference<css::util::XModifyListener>
const & xListener )
override;
136 virtual css::uno::Reference<css::task::XAbortChannel> SAL_CALL
138 virtual css::beans::Optional< css::beans::Ambiguous<sal_Bool> >
140 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
141 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
144 const css::uno::Reference< css::task::XAbortChannel >& xAbortChannel,
145 const css::uno::Reference< css::ucb::XCommandEnvironment >& xCmdEnv,
146 sal_Bool noLicenseChecking)
override;
149 const css::uno::Reference< css::ucb::XCommandEnvironment >& xCmdEnv )
override;
153 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
154 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
157 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
158 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
160 virtual css::uno::Sequence< css::uno::Reference<css::deployment::XPackage> >
162 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
163 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
164 virtual OUString SAL_CALL
getName()
override;
165 virtual css::beans::Optional< OUString > SAL_CALL
getIdentifier()
override;
166 virtual OUString SAL_CALL
getVersion()
override;
167 virtual OUString SAL_CALL
getURL()
override;
171 virtual css::uno::Sequence< OUString > SAL_CALL
174 virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL
176 virtual css::uno::Reference<css::deployment::XPackageTypeInfo> SAL_CALL
179 OUString
const & destFolderURL,
180 OUString
const & newTitle,
181 sal_Int32 nameClashAction,
182 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
189typedef ::cppu::WeakComponentImplHelper<
190 css::lang::XEventListener,
191 css::deployment::XPackageRegistry,
205 typedef std::unordered_map<
206 OUString, css::uno::Reference<css::deployment::XPackage> >
t_string2ref;
224 OUString
const & url, OUString
const & mediaType,
225 bool bRemoved, OUString
const & identifier,
226 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
230 virtual void SAL_CALL
disposing()
override;
234 css::uno::Sequence<css::uno::Any>
const & args,
235 css::uno::Reference<css::uno::XComponentContext>
const &
xContext );
242 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv);
249 std::vector< OUString>
const & usedFolders);
254 OUString
const & folderUrl);
260 css::uno::Reference<css::uno::XComponentContext>
const &
269 virtual void SAL_CALL
disposing( css::lang::EventObject
const & evt )
override;
272 virtual css::uno::Reference<css::deployment::XPackage> SAL_CALL
bindPackage(
273 OUString
const & url, OUString
const & mediaType,
274 sal_Bool bRemoved, OUString
const & identifier,
275 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
virtual css::uno::Reference< css::deployment::XPackage > SAL_CALL bindPackage(OUString const &url, OUString const &mediaType, sal_Bool bRemoved, OUString const &identifier, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
OUString createFolder(css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
std::unordered_map< OUString, css::uno::Reference< css::deployment::XPackage > > t_string2ref
css::uno::Reference< css::uno::XComponentContext > const & getComponentContext() const
virtual void SAL_CALL disposing() override
static OUString StrRegisteringPackage()
static void deleteTempFolder(OUString const &folderUrl)
static OUString StrUnsupportedMediaType()
virtual ~PackageRegistryBackend() override
virtual css::uno::Reference< css::deployment::XPackage > bindPackage_(OUString const &url, OUString const &mediaType, bool bRemoved, OUString const &identifier, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)=0
static OUString StrRevokingPackage()
void deleteUnusedFolders(std::vector< OUString > const &usedFolders)
enum dp_registry::backend::PackageRegistryBackend::Context m_eContext
bool transientMode() const
PackageRegistryBackend(css::uno::Sequence< css::uno::Any > const &args, css::uno::Reference< css::uno::XComponentContext > const &xContext)
virtual void SAL_CALL disposing(css::lang::EventObject const &evt) override
const OUString & getContext() const
static OUString StrCannotDetectMediaType()
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext
OUString const & getCachePath() const
const OUString m_mediaType
virtual OUString SAL_CALL getDescription() override
virtual css::uno::Any SAL_CALL getIcon(sal_Bool highContrast, sal_Bool smallIcon) override
virtual OUString SAL_CALL getShortDescription() override
virtual OUString SAL_CALL getMediaType() override
const OUString m_fileFilter
TypeInfo(OUString mediaType, OUString fileFilter, OUString shortDescr)
virtual ~TypeInfo() override
const OUString m_shortDescr
virtual OUString SAL_CALL getFileFilter() override
virtual OUString SAL_CALL getLicenseText() override
virtual OUString SAL_CALL getName() override
virtual void SAL_CALL removeEventListener(css::uno::Reference< css::lang::XEventListener > const &xListener) override
virtual void processPackage_(::osl::ResettableMutexGuard &guard, bool registerPackage, bool startup, ::rtl::Reference< ::dp_misc::AbortChannel > const &abortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)=0
void checkAborted(::rtl::Reference< ::dp_misc::AbortChannel > const &abortChannel)
const css::uno::Reference< css::deployment::XPackageTypeInfo > m_xPackageType
virtual void SAL_CALL addModifyListener(css::uno::Reference< css::util::XModifyListener > const &xListener) override
virtual void SAL_CALL exportTo(OUString const &destFolderURL, OUString const &newTitle, sal_Int32 nameClashAction, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual OUString SAL_CALL getURL() override
virtual OUString SAL_CALL getDescription() override
virtual OUString SAL_CALL getRepositoryName() override
virtual void SAL_CALL removeModifyListener(css::uno::Reference< css::util::XModifyListener > const &xListener) override
virtual ::sal_Bool SAL_CALL checkDependencies(const css::uno::Reference< css::ucb::XCommandEnvironment > &xCmdEnv) override
virtual sal_Bool SAL_CALL isBundle() override
PackageRegistryBackend * getMyBackend() const
::rtl::Reference< PackageRegistryBackend > m_myBackend
virtual ~Package() override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL registerPackage(sal_Bool startup, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual OUString SAL_CALL getDisplayName() override
virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL getIcon(sal_Bool bHighContrast) override
virtual css::beans::Optional< OUString > SAL_CALL getRegistrationDataURL() override
virtual css::beans::Optional< OUString > SAL_CALL getIdentifier() override
virtual void SAL_CALL addEventListener(css::uno::Reference< css::lang::XEventListener > const &xListener) override
virtual css::beans::StringPair SAL_CALL getPublisherInfo() override
Package(::rtl::Reference< PackageRegistryBackend > myBackend, OUString url, OUString name, OUString displayName, css::uno::Reference< css::deployment::XPackageTypeInfo > const &xPackageType, bool bRemoved, OUString identifier)
virtual OUString SAL_CALL getVersion() override
virtual css::beans::Optional< css::beans::Ambiguous< sal_Bool > > isRegistered_(::osl::ResettableMutexGuard &guard, ::rtl::Reference< ::dp_misc::AbortChannel > const &abortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)=0
const OUString m_identifier
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL getBundle(css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual void SAL_CALL disposing() override
void processPackage_impl(bool registerPackage, bool startup, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
virtual css::beans::Optional< css::beans::Ambiguous< sal_Bool > > SAL_CALL isRegistered(css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual css::uno::Reference< css::deployment::XPackageTypeInfo > SAL_CALL getPackageType() override
virtual css::uno::Sequence< OUString > SAL_CALL getUpdateInformationURLs() override
virtual ::sal_Int32 SAL_CALL checkPrerequisites(const css::uno::Reference< css::task::XAbortChannel > &xAbortChannel, const css::uno::Reference< css::ucb::XCommandEnvironment > &xCmdEnv, sal_Bool noLicenseChecking) override
virtual css::uno::Reference< css::task::XAbortChannel > SAL_CALL createAbortChannel() override
virtual void SAL_CALL revokePackage(sal_Bool startup, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual sal_Bool SAL_CALL isRemoved() override
OUString DpResId(TranslateId aId)
static uno::Reference< css::uno::XComponentContext > xContext
constexpr OUStringLiteral BACKEND_SERVICE_NAME
::cppu::WeakComponentImplHelper< css::deployment::XPackage > t_PackageBase
::cppu::WeakComponentImplHelper< css::lang::XEventListener, css::deployment::XPackageRegistry, css::lang::XServiceInfo > t_BackendBase