20#ifndef INCLUDED_SW_SOURCE_CORE_INC_FINALTHREADMANAGER_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_FINALTHREADMANAGER_HXX
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/util/XJobManager.hpp>
27#include <com/sun/star/frame/XTerminateListener2.hpp>
29#include <osl/mutex.hxx>
40 css::util::XJobManager,
41 css::frame::XTerminateListener2 >
44 explicit FinalThreadManager(css::uno::Reference< css::uno::XComponentContext > context);
52 virtual void SAL_CALL
registerJob(
const css::uno::Reference< css::util::XCancellable > & Job)
override;
53 virtual void SAL_CALL
releaseJob(
const css::uno::Reference< css::util::XCancellable > & Job)
override;
57 virtual void SAL_CALL
cancelTermination(
const css::lang::EventObject& Event )
override;
60 virtual void SAL_CALL
queryTermination(
const css::lang::EventObject& Event )
override;
61 virtual void SAL_CALL
notifyTermination(
const css::lang::EventObject& Event )
override;
64 virtual void SAL_CALL
disposing(
const css::lang::EventObject&
Source )
override;
74 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
78 std::list< css::uno::Reference< css::util::XCancellable > >
maThreads;
thread to cancel a give list of cancellable jobs
virtual void SAL_CALL notifyTermination(const css::lang::EventObject &Event) override
std::unique_ptr< SwPauseThreadStarting, o3tl::default_delete< SwPauseThreadStarting > > mpPauseThreadStarting
virtual OUString SAL_CALL getImplementationName() override
virtual ~FinalThreadManager() override
void registerAsListenerAtDesktop()
virtual void SAL_CALL releaseJob(const css::uno::Reference< css::util::XCancellable > &Job) override
TerminateOfficeThread * mpTerminateOfficeThread
std::list< css::uno::Reference< css::util::XCancellable > > maThreads
bool mbRegisteredAtDesktop
std::unique_ptr< CancelJobsThread > mpCancelJobsThread
virtual void SAL_CALL registerJob(const css::uno::Reference< css::util::XCancellable > &Job) override
virtual void SAL_CALL cancelAllJobs() override
FinalThreadManager(FinalThreadManager const &)=delete
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL queryTermination(const css::lang::EventObject &Event) override
void operator=(FinalThreadManager const &)=delete
FinalThreadManager(css::uno::Reference< css::uno::XComponentContext > context)
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL cancelTermination(const css::lang::EventObject &Event) override
Helper class to pause starting of threads during existence of an instance of this class.
thread to terminate office, when all jobs are cancelled.