CLbsNetworkProtocolBase2 Class Reference

class CLbsNetworkProtocolBase2 : public CLbsNetworkProtocolBase

CLbsNetworkProtocolBase2 is an extended version of CLbsNetworkProtocolBase, adding extended versions of the methods RequestTransmitLocation(), RespondPrivacyRequest() and RequestAssistanceData().

To determine whether a CLbsNetworkProtocolBase object supports this interface, call the ExtendedInterface method specifying ETransmitLocationOptionsExtendedInterface as the function number.

MLbsNetworkProtocolBase2

Inherits from

Public Member Functions
IMPORT_C voidCancelExternalLocation(const TLbsNetSessionId &, TInt)
IMPORT_C TAny *ExtendedInterface(TInt, TAny *, TAny *)
IMPORT_C voidRequestAssistanceData(TLbsAsistanceDataGroup, const TLbsNetSessionIdArray &)
IMPORT_C voidRequestTransmitLocation(const TLbsNetSessionId &, const TDesC &, TInt, const TLbsNetPosRequestOptionsBase &)
IMPORT_C voidRespondPrivacyRequest(const TLbsNetSessionId &, const TLbsPrivacyResponse &, TInt)
Private Member Functions
IMPORT_C voidRequestAssistanceData(TLbsAsistanceDataGroup)
IMPORT_C voidRequestTransmitLocation(const TLbsNetSessionId &, const TDesC &, TInt)
IMPORT_C voidRespondPrivacyRequest(const TLbsNetSessionId &, const TLbsPrivacyResponse &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CLbsNetworkProtocolBase::AdviceSystemStatus(TLbsSystemStatus)
CLbsNetworkProtocolBase::CancelNetworkLocation(const TLbsNetSessionId &,TInt)
CLbsNetworkProtocolBase::CancelSelfLocation(const TLbsNetSessionId &,TInt)
CLbsNetworkProtocolBase::CancelTransmitLocation(const TLbsNetSessionId &,TInt)
CLbsNetworkProtocolBase::NewL(TUid,TLbsNetProtocolModuleParams &)
CLbsNetworkProtocolBase::RequestNetworkLocation(const TLbsNetSessionId &,const TLbsNetPosRequestOptionsBase &)
CLbsNetworkProtocolBase::RequestSelfLocation(const TLbsNetSessionId &,const TLbsNetPosRequestOptionsBase &)
CLbsNetworkProtocolBase::RespondLocationRequest(const TLbsNetSessionId &,TInt,const TPositionInfoBase &)
CLbsNetworkProtocolBase::~CLbsNetworkProtocolBase()
Inherited Enumerations
CLbsNetworkProtocolBase:TExtInterface
CLbsNetworkProtocolBase:TLbsPrivacyResponse
CLbsNetworkProtocolBase:TLbsSystemStatus

Member Functions Documentation

CancelExternalLocation(const TLbsNetSessionId &, TInt)

IMPORT_C voidCancelExternalLocation(const TLbsNetSessionId &aSessionId,
TIntaReason
)[virtual]

CancelExternalLocation() is called by the LBS subsystem to instruct the Protocol Module to stop an ongoing MT-LR session.

Normally after receiving the cancel request the Protocol Module should complete the session by calling MLbsNetworkProtocolObserver::ProcessSessionComplete() with KErrCancel reason code, however if a cancel request is too late (e.g. a position has already been calculated and sent to the network), MLbsNetworkProtocolObserver::ProcessSessionComplete() may be called with the KErrNone reason code indicating the success of the session.

It is also acceptable that the Protocol Module returns some extra information, such as a reference location or assistance data before completing the session.

MLbsNetworkProtocolObserver::ProcessPrivacyRequest() CLbsNetworkProtocolBase::RespondLocationRequest()

Parameters

const TLbsNetSessionId & aSessionId[In] Is the same session identifier that was passed by the protocol module when it called MLbsNetworkProtocolObserver::ProcessPrivacyRequest() to start external positioning.
TInt aReason[In] KErrCancel if the session has been cancelled explicitly by a user or by an application acting on behalf of a user. KErrPositionHighPriorityReceive if the session has been cancelled due to a conflict with a session of higher priority.

ExtendedInterface(TInt, TAny *, TAny *)

IMPORT_C TAny *ExtendedInterface(TIntaFunctionNumber,
TAny *aPtr1,
TAny *aPtr2
)[virtual]

This method is used to retrieve pointers to extended interfaces, if supported by derived classes.

This method is used to retrieve pointers to extended interfaces, if supported by derived classes.

Parameters

TInt aFunctionNumberThe identifier of the extended interface.
TAny * aPtr1Reserved for future expansion.
TAny * aPtr2Reserved for future expansion.

RequestAssistanceData(TLbsAsistanceDataGroup, const TLbsNetSessionIdArray &)

IMPORT_C voidRequestAssistanceData(TLbsAsistanceDataGroupaDataRequestMask,
const TLbsNetSessionIdArray &aSessionIdArray
)[pure virtual]

A new, extended version of the CLbsNetworkProtocolBase::RequestAssistanceData() method. The only difference between the original and the new version of the method is an extra parameter that provides a Protocol Module with a list of sessions the request is related to.

Currently the functionality of this method is identical to the CLbsNetworkProtocolBase::RequestAssistanceData() and the aSessionIdArray parameter should be ignored.

In the future the list of session ids may be used to allow a Protocol Module supporting concurrent positioning sessions to avoid requesting assistance data from remote peers (e.g. SUPL servers) that do not have an outstanding location request (CLbsNetworkProtocolBase::ProcessLocationRequest() has not been invoked yet) or the LBS subsystem has not started processing the request yet.

Please note that the LBS subsystem combines all concurrent location requests, therefore the required set of assistance data is not session specific. This means that a remote peer may be asked for more assistance data items than it actually supports.

CLbsNetworkProtocolBase::RequestAssistanceData()

Parameters

TLbsAsistanceDataGroup aDataRequestMask[In] Is a bitmask that specifies which subsets of GPS assistance data are required. If aDataRequestMask is set to zero, this indicates that no further assistance data is needed.
const TLbsNetSessionIdArray & aSessionIdArray[In] A list of session ids the assistance data is related to. The parameter is currently not supported and should be ignored.

RequestAssistanceData(TLbsAsistanceDataGroup)

IMPORT_C voidRequestAssistanceData(TLbsAsistanceDataGroupaDataRequestMask)[private, virtual]

It is the original CLbsNetworkProtocolBase::RequestAssistanceData() method and is not supported by this version of the interface.

See the new, public overload.

Parameters

TLbsAsistanceDataGroup aDataRequestMask

RequestTransmitLocation(const TLbsNetSessionId &, const TDesC &, TInt, const TLbsNetPosRequestOptionsBase &)

IMPORT_C voidRequestTransmitLocation(const TLbsNetSessionId &aSessionId,
const TDesC &aDestination,
TIntaPriority,
const TLbsNetPosRequestOptionsBase &aOptions
)[pure virtual]

RequestTransmitLocation() is called by the LBS subsystem to instruct the protocol module to send the device's position to a remote third-party.

This method automatically cancels any outstanding transmit request and replaces it with the new request.

The parameter aSessionId is generated by the LBS subsystem and is used to connect all corresponding responses and further requests. The same session ID will be used by the LBS subsystem itself in subsequent calls to the protocol module via CLbsNetworkProtocolBase. The same session ID must also be supplied by the protocol module when it responds to the LBS subsystem or issues related requests via MLbsNetworkProtocolObserver.

For example, a request to transmit the location will normally result in the network generating a location request to determine the terminal's current position. This location request is passed to the LBS subsystem via MLbsNetworkProtocolObserver::ProcessLocationRequest() using the session-id as the initiating RequestTransmitLocation().

Note: If the LBS subsystem does wish to cancel a currently active transmit request and immediately replace it with a new request it should only use RequestTransmitLocation(). It should not attempt to explicitly cancel the outstanding request using CancelTransmitLocation(). Issuing a cancel and then submitting a subsequent transmit request can lead to inefficiencies at the network protocol level.

CancelTransmitRequest() MLbsNetworkProtocolObserver::ProcessLocationRequest() MLbsNetworkProtocolObserver::ProcessSessionComplete()

Parameters

const TLbsNetSessionId & aSessionIdContains the session identifier. The session identifier is generated by the LBS susbsystem and is used in all corresponding and subsequent responses and requests.
const TDesC & aDestinationSpecifies the remote third-party that is the target for the location information transfer.
TInt aPriorityA protocol specific value that determines the precedence of the request. A high priority may result in the currently active request being stopped.
const TLbsNetPosRequestOptionsBase & aOptionsThis must be of type TLbsNetPosRequestOptionsTechnology.

RequestTransmitLocation(const TLbsNetSessionId &, const TDesC &, TInt)

IMPORT_C voidRequestTransmitLocation(const TLbsNetSessionId &aSessionId,
const TDesC &aDestination,
TIntaPriority
)[private, virtual]

RequestTransmitLocation() is called by the LBS subsystem to instruct the protocol module to send the device's position to a remote third-party.

New code should use the extended version of this method defined below.

CancelTransmitRequest() MLbsNetworkProtocolObserver::ProcessLocationRequest() MLbsNetworkProtocolObserver::ProcessSessionComplete()

Parameters

const TLbsNetSessionId & aSessionIdContains the session identifier. The session identifier is generated by the LBS susbsystem and is used in all corresponding and subsequent responses and requests.
const TDesC & aDestinationSpecifies the remote third-party that is the target for the location information transfer.
TInt aPriorityA protocol specific value that determines the precedence of the request. A high priority may result in the currently active request being stopped.

RespondPrivacyRequest(const TLbsNetSessionId &, const TLbsPrivacyResponse &, TInt)

IMPORT_C voidRespondPrivacyRequest(const TLbsNetSessionId &aSessionId,
const TLbsPrivacyResponse &aResponse,
TIntaReason
)[pure virtual]

The basic functionality of the RespondPrivacyRequest method is identical to the one defined by CLbsNetworkProtocolBase::RespondPrivacyRequest(). The only extension is a response reason code providing additional information if a privacy request has been rejected.

CLbsNetworkProtocolBase::RespondPrivacyRequest()

Parameters

const TLbsNetSessionId & aSessionId[In] Is the same session identifier was passed by the protocol module when it called the MLbsNetworkProtocolObserver::ProcessPrivacyRequest() privacy request
const TLbsPrivacyResponse & aResponse[In] The response to the privacy request to send to the network. This indicates whether the terminal has accepted or rejected the request for its current location.
TInt aReason[In] If a request has been accepted the reason code is always KErrNone. In case of a rejection the following are possible. KErrNone if the corresponding request has been rejected by a user; KErrServerBusy if the corresponding request has been rejected because the LBS subsystem is processing another request; KErrPositionHighPriorityReceive if processing the corresponding request has been stopped because the LBS subsystem received a request of higher priority; KErrArgument if the request contained an unrecognised argument; KErrNotSupported if the requested advice type is not supported by the LBS Subsystem, eg "Stealth Mode"; KErrGeneral if the LBS Subsystem has suffered a runtime error.

RespondPrivacyRequest(const TLbsNetSessionId &, const TLbsPrivacyResponse &)

IMPORT_C voidRespondPrivacyRequest(const TLbsNetSessionId &aSessionId,
const TLbsPrivacyResponse &aResponse
)[private, virtual]

It is the original CLbsNetworkProtocolBase::RespondPrivacyRequest() method and is not supported by this version of the interface.

See the new, public overload.

Parameters

const TLbsNetSessionId & aSessionId
const TLbsPrivacyResponse & aResponse