|
1 // Copyright (c) 2001-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 // Contains definitions for classes that implement signal strength functionality. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalAll |
|
21 */ |
|
22 |
|
23 #ifndef CSIMSIGNALSTRENGTH_H__ |
|
24 #define CSIMSIGNALSTRENGTH_H__ |
|
25 |
|
26 #include <et_phone.h> |
|
27 #include "csimtimer.h" |
|
28 #include "CSimPubSubChange.h" |
|
29 |
|
30 class CSimPhone; |
|
31 class CTestConfigSection; |
|
32 |
|
33 /** |
|
34 * Implements the RMobilePhone based functions that constitute the signal strength |
|
35 * functionality provided by the SIM TSY. |
|
36 */ |
|
37 class CSimSignalStrength : public CBase, MTimerCallBack, MPubSubChangeCallback |
|
38 { |
|
39 public: |
|
40 static CSimSignalStrength* NewL(CSimPhone* aPhone); |
|
41 CSimSignalStrength(CSimPhone* aPhone); |
|
42 ~CSimSignalStrength(); |
|
43 TInt GetSignalCaps(TTsyReqHandle aReqHandle,TDes8* aPckg1); |
|
44 TInt GetSignalStrength(TTsyReqHandle aReqHandle,TDes8* aPckg1, TDes8* aPckg2); |
|
45 TInt NotifySignalStrengthChange(TTsyReqHandle aReqHandle,TDes8* aPckg1, TDes8* aPckg2); |
|
46 void NotifySignalStrengthChangeCancel(); |
|
47 const CTestConfigSection* CfgFile(); |
|
48 void PubSubCallback(TInt aNewVal); |
|
49 |
|
50 private: |
|
51 void ConstructL(); |
|
52 void TimerCallBack(TInt aId); |
|
53 |
|
54 private: |
|
55 CSimPhone* iPhone; // < Pointer to the parent phone class. |
|
56 CSimTimer* iTimer; // < Pointer to the owned timer class. |
|
57 struct TSignalStrengthInfo |
|
58 { |
|
59 TInt iDuration; // < Duration of signal strength level |
|
60 TInt32 iLevel; // < Signal strength level that will be maintained through period iDuration |
|
61 TInt8 iBar; // < Signal strength bar level that will be maintained through period iDuration |
|
62 TInt iErr; //< The error code to return to the client when completing the request. default is KErrNone |
|
63 }; |
|
64 CArrayFixFlat<TSignalStrengthInfo>* iSignalStrengthInfo; // < Array containing all the signal strength changes for this test. |
|
65 TInt iSSIndex; // < Current index from the iSignalStrengthInfo arrays |
|
66 TInt32 iCurrentLevel; // < Current signal strength level |
|
67 TInt8 iCurrentBar; // < Current signal strength bar level |
|
68 TInt iCurrentError; //< Current error to complete request with |
|
69 |
|
70 TBool iSSChangeNotificationPending; // < Signal Strength notification request outstanding |
|
71 TTsyReqHandle iSSChangeNotificationReqHandle; // < Signal Strength notification outstanding request handle |
|
72 TInt32* iSSChangeNotificationSSLevel; // < Signal Strength notification level pointer |
|
73 TInt8* iSSChangeNotificationSSBarLevel; // < Signal Strength notification bar pointer |
|
74 TInt iNotifyCapability; // < Signal Strength notification capability |
|
75 CSimPubSubChange* iSignalStrengthChange; |
|
76 CSimPubSubChange* iPSSignalStrengthChange; |
|
77 }; |
|
78 |
|
79 #endif |