26#include <rtl/ustrbuf.hxx>
27#include <com/sun/star/logging/LogLevel.hpp>
28#include <com/sun/star/ucb/XProgressHandler.hpp>
29#include <com/sun/star/lang/XServiceInfo.hpp>
37typedef ::cppu::WeakComponentImplHelper<ucb::XProgressHandler, lang::XServiceInfo>
t_log_helper;
46 virtual void SAL_CALL disposing()
override;
47 virtual ~ProgressLogImpl()
override;
50 ProgressLogImpl( Sequence<Any>
const & args,
51 Reference<XComponentContext>
const &
xContext );
59 virtual void SAL_CALL push( Any
const &
Status )
override;
60 virtual void SAL_CALL
update( Any
const &
Status )
override;
61 virtual void SAL_CALL pop()
override;
66ProgressLogImpl::~ProgressLogImpl()
71void ProgressLogImpl::disposing()
76ProgressLogImpl::ProgressLogImpl(
77 Sequence<Any>
const & ,
78 Reference<XComponentContext>
const &
xContext )
86OUString ProgressLogImpl::getImplementationName()
88 return "com.sun.star.comp.deployment.ProgressLog";
91sal_Bool ProgressLogImpl::supportsService(
const OUString& ServiceName )
96css::uno::Sequence< OUString > ProgressLogImpl::getSupportedServiceNames()
99 return {
"com.sun.star.comp.deployment.ProgressLog" };
104void ProgressLogImpl::push( Any
const &
Status )
117 sal_Int32 logLevel = LogLevel::INFO;
122 logLevel = LogLevel::SEVERE;
123 buf.append( ::comphelper::anyToString(
Status) );
129void ProgressLogImpl::pop()
135extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
137 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& args)
139 return cppu::acquire(
new dp_log::ProgressLogImpl(
args, context));
void log(const sal_Int32 _nLogLevel, const OUString &rMessage) const
comphelper::EventLogger m_logger
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_deployment_ProgressLog_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &args)
static uno::Reference< css::uno::XComponentContext > xContext
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
::cppu::WeakComponentImplHelper< ucb::XProgressHandler, lang::XServiceInfo > t_log_helper