#include <lbsmovementobserver.h>
Public Member Functions | |
virtual void | HandleMovementUpdate (const TLbsMovementEvent &aEvent)=0 |
virtual void | HandleMovementStatus (TInt aStatus) |
virtual TVersion | Version () const |
MLbsMovementObserver - Provides callback methods for CLbsLocator to send movement events to the application.
Movement events provide an indication of wherether the user is stationary or moving. Potentially, they may also indicate whether the user is walking.
The range of movement detection supported and the power consumed is dependent on the performance profile being used.
Applications need only to implement the HandleMovementUpdate() method of this class. If status information is important then HandleMovementStatus() should also be defined.
void MLbsMovementObserver::HandleMovementStatus | ( | TInt | aStatus | ) | [virtual] |
Applications must implement this method to receive movement status updates.
To begin receiving status updates the application must call CLbsLocator::StartUpdatesL().
When HandleMovementStatus() is called with a negative status code, this indicates there has been an error inside the location subsystem or with the connected hardware. These situations are generally not recoverable and the application would normally stop using the interface.
When an application no longer wishes to receive updates it should call CLbsLocator::StopUpdates(). It is possible to call this method from within the HandleLocationStatus() callback.
[in] | aStatus | A negative value represents a Symbian OS system wide error. This will normally prevent any movement information from being returned. KErrNone is returned when normal service has been restored. |
void MLbsMovementObserver::HandleMovementUpdate | ( | const TLbsMovementEvent & | aEvent | ) | [pure virtual] |
Informs the application of movement events.
To begin receiving updates the application must call CLbsLocator::StartUpdatesL().
After calling StartUpdatesL(), the first update an application will receive is the current movement status if known. The application will then receive movement events but the frequency and information available depends on the active profile. See CLbsLocator::SetLocatorProfile() for more information.
When an application no longer wishes to receive updates it should call CLbsLocator::StopUpdates(). It is legal, valid and usual to stop updates from within the HandleMovementUpdate() callback.
[in] | aEvent | The current movement indicator. |
TVersion MLbsMovementObserver::Version | ( | ) | const [virtual] |
This method should not be overridden by the application.
It is queried by the location subsystem to determine the version of the observer interface used by the application.