TPositionUpdateOptions Class Reference

API published in: S60 2nd Ed FP 2

Link against: lbs.lib

Capability Information

Required Capabilities

None

Exceptions

The capability Location is required in:

TInt RPositionServer::GetDefaultModuleId(TPositionModuleId& aModuleId) const;

TInt RPositionServer::GetNumModules(TUint& aNumModules) const;

TInt RPositionServer::GetModuleInfoByIndex(TInt aModuleIndex, TPositionModuleInfoBase& aModuleInfo) const;

TInt RPositionServer::GetModuleInfoById(TPositionModuleId aModuleId, TPositionModuleInfoBase& aModuleInfo) const;

TInt RPositionServer::GetModuleStatus(TPositionModuleStatusBase& aPosModuleStatus, TPositionModuleId aModuleId) const;

void RPositionServer::NotifyModuleStatusEvent(TPositionModuleStatusEventBase& aStatusEvent,TRequestStatus& aStatus,const TPositionModuleId aModuleId = KPositionNullModuleId) const;

TInt RPositioner::SetRequestor(CRequestor::TRequestorType aType,CRequestor::TRequestorFormat aFormat,const TDesC& aData);

TInt RPositioner::SetRequestor(const RRequestorStack& aRequestorStack);

TInt RPositioner::SetUpdateOptions(const TPositionUpdateOptionsBase& aPosOption);

TInt RPositioner::GetUpdateOptions(TPositionUpdateOptionsBase& aPosOption) const;

void RPositioner::GetLastKnownPosition(TPositionInfoBase& aPosInfo,TRequestStatus& aStatus) const;

void RPositioner::NotifyPositionUpdate(TPositionInfoBase& aPosInfo,TRequestStatus& aStatus) const;


#include <lbscommon.h>

Inherits TPositionUpdateOptionsBase.


Detailed Description

The normal class for storing position update options.

Public Member Functions

IMPORT_C  TPositionUpdateOptions ()
  Default constructor for TPositionUpdateOptions.
IMPORT_C  TPositionUpdateOptions (TTimeIntervalMicroSeconds aInterval, TTimeIntervalMicroSeconds aTimeOut=TTimeIntervalMicroSeconds(0), TTimeIntervalMicroSeconds aMaxAge=TTimeIntervalMicroSeconds(0), TBool aAcceptPartialUpdates=EFalse)
  Constructor for TPositionUpdateOptions.
IMPORT_C void  SetAcceptPartialUpdates (TBool aAcceptPartialUpdates)
  Set whether partial updates can be accepted.
IMPORT_C TBool  AcceptPartialUpdates () const
  Check if partial update option was set for this session.

Protected Attributes

TBool  iAcceptPartialUpdates
  Whether partial updates are accepted.

Constructor & Destructor Documentation

IMPORT_C TPositionUpdateOptions::TPositionUpdateOptions  ) 
 

Default constructor for TPositionUpdateOptions.

IMPORT_C TPositionUpdateOptions::TPositionUpdateOptions TTimeIntervalMicroSeconds  aInterval,
TTimeIntervalMicroSeconds  aTimeOut = TTimeIntervalMicroSeconds(0),
TTimeIntervalMicroSeconds  aMaxAge = TTimeIntervalMicroSeconds(0),
TBool  aAcceptPartialUpdates = EFalse
 

Constructor for TPositionUpdateOptions.

All parameters except aInterval have default values.

Parameters:
aInterval  The time interval at which the client is interested in receiving position information from positioning server at regular intervals. This means that as long as the client re-issues the position request when the previous position request is completed, the client receives position updates after the specified update interval periodicity.
aTimeOut  The timeout value for a position request. If the positioning module is unable to return a position fix within the specified timeout interval then the request is cancelled. Defaults to zero.
aMaxAge  This parameter specifies the expiry time for the position information cache for this subsession. It means that when a position request is made the position information can be returned from the cache as long as the cache is not older that the specified maximum age. The default value is zero ie the position information will never be returned from cache.
aAcceptPartialUpdates  If this parameter is set to true then the server can choose to return only the timestamp value for a position request. All other fields like latitude, longitude and altitude etc are taken as optional fields. If it is false, then it is mandatory for the server to return all fields of the basic position information. The default value is false.

Member Function Documentation

IMPORT_C TBool TPositionUpdateOptions::AcceptPartialUpdates  )  const
 

Check if partial update option was set for this session.

Returns:
ETrue if partial updates are accepted, EFalse otherwise
Note:
this returns only the value within this class object.
Precondition:
The client should have called RPositioner::GetUpdateOptions() to retrieve information about whether partial updates option has been set to true or false.
IMPORT_C void TPositionUpdateOptions::SetAcceptPartialUpdates TBool  aAcceptPartialUpdates  ) 
 

Set whether partial updates can be accepted.

If partial updates are allowed, then timestamp is the only mandatory field. All other information like latitude, longitude etc. can be missing from the returned position information.

Parameters:
aAcceptPartialUpdates  If this parameter is set to true then the server can choose to return only the timestamp value for a position request. All other fields like latitude, longitude and altitude etc are taken as optional fields. If it is false, then it is mandatory for the server to return all fields of the basic position information. The default value is false.
Postcondition:
the client should invoke RPositioner::SetUpdateOptions() to set this option for the current session.

Field Documentation

TBool TPositionUpdateOptions::iAcceptPartialUpdates [protected]
 

Whether partial updates are accepted.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top