equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005 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: Gets the Signal strength indications |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTMCSIGNAL_H |
|
20 #define BTMCSIGNAL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <etelmm.h> |
|
25 |
|
26 class CBtmcPhoneStatus; |
|
27 |
|
28 const TInt KSignalTimerTimeout = 2000000; |
|
29 /** |
|
30 * CBtmcSignal for getting signal strength. |
|
31 */ |
|
32 NONSHARABLE_CLASS(CBtmcSignal) : public CActive |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Two-phased constructor. |
|
38 */ |
|
39 static CBtmcSignal* NewL(CBtmcPhoneStatus& aParent); |
|
40 |
|
41 static CBtmcSignal* NewLC(CBtmcPhoneStatus& aParent); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 ~CBtmcSignal(); |
|
47 |
|
48 void GoActive(); |
|
49 |
|
50 /* |
|
51 * Returns current signal strength |
|
52 */ |
|
53 TInt GetSignalStrength(); |
|
54 |
|
55 TInt GetRssiStrength(); |
|
56 |
|
57 protected: |
|
58 |
|
59 /** |
|
60 * From CActive. Called when asynchronous request completes. |
|
61 * @since 3.0 |
|
62 * @param None |
|
63 * @return None |
|
64 */ |
|
65 void RunL(); |
|
66 |
|
67 void DoCancel(); |
|
68 |
|
69 TInt RunError(TInt aErr); |
|
70 |
|
71 private: |
|
72 |
|
73 /** |
|
74 * C++ default constructor. |
|
75 */ |
|
76 CBtmcSignal(CBtmcPhoneStatus& aParent); |
|
77 |
|
78 void ConstructL(); |
|
79 |
|
80 void ConvertToHFPScale(TInt8 &aSignal); |
|
81 |
|
82 private: |
|
83 CBtmcPhoneStatus& iParent; |
|
84 RTelServer iServer; |
|
85 RMobilePhone iPhone; |
|
86 TInt32 iDbm; |
|
87 TInt8 iBars; |
|
88 TInt8 iPreviousBars; |
|
89 }; |
|
90 |
|
91 |
|
92 #endif |