24
|
1 |
/*
|
|
2 |
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CMMPRIVATEUTILITY_H
|
|
21 |
#define CMMPRIVATEUTILITY_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <et_phone.h>
|
|
25 |
#include <e32base.h>
|
|
26 |
#include <ctsy/serviceapi/cmmutility.h>
|
|
27 |
#include "mmgsmwcdmaprivateutils.h"
|
|
28 |
|
|
29 |
// DATA TYPES
|
|
30 |
|
|
31 |
/** Tsy error values*/
|
|
32 |
enum TMmTsyError
|
|
33 |
{
|
|
34 |
EIllegalTsyReqHandle,
|
|
35 |
EIllegalPanicOccurredValue,
|
|
36 |
EIllegalOwnedState,
|
|
37 |
ENotificationsRemaining,
|
|
38 |
ELastEventsRemaining,
|
|
39 |
ECallsRemaining,
|
|
40 |
EPtrNull,
|
|
41 |
ERelinquishOwnershipWithNoCall,
|
|
42 |
EIllegalTsyNameInConnectedModemRecord,
|
|
43 |
EIllegalCallDuration,
|
|
44 |
EIllegalEvent,
|
|
45 |
EPreAllocatedCallDoesNotExist,
|
|
46 |
ENewCallDoesNotExist,
|
|
47 |
ECallNameAlreadyExists,
|
|
48 |
ERingingCallNotFound,
|
|
49 |
ELineAlreadyExists,
|
|
50 |
EAcquirerNotFound,
|
|
51 |
EDataPortPtrNotValid,
|
|
52 |
};
|
|
53 |
|
|
54 |
/** Diagnostics for supplementary services*/
|
|
55 |
enum TDiagnosticInfoValues
|
|
56 |
{
|
|
57 |
KDiagnosticInfoBarredWithCUG = 0x81,
|
|
58 |
KDiagnosticInfoBarredNoCUG = 0x82,
|
|
59 |
KDiagnosticInfoBarredUnknownCUG = 0x83,
|
|
60 |
KDiagnosticInfoBarredIncompatibleCUG = 0x84,
|
|
61 |
KDiagnosticInfoBarredFailureCUG = 0x85,
|
|
62 |
KDiagnosticInfoBarredClirNotSubscribed = 0x86,
|
|
63 |
KDiagnosticInfoBarredCCBSPossible = 0x87,
|
|
64 |
KDiagnosticInfoBarredCCBSNotPossible = 0x88
|
|
65 |
};
|
|
66 |
|
|
67 |
// FUNCTION PROTOTYPES
|
|
68 |
void MmTsyPanic( TMmTsyError aMmTsyError );
|
|
69 |
void MmTsyLeaveL( TMmTsyError aMmTsyError );
|
|
70 |
|
|
71 |
// FORWARD DECLARATIONS
|
|
72 |
class CMmSmsMessHandlerGsmExt;
|
|
73 |
class CMmSmsTsy;
|
|
74 |
class CMmPhoneTsy;
|
|
75 |
class CMmCallTsy;
|
|
76 |
class CAcquireOwnerList;
|
|
77 |
class CMmCallExtInterface;
|
|
78 |
class CMmPacketContextTsy;
|
|
79 |
|
|
80 |
// CLASS DECLARATION
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Available network info
|
|
84 |
*/
|
|
85 |
NONSHARABLE_CLASS( CNetNetworkAvailableInfo ) : public CBase
|
|
86 |
{
|
|
87 |
public: // Constructors and destructor
|
|
88 |
|
|
89 |
/**
|
|
90 |
* C++ default constructor.
|
|
91 |
*/
|
|
92 |
CNetNetworkAvailableInfo();
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Destructor.
|
|
96 |
*/
|
|
97 |
~CNetNetworkAvailableInfo();
|
|
98 |
|
|
99 |
public: // Data
|
|
100 |
|
|
101 |
/**
|
|
102 |
* int to hold network status
|
|
103 |
*/
|
|
104 |
TUint8 iNetworkStatus;
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Index of this info object
|
|
108 |
*/
|
|
109 |
TUint8 iIndex;
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Network's display name
|
|
113 |
*/
|
|
114 |
RMobilePhone::TMobilePhoneNetworkDisplayTag iAlphaTag;
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Variable for network's long name
|
|
118 |
*/
|
|
119 |
RMobilePhone::TMobilePhoneNetworkLongName iLongName;
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Operator code
|
|
123 |
*/
|
|
124 |
TBuf8<8> iOperatorCode;
|
|
125 |
|
|
126 |
/**
|
|
127 |
* GSM bandwidth info variable
|
|
128 |
*/
|
|
129 |
TUint8 iGsmBandInfo;
|
|
130 |
|
|
131 |
};
|
|
132 |
|
|
133 |
/**
|
|
134 |
* List reader object
|
|
135 |
*/
|
|
136 |
NONSHARABLE_CLASS( CListReadAllAttempt ) : public CBase
|
|
137 |
{
|
|
138 |
public: // Constructors and destructor
|
|
139 |
|
|
140 |
/**
|
|
141 |
* Two-phased constructor.
|
|
142 |
*/
|
|
143 |
static CListReadAllAttempt* NewL( RMobilePhone::TClientId* aId );
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Destructor.
|
|
147 |
*/
|
|
148 |
~CListReadAllAttempt();
|
|
149 |
|
|
150 |
protected:
|
|
151 |
|
|
152 |
/**
|
|
153 |
* C++ default constructor.
|
|
154 |
*/
|
|
155 |
CListReadAllAttempt( RMobilePhone::TClientId* aId );
|
|
156 |
|
|
157 |
private:
|
|
158 |
|
|
159 |
/**
|
|
160 |
* By default Symbian 2nd phase constructor is private.
|
|
161 |
*/
|
|
162 |
void ConstructL();
|
|
163 |
|
|
164 |
public: // Data
|
|
165 |
|
|
166 |
/**
|
|
167 |
* list
|
|
168 |
*/
|
|
169 |
CBufBase* iListBuf;
|
|
170 |
|
|
171 |
/**
|
|
172 |
* Client ID
|
|
173 |
*/
|
|
174 |
RMobilePhone::TClientId iClient;
|
|
175 |
};
|
|
176 |
|
|
177 |
/**
|
|
178 |
* ReqHandle entry for call ownership list
|
|
179 |
*/
|
|
180 |
NONSHARABLE_CLASS( CAcquireEntry ) : public CBase
|
|
181 |
{
|
|
182 |
public: // Constructors and destructor
|
|
183 |
|
|
184 |
/**
|
|
185 |
* Two-phased constructor.
|
|
186 |
*/
|
|
187 |
static CAcquireEntry* NewL( const TTsyReqHandle aTsyReqHandle );
|
|
188 |
|
|
189 |
/**
|
|
190 |
* C++ default constructor.
|
|
191 |
*/
|
|
192 |
CAcquireEntry( const TTsyReqHandle aTsyReqHandle );
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Destructor.
|
|
196 |
*/
|
|
197 |
~CAcquireEntry();
|
|
198 |
|
|
199 |
// New functions
|
|
200 |
|
|
201 |
void Deque();
|
|
202 |
|
|
203 |
public:
|
|
204 |
|
|
205 |
/**
|
|
206 |
* TSY request handle
|
|
207 |
*/
|
|
208 |
TTsyReqHandle iTsyReqHandle;
|
|
209 |
|
|
210 |
private:
|
|
211 |
|
|
212 |
/**
|
|
213 |
* Double queue link
|
|
214 |
*/
|
|
215 |
TDblQueLink iLink;
|
|
216 |
|
|
217 |
friend class CAcquireOwnerList;
|
|
218 |
};
|
|
219 |
|
|
220 |
/**
|
|
221 |
* Call ownership change request list
|
|
222 |
*/
|
|
223 |
NONSHARABLE_CLASS( CAcquireOwnerList ) : public CBase
|
|
224 |
{
|
|
225 |
public: // Constructors and destructor
|
|
226 |
|
|
227 |
/**
|
|
228 |
* Two-phased constructor.
|
|
229 |
*/
|
|
230 |
static CAcquireOwnerList* NewL();
|
|
231 |
|
|
232 |
/**
|
|
233 |
* C++ default constructor.
|
|
234 |
*/
|
|
235 |
CAcquireOwnerList();
|
|
236 |
|
|
237 |
/**
|
|
238 |
* Destructor.
|
|
239 |
*/
|
|
240 |
~CAcquireOwnerList();
|
|
241 |
|
|
242 |
/**
|
|
243 |
* Symbian 2nd phase constructor.
|
|
244 |
*/
|
|
245 |
void ConstructL();
|
|
246 |
|
|
247 |
/**
|
|
248 |
* Find by TSY request handle
|
|
249 |
*
|
|
250 |
*
|
|
251 |
* @return acquire entry
|
|
252 |
*/
|
|
253 |
CAcquireEntry* FindByTsyReqHandle(
|
|
254 |
const TTsyReqHandle aTsyReqHandle );
|
|
255 |
|
|
256 |
/**
|
|
257 |
* Remove acquire entry
|
|
258 |
*
|
|
259 |
*
|
|
260 |
*/
|
|
261 |
void Remove( CAcquireEntry* aEntry );
|
|
262 |
|
|
263 |
public: // Data
|
|
264 |
|
|
265 |
/**
|
|
266 |
* acquire list
|
|
267 |
*/
|
|
268 |
TDblQue<CAcquireEntry> iAcquireList;
|
|
269 |
};
|
|
270 |
|
|
271 |
/**
|
|
272 |
* Second counter
|
|
273 |
*/
|
|
274 |
NONSHARABLE_CLASS( CHeartbeatRunner ) : public CBase, public MBeating
|
|
275 |
{
|
|
276 |
public: // Constructors and destructor
|
|
277 |
|
|
278 |
/**
|
|
279 |
* Two-phased constructor.
|
|
280 |
*/
|
|
281 |
static CHeartbeatRunner* NewL( CMmCallTsy* aMmCall, CMmPhoneTsy* aMmPhone = NULL );
|
|
282 |
|
|
283 |
/**
|
|
284 |
* Destructor
|
|
285 |
*/
|
|
286 |
virtual ~CHeartbeatRunner();
|
|
287 |
|
|
288 |
// New functions
|
|
289 |
|
|
290 |
/**
|
|
291 |
* Start timer
|
|
292 |
*
|
|
293 |
*
|
|
294 |
*/
|
|
295 |
void Start();
|
|
296 |
|
|
297 |
/**
|
|
298 |
* Start timer
|
|
299 |
*
|
|
300 |
*
|
|
301 |
*/
|
|
302 |
void StartAirTimeDuration();
|
|
303 |
|
|
304 |
/**
|
|
305 |
* Stop timer
|
|
306 |
*
|
|
307 |
*
|
|
308 |
* @return TBool: True if heart beat runner was started
|
|
309 |
*/
|
|
310 |
TBool Stop();
|
|
311 |
|
|
312 |
/**
|
|
313 |
* Called when we need to synchronize
|
|
314 |
*
|
|
315 |
*
|
|
316 |
*/
|
|
317 |
void Synchronize();
|
|
318 |
|
|
319 |
/**
|
|
320 |
* Returns number of beats from the previous Start of the timer.
|
|
321 |
*
|
|
322 |
*
|
|
323 |
* @return number of beats from previous Start of the timer
|
|
324 |
*/
|
|
325 |
TInt NumberOfBeats();
|
|
326 |
|
|
327 |
/**
|
|
328 |
* returns a pointer to iStartTime
|
|
329 |
*
|
|
330 |
*
|
|
331 |
* @return a pointer to iStartTime
|
|
332 |
*/
|
|
333 |
TTime* GetTimerStartTime();
|
|
334 |
|
|
335 |
private:
|
|
336 |
|
|
337 |
/**
|
|
338 |
* Default constructor
|
|
339 |
*/
|
|
340 |
CHeartbeatRunner();
|
|
341 |
|
|
342 |
/**
|
|
343 |
* 2nd phase of the construction
|
|
344 |
*/
|
|
345 |
void ConstructL();
|
|
346 |
|
|
347 |
/**
|
|
348 |
* Called when beat works ok, once every second
|
|
349 |
*
|
|
350 |
*
|
|
351 |
*/
|
|
352 |
void Beat();
|
|
353 |
|
|
354 |
private: // Data
|
|
355 |
|
|
356 |
/**
|
|
357 |
* Timer
|
|
358 |
* Not own.
|
|
359 |
*/
|
|
360 |
CHeartbeat* iHeartbeat;
|
|
361 |
|
|
362 |
/**
|
|
363 |
* Pointer to call object
|
|
364 |
* No own.
|
|
365 |
*/
|
|
366 |
CMmCallTsy* iMmCall;
|
|
367 |
|
|
368 |
/**
|
|
369 |
* Pointer to phone object
|
|
370 |
* No own.
|
|
371 |
*/
|
|
372 |
CMmPhoneTsy* iMmPhone;
|
|
373 |
|
|
374 |
/**
|
|
375 |
* flag that indicates is this timer active
|
|
376 |
*/
|
|
377 |
TBool iActive;
|
|
378 |
|
|
379 |
/**
|
|
380 |
* Start time of timer
|
|
381 |
*/
|
|
382 |
TTime iStartTime;
|
|
383 |
|
|
384 |
/**
|
|
385 |
* Air time durationf flag
|
|
386 |
*/
|
|
387 |
TBool iAirTimeDuration;
|
|
388 |
|
|
389 |
/**
|
|
390 |
* Number of beats of the previous Start->Stop cycle
|
|
391 |
*/
|
|
392 |
TInt iPreviousNumberOfBeats;
|
|
393 |
|
|
394 |
};
|
|
395 |
|
|
396 |
#endif // CMMPRIVATEUTILITY_H
|
|
397 |
|
|
398 |
// End of File
|