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>
It is used to make the primary connection to the location server. After the primary connection has been established, its handle is passed as a parameter of the Open methods of RPositioner to create a sub-session.
The RPositionServer class can also be used to discover what position technology modules are available. However, this is only required if a client application actually needs to use a particular module.
Public Member Functions |
|
IMPORT_C | RPositionServer () |
Constructor for RPositionServer. |
|
IMPORT_C TInt | Connect () |
Creates a session with the positioning server. |
|
IMPORT_C void | Close () |
Closes a session with the positioning server.Before the connection to Location Server is closed, the client application must
ensure that any outstanding notification requests have been cancelled. |
|
IMPORT_C TVersion | Version () const |
Obtains the current version number of the location server. |
|
IMPORT_C TInt | GetDefaultModuleId (TPositionModuleId &aModuleId) const |
This method obtains the identifier of the systems' default positioning module. |
|
IMPORT_C TInt | GetNumModules (TUint &aNumModules) const |
This method obtains the current number of available positioning modules. |
|
IMPORT_C TInt | GetModuleInfoByIndex (TInt aModuleIndex, TPositionModuleInfoBase &aModuleInfo) const |
Return details about a specified module. |
|
IMPORT_C TInt | GetModuleInfoById (TPositionModuleId aModuleId, TPositionModuleInfoBase &aModuleInfo) const |
Return details about a specified module. |
|
IMPORT_C TInt | GetModuleStatus (TPositionModuleStatusBase &aPosModuleStatus, TPositionModuleId aModuleId) const |
Obtains information about the specified positioning module. |
|
IMPORT_C void | NotifyModuleStatusEvent (TPositionModuleStatusEventBase &aStatusEvent, TRequestStatus &aStatus, const TPositionModuleId aModuleId=KPositionNullModuleId) const |
This method reports status changes of either a single module or all positioning modules. |
|
IMPORT_C TInt | CancelRequest (TInt aRequestId) |
Cancels a previously issued asynchronous request. |
|
Constructor for RPositionServer. |
|
Cancels a previously issued asynchronous request. The TRequestStatus of the original request will be set to KErrCancel if the cancellation request was successful, or any other Symbian OS error code if CancelRequest was called too late.
|
|
Closes a session with the positioning server.Before the connection to Location Server is closed, the client application must ensure that any outstanding notification requests have been cancelled. In particular, applications must issue all appropriate cancel requests and then wait for a confirmation that the notifications have been terminated. A failure to do so results in a client side panic.
|
|
Creates a session with the positioning server. If there are no other sessions when this is called, the method will start the server. This method must be called before an attempt to obtain module information or on opening a sub-session.
|
|
This method obtains the identifier of the systems' default positioning module. This module will be used if no criteria is specified when an RPositioner sub-session is created.
|
|
Return details about a specified module.
|
|
Return details about a specified module.
|
|
Obtains information about the specified positioning module.
|
|
This method obtains the current number of available positioning modules.
|
|
This method reports status changes of either a single module or all positioning modules. It is an asynchronous request and the client should use it appropriately using active objects. After a notification has been received, the client application must re-issue the status change request if it wishes to obtain further updates. To cancel this request use RPositionServer::CancelRequest() with EPositionServerNotifyModuleStatusEvent as parameter
|
|
Obtains the current version number of the location server.
|