API published in: S60 2nd Ed FP 2
Link against: lbs.lib
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 <lbs.h>
Inherits RPositionerSubSessionBase.
In addition to actually obtaining position information, this class also provides mechanisms for obtaining the last known position, the general status of the positioning module, changing how often it wishes to receive position updates, as well as identifying itself to the location framework.
Before using the class, a primary connection must have already been established with the server.
Public Member Functions |
|
IMPORT_C | RPositioner () |
Constructor for RPositioner. |
|
IMPORT_C TInt | Open (RPositionServer &aPosServer) |
Creates a sub-session with the positioning server. |
|
IMPORT_C TInt | Open (RPositionServer &aPosServer, TPositionModuleId aModuleId) |
Creates a sub-session with the positioning server. |
|
IMPORT_C TInt | Open (RPositionServer &aPosServer, const TPositionCriteriaBase &aCriteria) |
Creates a sub-session with the positioning server. |
|
IMPORT_C void | Close () |
Closes a sub-session with the positioning server. |
|
IMPORT_C TInt | SetRequestor (CRequestor::TRequestorType aType, CRequestor::TRequestorFormat aFormat, const TDesC &aData) |
Set the requestor for this sub-session. |
|
IMPORT_C TInt | SetRequestor (const RRequestorStack &aRequestorStack) |
Sets the requestors for this sub-session. |
|
IMPORT_C TInt | SetUpdateOptions (const TPositionUpdateOptionsBase &aPosOption) |
This method can be used to modify the current options set for this sub-session. |
|
IMPORT_C TInt | GetUpdateOptions (TPositionUpdateOptionsBase &aPosOption) const |
This method retrieves the current options set for this sub-session. |
|
IMPORT_C void | GetLastKnownPosition (TPositionInfoBase &aPosInfo, TRequestStatus &aStatus) const |
This method returns cached position information if it is available. |
|
IMPORT_C void | NotifyPositionUpdate (TPositionInfoBase &aPosInfo, TRequestStatus &aStatus) const |
This is an asynchronous method for obtaining position updates. |
|
Protected Member Functions |
|
virtual IMPORT_C void | ConstructL () |
symbian 2nd phase constructor |
|
virtual IMPORT_C void | Destruct () |
destructs the data inside this class |
|
virtual IMPORT_C TAny * | ExtendedInterface (TInt aFunctionNumber, TAny *aPtr1, TAny *aPtr2) |
|
Constructor for RPositioner. |
|
Closes a sub-session with the positioning server. Before a sub-session is closed, the client application must ensure that all outstanding notification requests have been cancelled. In particular, the application must issue all the appropriate Cancel requests and then wait for a confirmation that the notifications have been terminated. A failure to do so results in a panic.
|
|
symbian 2nd phase constructor |
|
destructs the data inside this class |
|
Reimplemented from RPositionerSubSessionBase. |
|
This method returns cached position information if it is available. This method can be an efficient mechanism - in terms of speed, cost and power consumption - of obtaining the devices' recent position.
|
|
This method retrieves the current options set for this sub-session. These options are related to receiving the position update from the server.
|
|
This is an asynchronous method for obtaining position updates. It is possible to pass any class that is derived from TPositionInfoBase. However, the standard data retrieval class is TPositionInfo. The standard means of retrieving extended information is to use HPositionGenericInfo.
|
|
Creates a sub-session with the positioning server. The client specifies the criteria for choosing the positioning module. The server chooses the positioning module that satisfies the criteria parameter.
|
|
Creates a sub-session with the positioning server. The client specifies the module ID of the positioning module to be used for obtaining position information.
|
|
Creates a sub-session with the positioning server. The server uses the positioning module with the highest priority by default. If the highest priority positioning module is not available or if it returns an error for a position request then the positioning module with the next highest priority is used.
|
|
Sets the requestors for this sub-session. These requestors will be used to verify privacy whenever a location request is made through this sub-session. This method is used when a chain of requestors is involved in the positioning request.
|
|
Set the requestor for this sub-session. This requestor will be used to verify privacy whenever a location request is made through this sub-session. This method is used when there is only one requestor involved in the positioning request.
|
|
This method can be used to modify the current options set for this sub-session. It enables the client to request an interval time for receiving position updates.
|