21#include <com/sun/star/deployment/VersionException.hpp>
22#include <com/sun/star/deployment/LicenseException.hpp>
23#include <com/sun/star/deployment/InstallException.hpp>
24#include <com/sun/star/deployment/DependencyException.hpp>
25#include <com/sun/star/deployment/PlatformException.hpp>
26#include <com/sun/star/task/XInteractionApprove.hpp>
27#include <com/sun/star/task/XInteractionHandler.hpp>
28#include <com/sun/star/ucb/XCommandEnvironment.hpp>
31#include <osl/diagnose.h>
38using ::com::sun::star::uno::Reference;
47 Reference< task::XInteractionHandler>
const & handler)
48 : m_forwardHandler(handler)
69 Reference< task::XInteractionRequest>
const & )
74 Reference< task::XInteractionRequest>
const & xRequest )
88 xRequest->getContinuations() );
89 Reference< task::XInteractionContinuation >
const * pConts =
90 conts.getConstArray();
91 sal_Int32 len = conts.getLength();
92 for ( sal_Int32
pos = 0;
pos < len; ++
pos )
95 Reference< task::XInteractionApprove > xInteractionApprove(
96 pConts[
pos ], uno::UNO_QUERY );
97 if (xInteractionApprove.is()) {
98 xInteractionApprove->select();
127 css::uno::Reference< css::task::XInteractionHandler>
const & handler):
133 Reference< task::XInteractionRequest>
const & xRequest )
135 uno::Any request( xRequest->getRequest() );
136 OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
138 deployment::VersionException verExc;
139 deployment::LicenseException licExc;
140 deployment::InstallException instExc;
142 bool approve =
false;
144 if ((request >>= verExc)
145 || (request >>= licExc)
146 || (request >>= instExc))
156 css::uno::Reference< css::task::XInteractionHandler>
const & handler,
157 bool bSuppressLicense,
158 OUString repository):
160 m_bSuppressLicense(bSuppressLicense)
165 Reference< task::XInteractionRequest>
const & xRequest )
167 uno::Any request( xRequest->getRequest() );
168 OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
170 deployment::LicenseException licExc;
172 bool approve =
false;
174 if (request >>= licExc)
178 || licExc.AcceptBy ==
"admin")
193 css::uno::Reference< css::task::XInteractionHandler>
const & handler):
199 Reference< task::XInteractionRequest>
const & xRequest )
201 uno::Any request( xRequest->getRequest() );
202 OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
204 deployment::LicenseException licExc;
206 bool approve =
false;
208 if (request >>= licExc)
220 Reference< task::XInteractionRequest>
const & xRequest )
222 uno::Any request( xRequest->getRequest() );
223 OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
225 deployment::LicenseException licExc;
226 deployment::PlatformException platformExc;
227 deployment::DependencyException depExc;
229 if (request >>= licExc)
233 else if ((request >>= platformExc)
234 || (request >>= depExc))
This command environment is to be used when an extension is temporarily stored in the "tmp" repositor...
void handle_(bool approve, css::uno::Reference< css::task::XInteractionRequest > const &xRequest)
virtual css::uno::Reference< css::task::XInteractionHandler > SAL_CALL getInteractionHandler() override
css::uno::Reference< css::task::XInteractionHandler > m_forwardHandler
virtual ~BaseCommandEnv() override
virtual void SAL_CALL pop() override
virtual void SAL_CALL push(css::uno::Any const &Status) override
virtual css::uno::Reference< css::ucb::XProgressHandler > SAL_CALL getProgressHandler() override
virtual void SAL_CALL update(css::uno::Any const &Status) override
virtual void SAL_CALL handle(css::uno::Reference< css::task::XInteractionRequest > const &xRequest) override
LicenseCommandEnv(css::uno::Reference< css::task::XInteractionHandler > const &handler, bool bSuppressLicense, OUString repository)
virtual void SAL_CALL handle(css::uno::Reference< css::task::XInteractionRequest > const &xRequest) override
virtual void SAL_CALL handle(css::uno::Reference< css::task::XInteractionRequest > const &xRequest) override
NoLicenseCommandEnv(css::uno::Reference< css::task::XInteractionHandler > const &handler)
SilentCheckPrerequisitesCommandEnv()
css::uno::Any m_UnknownException
css::uno::Any m_Exception
virtual void SAL_CALL handle(css::uno::Reference< css::task::XInteractionRequest > const &xRequest) override
virtual void SAL_CALL handle(css::uno::Reference< css::task::XInteractionRequest > const &xRequest) override
TmpRepositoryCommandEnv()