CPositioner Class Reference
class CPositioner : public CBase |
This class is used when Location Framework needs to acquire a position and quality from the PSY. The interface of this class is used for loading and using PSYs and as a framework for developing PSYs. It requires that users define new subclasses to the API classes. It is also used for implementing more advanced PSY features, e.g. periodic position updates, and the maximum age for positions. It can also handle parallel requests.
Constructor & Destructor Documentation
CPositioner()
IMPORT_C | CPositioner | ( | ) | [protected] |
Member Functions Documentation
BaseConstructL(TAny *)
IMPORT_C void | BaseConstructL | ( | TAny * | aConstructionParameters | ) | [protected] |
Creates the internals of the positioner.
This function must be called first thing in the positioner's ConstructL() method.
Parameters
TAny * aConstructionParameters | The construction parameters supplied in the factory call. |
CPositioner_Reserved2()
IMPORT_C void | CPositioner_Reserved2 | ( | ) | [private, virtual] |
CancelNotifyPositionUpdate()
void | CancelNotifyPositionUpdate | ( | ) | [pure virtual] |
Cancels position info request.
CancelNotifyPositionUpdate(TInt)
IMPORT_C void | CancelNotifyPositionUpdate | ( | TInt | aError | ) | [virtual] |
Cancels the request with the error code provided.
Parameters
TInt aError | The error code to cancel request with. |
ExtendUpdateTimeOut(const TTimeIntervalMicroSeconds &)
Extends the active request timeout by the value specified. Only the current active request is affected and the changes are not stored. That is the value returned by GetUpdateTimeOut and the default PSY timeout set by SetPsyDefaultUpdateTimeOut are not changed. This method is used, for example, to apply FNP lag.
GetMaxAge(TTime &)
IMPORT_C void | GetMaxAge | ( | TTime & | aMaxAge | ) | const [protected] |
Get the earliest allowed time of an old position fix, based on the current max age set by the client.
The PSY may save the result from the latest position request and return the same result in the next position request if the client says it's ok. Max age tells the PSY how old the stored position is allowed to be. If the stored position is too old or the PSY does not support max age, a normal positioning should be performed.
Parameters
TTime & aMaxAge | On return, will contain the earliest allowed time of an old position fix. If no max age is defined aMaxAge will contain a time set to zero. |
GetRequiredPositionQuality(TPositionQuality &)
Get the quality of service requested by the client.
This method can be used by positioning modules which have the ability to deliver different quality of service.
GetUpdateTimeOut(TTimeIntervalMicroSeconds &)
Returns the location update timeout associated with the subsession. The method returns a real timeout, which is defined and used by the Location Server. It may be different from the timeout set by the client or default PSY timeout.
ImplementationUid()
IMPORT_C TUid | ImplementationUid | ( | ) | const |
Called to return the implementation UID set when calling NewL.
IsPartialUpdateAllowed()
IMPORT_C TBool | IsPartialUpdateAllowed | ( | ) | const [protected] |
Checks if the client allows a partial position update.
A partial update result does not need to contain all parameters. The only mandatory parameters are latitude, longitude and time of fix. Everything else is optional.
If a partial update is returned to the client in a NotifyPositionUpdate() call, the completion code must be set to KPositionPartialUpdate.
NewL(TAny *)
Creates a new instance of a CPositioner implementation.
Parameters
TAny * aConstructionParameters | Construction parameters for CPositioner. |
NewL(TUid, const CPositioner &)
Creates a new instance of a CPositioner implementation.
This variant of NewL takes a CPositioner as input. The new positioner will get a copy of the construction parameters of the specified positioner.
This NewL variant should be used by proxy positioners who need to load other positioners. A proxy positioner cannot use the other NewL method since the construction parameters are not public.
Parameters
TUid aImplementationUid | The implementation uid of the positioner which should be created. |
const CPositioner & aPositioner | The positioner to copy construction parameters from. |
NotifyPositionUpdate(TPositionInfoBase &, TRequestStatus &)
void | NotifyPositionUpdate | ( | TPositionInfoBase & | aPosInfo, |
| TRequestStatus & | aStatus |
| ) | [pure virtual] |
Requests position info asynchronously.
Parameters
TPositionInfoBase & aPosInfo | A reference to a position info object. This object must be in scope until the request has completed. The position (TPosition) of this position info object must be in WGS84 geodetic datum. |
TRequestStatus & aStatus | The request status |
PositionerStatus()
Retrieve the interface for reporting positioner status.
ServiceL(RMessage2 &)
IMPORT_C void | ServiceL | ( | RMessage2 & | aMessage | ) | [virtual] |
Service a PSY specific request.
The PSY uses the RMessage object to read input parameters, write return parameters and complete the request.
ServiceL() should be implemented to leave with code KErrNotSupported if the request id is not recognized.
Parameters
RMessage2 & aMessage | The client server request message object. |
SetPsyDefaultUpdateTimeOut(const TTimeIntervalMicroSeconds &)
Called to inform the Location Server about the PSY default update timeout. The Location Server may use this value to calculate the update timeout it uses. When this method is called, it does not affect the currect request. So, it must be called in advance before a request comes from the Location Server.
StartTrackingL(const TTimeIntervalMicroSeconds &)
Initiate a tracking session.
StopTracking()
IMPORT_C void | StopTracking | ( | ) | [virtual] |
Stop a periodic update session. Any outstanding requests will be cancelled.
TrackingOverridden()
IMPORT_C TBool | TrackingOverridden | ( | ) | const [virtual] |
Indicate if the PSY has overridden tracking. The default implementation returns EFalse. Override and return ETrue to use PSY:s own timer.
Member Data Documentation
CPositionerExtension * iExtension
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.