CLbsSuplTiApi Class Reference

class CLbsSuplTiApi : public CBase

SUPL Terminal Initiation Module API

An API to enable a terminal client to determine terminal's position information using SUPL protocol and retrieve it.

The purpose of the API is to provide a dividing line between the SUPL OS and middleware layers, where typically the client will be the OS side LBS SUPL proxy protocol module. Terminal initiation modules are written to support the API to provide a wrapper around the middleware components.

Inherits from

Constructor & Destructor Documentation

CLbsSuplTiApi(MLbsSuplTiObserver &)

IMPORT_C CLbsSuplTiApi ( MLbsSuplTiObserver & aObserver ) [protected]

Parameters

MLbsSuplTiObserver & aObserver is a pointer to the initiation module's observer, which is used to respond to requests.

~CLbsSuplTiApi()

IMPORT_C ~CLbsSuplTiApi ( )

Standard destructor that handles the ECom destruction.

The client invokes the destructor on the initation module when it wishes to unload the module.

The module should terminate all current requests and close any connections it may have.

Member Functions Documentation

CancelRequest(const TLbsNetSessionId &)

TInt CancelRequest ( const TLbsNetSessionId & aSessionId ) [pure virtual]

Cancels an outstanding asynchronous location request. Cancelling requests is typically attempted when an client is closing down.

The initiation module MUST call the MLbsSuplTiObserver::RequestComplete() with either KErrCancel or KErrNone to indicate if the cancel was successful or not. However the call to MLbsSuplTiObserver::RequestComplete() is NOT required if this function returns an error.

TLbsNetSessionId

Parameters

const TLbsNetSessionId & aSessionId The Id of the location request to be cancelled. This must be the same id used during the location request.

CloseSession()

void CloseSession ( ) [pure virtual]

This should be called when the request session is no longer required and prior to any call to ~CLbsSuplTiApi() . All the outstanding requests must be cancelled before closing the session.

The initiation module should use this opportunity to close any session and server connections it may have with any SUPL server framework.

ConstructL()

IMPORT_C void ConstructL ( ) [protected]

Leaving constructor for CLbsSuplTiApi . If required.

GetPosition(const TLbsNetSessionId &, TPositionInfoBase &)

TInt GetPosition ( const TLbsNetSessionId & aSessionId,
TPositionInfoBase & aPositionInfo
) [pure virtual]

This is an synchronous method for retrieving position information determined during RSuplTiApi::RequestLocation().

This should be called by the client once the location request has completed, because the location information will not be available or current.

The initiation module should return location information associated with the correct session given by the session ID.

TLbsNetSessionId TPositionInfoBase

Parameters

const TLbsNetSessionId & aSessionId the ID of session from which to obtain the location information.
TPositionInfoBase & aPositionInfo the returned location information.

NewL(MLbsSuplTiObserver &, TUid)

IMPORT_C CLbsSuplTiApi * NewL ( MLbsSuplTiObserver & aObserver,
TUid aEcomModuleId
) [static]

Creates an instance of the CLbsSuplTiApi implementation with the given Uid.

MLbsSuplTiObserver

Parameters

MLbsSuplTiObserver & aObserver is a pointer to the initiation module's observer. The module MUST call MLbsSuplTiObserver::RequestComplete() once the location request has been completed.
TUid aEcomModuleId is the UID of the ECOM module to load.

RequestLocation(const TLbsNetSessionId &, const TLbsNetPosRequestOptionsBase &, const TLbsNetPosRequestMethod &)

void RequestLocation ( const TLbsNetSessionId & aSessionId,
const TLbsNetPosRequestOptionsBase & aOptions,
const TLbsNetPosRequestMethod & aMethod
) [pure virtual]

RequestLocation is an asynchronous call to determine the terminal's current position information or to determine additional positioning information such as assistance data.

When the initiation module has completed the request it MUST signal this by calling MLbsSuplTiObserver::RequestComplete() .

The module may support one or more concurrent location requests, where by each request is identified by the aSessionId parameter. This session-id MUST be used when exchanging information with the SUPL server framework and returned by MLbsSuplTiObserver::RequestComplete() .

The client can cancel this request using CLbsSuplTiApi::CancelRequest() .

TLbsNetSessionId TLbsNetPosRequestOptions TLbsNetPosRequestMethod

Parameters

const TLbsNetSessionId & aSessionId is the Id of the location request. This is generated by the client and must be used by the initiation module when it performs actions releated to that request.
const TLbsNetPosRequestOptionsBase & aOptions should be of type TLbsNetPosRequestOptions. It provides information about the location request, including quality of the location required, and a flag to indicate this is the first request made by the client.
const TLbsNetPosRequestMethod & aMethod This parameter contains a list of the positioning methods that should be used to obtain the device's position.

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key [private]

Instance identifier key.

MLbsSuplTiObserver & iSuplTiObserver

MLbsSuplTiObserver & iSuplTiObserver [protected]

Observer.