748
|
1 |
/*
|
|
2 |
* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
872
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
748
|
6 |
* which accompanies this distribution, and is available
|
872
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
748
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef __CT_LBS_CLIENT_POS_TP173_H__
|
|
21 |
#define __CT_LBS_CLIENT_POS_TP173_H__
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include "ctlbsportedstepbase.h"
|
|
25 |
#include "EPos_MPosModulesObserver.h"
|
|
26 |
|
|
27 |
// FORWARD DECLARATIONS
|
|
28 |
|
|
29 |
// CLASS DECLARATION
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Test procedure 173
|
|
33 |
*
|
|
34 |
*/
|
|
35 |
class CT_LbsClientPosTp173 : public CT_LbsPortedStepBase, public MPosModulesObserver
|
|
36 |
{
|
|
37 |
public: // Constructors and destructor
|
|
38 |
|
|
39 |
/**
|
|
40 |
* C++ default constructor.
|
|
41 |
*/
|
|
42 |
CT_LbsClientPosTp173(CT_LbsServer& aParent);
|
|
43 |
|
|
44 |
/**
|
|
45 |
* Destructor.
|
|
46 |
*/
|
|
47 |
~CT_LbsClientPosTp173();
|
|
48 |
|
|
49 |
public: // Functions from base classes
|
|
50 |
|
|
51 |
/**
|
|
52 |
* From CT_LbsPortedStepBase
|
|
53 |
* Runs the test in the module
|
|
54 |
*/
|
|
55 |
void StartL();
|
|
56 |
|
|
57 |
public: // New Functions
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Timeout request if the no notification has been sent
|
|
61 |
* by the server.
|
|
62 |
*/
|
|
63 |
void NotifyTimeout();
|
|
64 |
|
|
65 |
void HandleSettingsChangeL(TPosModulesEvent);
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Leaves if aCondition is false.
|
|
69 |
* @param aCondition something that should be true
|
|
70 |
*/
|
|
71 |
void AssertTrueL(TBool aCondition, const TDesC& errorMsg);
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Leaves if aCondition is false.
|
|
75 |
* @param aCondition something that should be true
|
|
76 |
*/
|
|
77 |
void AssertTrueSecL(TBool aCondition, const TDesC& aErrorMsg, TInt aErrorCode);
|
|
78 |
|
|
79 |
void CheckErrorL();
|
|
80 |
|
|
81 |
void DoEventHandlingL();
|
|
82 |
|
|
83 |
protected:
|
|
84 |
|
|
85 |
TBool iNoEvents;
|
|
86 |
TBool iError;
|
|
87 |
TBuf<200> iErrorText;
|
|
88 |
|
|
89 |
private:
|
|
90 |
|
|
91 |
TInt iEvent;
|
|
92 |
|
|
93 |
};
|
|
94 |
|
|
95 |
//// CLASS DECLARATION
|
|
96 |
|
|
97 |
/**
|
|
98 |
*
|
|
99 |
*/
|
|
100 |
class CMyNotificationTimer : public CTimer
|
|
101 |
{
|
|
102 |
public:
|
|
103 |
|
|
104 |
/**
|
|
105 |
* Destructor.
|
|
106 |
*/
|
|
107 |
virtual ~CMyNotificationTimer();
|
|
108 |
|
|
109 |
public:
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Two-phased constructor.
|
|
113 |
*/
|
|
114 |
static CMyNotificationTimer* NewLC(CT_LbsClientPosTp173* aMainControl);
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Two-phased constructor.
|
|
118 |
*/
|
|
119 |
static CMyNotificationTimer* NewL(CT_LbsClientPosTp173* aMainControl);
|
|
120 |
|
|
121 |
public:
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Starts the power checking timer
|
|
125 |
*/
|
|
126 |
void StartNotificationTimer();
|
|
127 |
|
|
128 |
/**
|
|
129 |
* Cancel the power checking timer.
|
|
130 |
*/
|
|
131 |
void DoCancel();
|
|
132 |
|
|
133 |
private:
|
|
134 |
|
|
135 |
/**
|
|
136 |
* EPOC constructor.
|
|
137 |
*/
|
|
138 |
void ConstructL();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* C++ default constructor.
|
|
142 |
*/
|
|
143 |
CMyNotificationTimer(CT_LbsClientPosTp173* aMainControl);
|
|
144 |
|
|
145 |
/**
|
|
146 |
* From CActive. Handles an active object’s request completion
|
|
147 |
* event.
|
|
148 |
*/
|
|
149 |
void RunL();
|
|
150 |
|
|
151 |
//Prohibit copy constructor
|
|
152 |
CMyNotificationTimer( const CMyNotificationTimer& );
|
|
153 |
// Prohibit assigment operator
|
|
154 |
CMyNotificationTimer& operator= ( const CMyNotificationTimer& );
|
|
155 |
|
|
156 |
private:
|
|
157 |
// a handler to the communicator
|
|
158 |
CT_LbsClientPosTp173* iMainControl;
|
|
159 |
TInt iNotificationTimout;
|
|
160 |
};
|
|
161 |
|
|
162 |
#endif // __CT_LBS_CLIENT_POS_TP173_H__
|
|
163 |
|
|
164 |
// End of File
|