Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::ITimerService Class Referenceabstract

Timer service interface. More...

Public Member Functions

virtual int onRegisterListener (ITimerListener *listener)=0
 Registers the timer events listener.
virtual void onUnregisterListener ()=0
 Unregisters the timer events listener.
virtual int onStartTimer (int intervalMs)=0
 Starts the timer.
virtual int onStopTimer ()=0
 Stops the timer.

Detailed Description

Timer service interface.

Interface for scheduling timed callbacks.

Abstract timer service that can be implemented to deliver periodic or delayed tasks used by SDK components.

Because on some platforms the timer support doesn't exist natively, the API user must provide a timer mechanism required internally by the engine.

Remarks
The service supports only one listener.

Member Function Documentation

◆ onRegisterListener()

virtual int gem::ITimerService::onRegisterListener ( ITimerListener * listener)
pure virtual

Registers the timer events listener.

Parameters
listenerPointer to the ITimerListener object to register.
Returns
Integer indicating success or failure of listener registration.

◆ onStartTimer()

virtual int gem::ITimerService::onStartTimer ( int intervalMs)
pure virtual

Starts the timer.

Parameters
intervalMsThe timer interval in milliseconds.
Returns
Integer indicating success or failure of starting the timer.

◆ onStopTimer()

virtual int gem::ITimerService::onStopTimer ( )
pure virtual

Stops the timer.

Returns
Integer indicating success or failure of stopping the timer.