|
1 // Copyright (c) 2006-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 // @file ctlbsconflictstepmain.h |
|
15 // This contains the header file for Location Data Source Tests |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __CT_LBS_CONFLICT_STEP_EXAMPLE_H__ |
|
20 #define __CT_LBS_CONFLICT_STEP_EXAMPLE_H__ |
|
21 |
|
22 // LBS includes. |
|
23 #include <lbs.h> |
|
24 #include <lbscommon.h> |
|
25 #include <lbs/lbsnetcommon.h> |
|
26 //#include <lbs/lbsprivacycontroller.h> |
|
27 |
|
28 // LBS test includes. |
|
29 #include "ctlbsconflictstep.h" |
|
30 #include "ctlbsconflictserver.h" |
|
31 #include "ctlbsdoposupdate.h" |
|
32 #include "ctlbsdox3p.h" |
|
33 //#include "ctlbsassdatamoduledata.h" |
|
34 |
|
35 // Literals used |
|
36 _LIT(KLbsConflictStep_Example, "LbsConflictStep_Example"); |
|
37 |
|
38 // Callbacks flags. |
|
39 //const TLbsCallbackFlags KLbsCallback_Got_NotifyUpdate = 0x1000; |
|
40 //const TLbsCallbackFlags KLbsCallback_Got_X3P = 0x4000; |
|
41 //const TLbsCallbackFlags KLbsCallback_Got_ModuleConflictAnswer = 0x2000; |
|
42 |
|
43 |
|
44 class CT_LbsConflictStep_Example : public CT_LbsConflictStep, |
|
45 public MT_LbsDoPosUpdateObserver, |
|
46 public MT_LbsDoX3PObserver |
|
47 // public MT_LbsConflictModuleDataBusObserver, |
|
48 // public MLbsPrivacyObserver |
|
49 { |
|
50 public: |
|
51 ~CT_LbsConflictStep_Example(); |
|
52 |
|
53 static CT_LbsConflictStep_Example* New(CT_LbsConflictServer& aParent); |
|
54 virtual TVerdict doTestStepL(); |
|
55 |
|
56 // From CT_LbsNetSimStep via CT_LbsConflictStep |
|
57 void Connected(); |
|
58 void Disconnected(); |
|
59 void NotifyRegisterLcsMoLr(const TDesC& aData); |
|
60 void NotifyReleaseLcsMoLr(TInt aReason); |
|
61 void NotifyMeasurementControlLocation(const TPositionInfo& aPosition, const RLbsAssistanceDataBuilderSet& aData, const TLbsNetPosRequestQuality& aQuality); |
|
62 void NotifyReleaseLcsLocationNotification(const CLbsNetworkProtocolBase::TLbsPrivacyResponse& aResult); |
|
63 void NotifyFacilityLcsMoLrResult(TInt aReason, const TPositionInfo& aPosition); |
|
64 void NotifyMeasurementReportLocation(const TPositionInfo& aPosition); |
|
65 void NotifyMeasurementReportRequestMoreAssistanceData(const TLbsAssistanceDataGroup& aFilter); |
|
66 void NotifyMeasurementReportControlFailure(TInt aReason); |
|
67 |
|
68 // From MT_LbsDoPosUpdateObserver - Position notify update callback. |
|
69 void MT_LbsDoPosUpdateCallback(TRequestStatus& aStatus); |
|
70 // put this in base class maybe !! no keep here |
|
71 |
|
72 void MT_LbsDoX3PCallback(TInt aTransmitId, TRequestStatus& aStatus); |
|
73 |
|
74 // From MT_LbsDoPosUpdateObserver - Module out data bus updated. |
|
75 // void HandleDataBusUpdateL(const TModuleDataOut& aModuleDataOut); |
|
76 |
|
77 // From MLbsPrivacyObserver. |
|
78 // void ProcessNetworkLocationRequest(TUint aRequestId, const TLbsExternalRequestInfo& aRequestInfo, const TNotificationType& aNotificationType); |
|
79 // void ProcessNetworkPositionUpdate(TUint aRequestId, const TPositionInfo& aPosInfo); |
|
80 // void ProcessRequestComplete(TUint aRequestId, TInt aReason); |
|
81 |
|
82 private: |
|
83 CT_LbsConflictStep_Example(CT_LbsConflictServer& aParent); |
|
84 void ConstructL(); |
|
85 |
|
86 void SetExpectedSeq(); |
|
87 void VerifyPosInfos(); |
|
88 |
|
89 enum { EReqPosUpdate = CT_LbsConflictStep::ELast, |
|
90 // EReqNormPos, |
|
91 EReqX3P}; |
|
92 |
|
93 |
|
94 /** Current test case being executed. |
|
95 */ |
|
96 TInt iTestCaseId; |
|
97 |
|
98 /** Active object wrapper to allow MO-LRs. |
|
99 */ |
|
100 // move to base class, no keep here |
|
101 CT_LbsDoPosUpdate* iDoPosUpdate; |
|
102 |
|
103 CT_LbsDoX3P* iDoX3P; |
|
104 // so each test writes it's own netsim func it needs, an doposupdate + dox3p |
|
105 |
|
106 |
|
107 |
|
108 /** Test module data bus monitor, to allow the module to return test status to |
|
109 the test step. |
|
110 */ |
|
111 // CT_LbsConflictModuleDataBusMonitor* iModuleDataBusMonitor; |
|
112 |
|
113 /** Privacy controller, required to preform a MT-LR. |
|
114 */ |
|
115 // CLbsPrivacyController* iPrivacyController; |
|
116 |
|
117 /** MT-LR request id, used to verify the request ids passed to MT-LR callbacks. |
|
118 */ |
|
119 // TUint iMtlrRequestId; |
|
120 |
|
121 /** Used to monitor the number of assistance data events we receviced during a test. |
|
122 */ |
|
123 // TUint iAssEventCount; |
|
124 |
|
125 }; |
|
126 |
|
127 // Helper function, to copy position infos. |
|
128 //TInt CopyPositionTypes(TPositionInfoBase& aTo, const TPositionInfoBase& aFrom); |
|
129 //TInt SupportedType(const TUint32& aType, const TInt& aSize); |
|
130 |
|
131 #endif //__CT_LBS_CONFLICT_STEP_EXAMPLE_H__ |