|
1 /* |
|
2 * Copyright (c) 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: The header file of CNWDynamicCapsMonitor |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CNWDYNAMICCAPSMONITOR_H |
|
21 #define CNWDYNAMICCAPSMONITOR_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CNWNetworkMonitorBase.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CNWMessageHandler; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Monitors dynamic caps change events from MMEtel. |
|
33 * Ensures that alpha tag is displayed only when CS registration is successful. |
|
34 * If PS registration is successful but CS registration failed, the alpha tag |
|
35 * should not be shown so users do not think they can make voice calls. |
|
36 * |
|
37 * @lib networkhandling.lib |
|
38 * @since Series 60_5.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CNWDynamicCapsMonitor ) : public CNWNetworkMonitorBase |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CNWDynamicCapsMonitor* NewL( |
|
48 CNWMessageHandler& aOwner, |
|
49 RMobilePhone& aPhone, |
|
50 TNWInfo& aNetworkInfo, |
|
51 RMmCustomAPI& aCustomAPI ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CNWDynamicCapsMonitor(); |
|
57 |
|
58 |
|
59 |
|
60 protected: // Functions from CActive |
|
61 /** |
|
62 * Cancels asyncronous request(s). |
|
63 * |
|
64 */ |
|
65 void DoCancel(); |
|
66 |
|
67 /** |
|
68 * Informs object that asyncronous request is ready. |
|
69 * |
|
70 */ |
|
71 void RunL(); |
|
72 |
|
73 /** |
|
74 * From CActive, RunError. |
|
75 * Processes any errors. |
|
76 * @param aError The leave code reported. |
|
77 * @result return KErrNone if leave is handled. |
|
78 */ |
|
79 TInt RunError( TInt aError ); |
|
80 |
|
81 private: |
|
82 |
|
83 /** |
|
84 * Update Dynamic Caps Flags field of TNWInfo |
|
85 * @param aDynamicCapsFlags The current dynamic caps flags. |
|
86 */ |
|
87 void UpdateDynamicCapsFlags( |
|
88 const RPacketService::TDynamicCapsFlags aDynamicCapsFlags); |
|
89 |
|
90 /** |
|
91 * Executes the NotifyDynamicCapsChange() function. |
|
92 * |
|
93 */ |
|
94 void IssueRequest(); |
|
95 |
|
96 /** |
|
97 * C++ default constructor. |
|
98 */ |
|
99 CNWDynamicCapsMonitor( |
|
100 CNWMessageHandler& aOwner, |
|
101 RMobilePhone& aPhone, |
|
102 TNWInfo& aNetworkInfo, |
|
103 RMmCustomAPI& aCustomAPI |
|
104 ); |
|
105 |
|
106 /** |
|
107 * Second-phase constructor. |
|
108 */ |
|
109 void ConstructL(); |
|
110 |
|
111 // Data: |
|
112 |
|
113 // For RPacketService call |
|
114 RPacketService iPacketService; |
|
115 // Current dynamic caps flags. |
|
116 RPacketService::TDynamicCapsFlags iDynamicCapsFlags; |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // CNWDYNAMICCAPSMONITOR_H |
|
121 |
|
122 // End of File |