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
Public Member Functions | |
---|---|
IMPORT_C void | CancelExternalLocation(const TLbsNetSessionId &, TInt) |
IMPORT_C TAny * | ExtendedInterface(TInt, TAny *, TAny *) |
IMPORT_C void | RequestAssistanceData(TLbsAsistanceDataGroup, const TLbsNetSessionIdArray &) |
IMPORT_C void | RequestTransmitLocation(const TLbsNetSessionId &, const TDesC &, TInt, const TLbsNetPosRequestOptionsBase &) |
IMPORT_C void | RespondPrivacyRequest(const TLbsNetSessionId &, const TLbsPrivacyResponse &, TInt) |
Private Member Functions | |
---|---|
IMPORT_C void | RequestAssistanceData(TLbsAsistanceDataGroup) |
IMPORT_C void | RequestTransmitLocation(const TLbsNetSessionId &, const TDesC &, TInt) |
IMPORT_C void | RespondPrivacyRequest(const TLbsNetSessionId &, const TLbsPrivacyResponse &) |
Inherited Enumerations | |
---|---|
CLbsNetworkProtocolBase:TExtInterface | |
CLbsNetworkProtocolBase:TLbsPrivacyResponse | |
CLbsNetworkProtocolBase:TLbsSystemStatus |
IMPORT_C void | CancelExternalLocation | ( | const TLbsNetSessionId & | aSessionId, |
TInt | aReason | |||
) | [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()
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. |
IMPORT_C TAny * | ExtendedInterface | ( | TInt | aFunctionNumber, |
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.
IMPORT_C void | RequestAssistanceData | ( | TLbsAsistanceDataGroup | aDataRequestMask, |
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.
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. |
IMPORT_C void | RequestAssistanceData | ( | TLbsAsistanceDataGroup | aDataRequestMask | ) | [private, virtual] |
It is the original CLbsNetworkProtocolBase::RequestAssistanceData() method and is not supported by this version of the interface.
See the new, public overload.
TLbsAsistanceDataGroup aDataRequestMask |
IMPORT_C void | RequestTransmitLocation | ( | const TLbsNetSessionId & | aSessionId, |
const TDesC & | aDestination, | |||
TInt | aPriority, | |||
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()
const TLbsNetSessionId & aSessionId | Contains 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 & aDestination | Specifies the remote third-party that is the target for the location information transfer. |
TInt aPriority | A protocol specific value that determines the precedence of the request. A high priority may result in the currently active request being stopped. |
const TLbsNetPosRequestOptionsBase & aOptions | This must be of type TLbsNetPosRequestOptionsTechnology. |
IMPORT_C void | RequestTransmitLocation | ( | const TLbsNetSessionId & | aSessionId, |
const TDesC & | aDestination, | |||
TInt | aPriority | |||
) | [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()
const TLbsNetSessionId & aSessionId | Contains 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 & aDestination | Specifies the remote third-party that is the target for the location information transfer. |
TInt aPriority | A protocol specific value that determines the precedence of the request. A high priority may result in the currently active request being stopped. |
IMPORT_C void | RespondPrivacyRequest | ( | const TLbsNetSessionId & | aSessionId, |
const TLbsPrivacyResponse & | aResponse, | |||
TInt | aReason | |||
) | [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.
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. |
IMPORT_C void | RespondPrivacyRequest | ( | 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.
const TLbsNetSessionId & aSessionId | |
const TLbsPrivacyResponse & aResponse |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.