|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Activates the notification of gsm signal level strengths |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef VCCGSMNOTIFICATIONS_H_ |
|
21 #define VCCGSMNOTIFICATIONS_H_ |
|
22 |
|
23 #include <etelmm.h> |
|
24 |
|
25 /** |
|
26 * Observer which will receive notification about gsm signal level changes |
|
27 * |
|
28 * @lib vcchotrigger.lib |
|
29 * @since S60 3.2 |
|
30 */ |
|
31 class MVccGsmNotifications |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Constructor. |
|
36 * |
|
37 * @since S60 3.2 |
|
38 */ |
|
39 virtual void GsmStrengthChanged( TInt32 aStrength ) = 0; |
|
40 }; |
|
41 |
|
42 /** |
|
43 * Clas which starts and stops notification of the gsm signal level |
|
44 * |
|
45 * @lib vcchotrigger.lib |
|
46 * @since S60 3.2 |
|
47 */ |
|
48 class CVccGsmNotifications : public CActive |
|
49 { |
|
50 public: |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 * |
|
54 * @param aPhone RMobilePhone |
|
55 */ |
|
56 static CVccGsmNotifications* NewL( RMobilePhone& aPhone ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~CVccGsmNotifications(); |
|
62 |
|
63 /** |
|
64 * Activates gsm signal level notification |
|
65 * |
|
66 * @since S60 3.2 |
|
67 * @param aObserver observer which will receive notification |
|
68 * @param aLow value for low signal level |
|
69 * @param aHigh value for high signal level |
|
70 * |
|
71 */ |
|
72 void ActivateNotifications( MVccGsmNotifications* aObserver, TInt32 aLow, TInt32 aHigh ); |
|
73 |
|
74 /** |
|
75 * Cancels gsm signal level notification |
|
76 * |
|
77 * @since S60 3.2 |
|
78 */ |
|
79 void CancelNotifications(); |
|
80 |
|
81 protected: |
|
82 |
|
83 /** |
|
84 * Symbian second-phase constructor |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 /** |
|
89 * C++ constructor |
|
90 */ |
|
91 CVccGsmNotifications( RMobilePhone& aPhone ); |
|
92 |
|
93 private: // From CActive |
|
94 |
|
95 /** |
|
96 * @see CActive::RunL() |
|
97 */ |
|
98 void RunL(); |
|
99 |
|
100 /** |
|
101 * @see CActive::Cancel() |
|
102 */ |
|
103 void DoCancel(); |
|
104 |
|
105 private: |
|
106 /** |
|
107 * RMobilePhone handle |
|
108 * Not own |
|
109 */ |
|
110 RMobilePhone& iPhone; |
|
111 |
|
112 /** |
|
113 * Observer |
|
114 * Not own |
|
115 */ |
|
116 MVccGsmNotifications* iObserver; |
|
117 |
|
118 /** |
|
119 * Gsm signal strength value |
|
120 */ |
|
121 TInt32 iStrength; |
|
122 |
|
123 /** |
|
124 * Gsm signal bar value |
|
125 */ |
|
126 TInt8 iBar; |
|
127 |
|
128 /** |
|
129 * Gsm signal strength value for low signal level |
|
130 */ |
|
131 TInt32 iLow; |
|
132 |
|
133 /** |
|
134 * Gsm signal strength value for high signal level |
|
135 */ |
|
136 TInt32 iHigh; |
|
137 }; |
|
138 |
|
139 #endif // VCCGSMNOTIFICATIONS_H_ |