|
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 ctlbsclientstepcellbasednpud.h |
|
15 // This contains the header file for Notify Position Update Tests |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __CT_LBS_CLIENT_STEP_CELLBASED_NOTIFY_POS_UPDATE_H__ |
|
20 #define __CT_LBS_CLIENT_STEP_CELLBASED_NOTIFY_POS_UPDATE_H__ |
|
21 |
|
22 #include "ctlbsclientstep.h" |
|
23 #include "ctlbsclientserver.h" |
|
24 #include "ctlbsclientnotifyposupdao.h" |
|
25 #include "ctlbsnetsimstep.h" |
|
26 #include "ctlbsdoposupdate.h" |
|
27 |
|
28 #include <lbs/lbsadmin.h> |
|
29 #include <lbs/test/lbsnetsimtest.h> |
|
30 |
|
31 // Literals used |
|
32 _LIT(KLbsClientStep_CellBasedNotifyPosUpdate, "LbsClientStep_CellBasedNotifyPosUpdate"); |
|
33 |
|
34 const TLbsCallbackFlags KLbsCallback_Got_NotifyPositionUpdate = 0x1000; |
|
35 |
|
36 class CT_LbsClientStep_CellBasedNotifyPosUpdate : public CT_LbsNetSimStep, |
|
37 public MT_LbsDoPosUpdateObserver |
|
38 { |
|
39 public: |
|
40 ~CT_LbsClientStep_CellBasedNotifyPosUpdate(); |
|
41 |
|
42 static CT_LbsClientStep_CellBasedNotifyPosUpdate* New(CT_LbsClientServer& aParent); |
|
43 virtual TVerdict doTestStepL(); |
|
44 |
|
45 // From CT_LbsNetSimStep: |
|
46 void Connected(); |
|
47 void Disconnected(); |
|
48 void NotifyRegisterLcsMoLr(const TDesC& aData); |
|
49 void NotifyReleaseLcsMoLr(TInt aReason); |
|
50 void NotifyMeasurementControlLocation(const TPositionInfo& aPosition, const RLbsAssistanceDataBuilderSet& aData, const TLbsNetPosRequestQuality& aQuality); |
|
51 void NotifyReleaseLcsLocationNotification(const CLbsNetworkProtocolBase::TLbsPrivacyResponse& aResult); |
|
52 void NotifyFacilityLcsMoLrResult(TInt aReason, const TPositionInfo& aPosition); |
|
53 void NotifyMeasurementReportLocation(const TPositionInfo& aPosition); |
|
54 void NotifyMeasurementReportRequestMoreAssistanceData(const TLbsAssistanceDataGroup& aFilter); |
|
55 void NotifyMeasurementReportControlFailure(TInt aReason); |
|
56 void NotifyError(MLbsNetSimTestObserver::EFunction aFunction, int aError); |
|
57 void ProcessMeasurementControlLocationError(TInt aError); |
|
58 |
|
59 |
|
60 // From MT_LbsDoPosUpdateObserver: |
|
61 void MT_LbsDoPosUpdateCallback(TRequestStatus& aStatus); |
|
62 |
|
63 |
|
64 private: |
|
65 CT_LbsClientStep_CellBasedNotifyPosUpdate(CT_LbsClientServer& aParent); |
|
66 |
|
67 void ConstructL(); |
|
68 |
|
69 private: |
|
70 |
|
71 // whether the network should be available |
|
72 TBool iNetworkUnavailable; |
|
73 |
|
74 // whether (and when) the request should be cancelled |
|
75 TBool iCancel; |
|
76 TBool iCancelBeforePosUpdate; |
|
77 TBool iCancelOnPosUpdate; |
|
78 TBool iIsCancelTest; |
|
79 TBool iMultiReq; |
|
80 |
|
81 // to allow us to set a ref location in NetSim for network-based updates and monitor network: |
|
82 RLbsNetSimTest iNetSim; |
|
83 |
|
84 CT_LbsClientServer& iParent; |
|
85 |
|
86 CT_LbsDoPosUpdate* iDoPosUpdate; |
|
87 |
|
88 // Number of NotifyPositionUpdates the test case should do |
|
89 TUint iNumNPUDs; |
|
90 }; |
|
91 |
|
92 #endif //__CT_LBS_CLIENT_STEP_CELLBASED_NOTIFY_POS_UPDATE_H__ |