20#ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERTIMER_HXX
21#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERTIMER_HXX
23#include <com/sun/star/awt/XCallback.hpp>
24#include <com/sun/star/awt/XRequestCallback.hpp>
48 typedef ::std::function<void (
const TimeValue&)>
Task;
58 const css::uno::Reference<css::uno::XComponentContext>& xContext,
60 const sal_Int64 nFirst,
61 const sal_Int64 nInterval);
63 static void CancelTask (
const sal_Int32 nTaskId);
66typedef cppu::WeakComponentImplHelper<
87 static ::rtl::Reference<PresenterClockTimer>
Instance (
88 const css::uno::Reference<css::uno::XComponentContext>& rxContext);
97 virtual void SAL_CALL
notify (
const css::uno::Any& rUserData)
override;
109 const css::uno::Reference<css::uno::XComponentContext>
m_xContext;
112 const css::uno::Reference<css::uno::XComponentContext>& rxContext);
virtual void TimeHasChanged(const oslDateTime &rCurrentTime)=0
A timer that calls its listeners, typically clocks, every second to update their current time value.
css::uno::Reference< css::awt::XRequestCallback > mxRequestCallback
::std::vector< SharedListener > ListenerContainer
virtual void SAL_CALL notify(const css::uno::Any &rUserData) override
virtual ~PresenterClockTimer() override
static oslDateTime GetCurrentTime()
static ::rtl::Reference< PresenterClockTimer > Instance(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
static ::rtl::Reference< PresenterClockTimer > mpInstance
ListenerContainer maListeners
std::shared_ptr< Listener > SharedListener
const css::uno::Reference< css::uno::XComponentContext > m_xContext
PresenterClockTimer(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
void AddListener(const SharedListener &rListener)
void CheckCurrentTime(const TimeValue &rCurrentTime)
void RemoveListener(const SharedListener &rListener)
The timer allows tasks to be scheduled for execution at a specified time in the future.
static void CancelTask(const sal_Int32 nTaskId)
::std::function< void(const TimeValue &)> Task
A task is called with the current time.
static const sal_Int32 NotAValidTaskId
static sal_Int32 ScheduleRepeatedTask(const css::uno::Reference< css::uno::XComponentContext > &xContext, const Task &rTask, const sal_Int64 nFirst, const sal_Int64 nInterval)
Schedule a task to be executed repeatedly.
cppu::WeakComponentImplHelper< css::awt::XCallback > PresenterClockTimerInterfaceBase