|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This file defines the class for the MO-LR protocol state machine. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 @deprecated |
|
22 */ |
|
23 |
|
24 #ifndef __SUPLMTLRFSMSESSION_H__ |
|
25 #define __SUPLMTLRFSMSESSION_H__ |
|
26 |
|
27 #include "suplfsmsessionbase.h" |
|
28 #include <lbs/lbshostsettings.h> |
|
29 #include "suplinit.h" |
|
30 |
|
31 /** MT-LR protocol state machine. |
|
32 This class manages the MT-LR protocol procedure and is employed when the protocol |
|
33 module receives a SUPL INIT message. |
|
34 |
|
35 The class implements the pure virtual methods defined by CSuplFsmSessionBase. |
|
36 @see CSuplFsmSessionBase |
|
37 |
|
38 The class also implements a timer observer interface defined by MLbsCallbackTimerObserver |
|
39 @see MLbsCallbackTimerObserver |
|
40 */ |
|
41 NONSHARABLE_CLASS(CSuplMtlrFsmSession) : public CSuplFsmSessionBase |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 static CSuplMtlrFsmSession* NewL(MSuplFsmSessionObserver& aObserver); |
|
47 virtual ~CSuplMtlrFsmSession(); |
|
48 |
|
49 // CSuplFsmSessionBase pure virtual methods |
|
50 TBool SelectNextState(TBool& aForceRedo); |
|
51 void PostTransition(); |
|
52 void CancelProcedure(); |
|
53 //void DoQueuedRequest(TInt aRequest); |
|
54 |
|
55 // Called by the Protocol Manager (events from LBS) |
|
56 void MtLrReq(const TLbsNetSessionId& aSessionId, const CSuplInit* aSuplInit); |
|
57 void LocationResp(TInt aReason, const TPositionInfoBase& aPosInfo); |
|
58 void PrivacyResp(const TLbsNetSessionId& aSessionId, const CLbsNetworkProtocolBase::TLbsPrivacyResponse& aResponse); |
|
59 void AssistanceDataReq(const TLbsAssistanceDataGroup& aFilter); |
|
60 // Note: for cancelling requests from LBS PM uses base class method CancelMachine() |
|
61 |
|
62 // Derived from MSuplPositioningProtocolFsmObserver (events from the Positioning Protocol) |
|
63 void ProcessAssistanceData(const TLbsAsistanceDataGroup& aGroupMask, TInt aReason); |
|
64 void ProcessPositioningRequest(const TLbsNetPosRequestQuality& aQuality, |
|
65 const TLbsNetPosRequestMethod& aPosMethod); |
|
66 void PositioningPayloadToNetwork(const CSuplPosPayload* aPositioningPayload); |
|
67 void PositioningProtocolError(const TInt& aError); |
|
68 |
|
69 // MLbsCallbackTimerObserver methods |
|
70 void OnTimerEventL(TInt aTimerId); |
|
71 |
|
72 // Called by the state handler when the procedure ends |
|
73 void CompleteProcedure(); |
|
74 |
|
75 // Called by the state handler |
|
76 TInt GetHostId(TLbsHostSettingsId& aHostId); |
|
77 |
|
78 private: |
|
79 |
|
80 CSuplMtlrFsmSession(MSuplFsmSessionObserver& aObserver); |
|
81 void ConstructL(); |
|
82 void InitialiseProcedure(); |
|
83 void StoreNetResultLoc(const TPositionInfoBase& aPosInfo); |
|
84 void ProcessExternalLocationRequestL(const CSuplInit* aSuplInit); |
|
85 TCancelReason StoreExternalLocationRequest(const CSuplInit* aSuplInit); |
|
86 virtual TBool DetermineStateFromInitReceived(); |
|
87 virtual TBool DetermineStateFromConnectionStarted(TBool& aForceRedo); |
|
88 }; |
|
89 |
|
90 #endif // __SUPLMTLRFSMSESSION_H__ |
|
91 |