1 /* |
|
2 * Copyright (c) 2004-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: Provides DOS emergency number policy API. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CDOSEMERGENCYNUMBERPOLICY_H |
|
21 #define CDOSEMERGENCYNUMBERPOLICY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <cemergencynumberpolicy.h> |
|
25 #include <rmmcustomapi.h> |
|
26 #include <cenrepnotifyhandler.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 //None. |
|
30 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * CDosEmergencyNumberPolicy |
|
36 * Description: Defines DOS emergency number policy. |
|
37 * |
|
38 * @since Series60_2.6 |
|
39 */ |
|
40 |
|
41 NONSHARABLE_CLASS( CDosEmergencyNumberPolicy ) : |
|
42 public CEmergencyNumberPolicy, |
|
43 private MCenRepNotifyHandlerCallback |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CDosEmergencyNumberPolicy(); |
|
51 |
|
52 public: // New |
|
53 |
|
54 /** |
|
55 * Symbian 2nd phase constructor. |
|
56 * @param aETelServer a reference of RTelServer. |
|
57 */ |
|
58 void ConstructL( RTelServer& aETelServer ); |
|
59 |
|
60 /** |
|
61 * Emergency number check. |
|
62 * @since Series60_2.6 |
|
63 * @param aTelNumber a telephone number to be checked. |
|
64 * @param aMode a check mode, Normal/Advanced. |
|
65 * @param aIsEmergencyNumber return True if the number is emergency. |
|
66 * @return error code. |
|
67 */ |
|
68 TInt IsEmergencyNumber( |
|
69 TPhCltTelephoneNumber& aTelNumber, |
|
70 TPhCltEmergencyNumberQueryMode aMode, |
|
71 TBool& aIsEmergencyNumber ); |
|
72 |
|
73 private: // New |
|
74 |
|
75 /** |
|
76 * Reads product specific numbers. |
|
77 * |
|
78 * @return None. |
|
79 */ |
|
80 void ReadProductSpecificNumbers(); |
|
81 |
|
82 /** |
|
83 * Is number in current list with normal mode. |
|
84 * |
|
85 * @param aNumber This is number to be checked. |
|
86 * @return Returns ETrue if in list, otherwice EFalse. |
|
87 */ |
|
88 TBool IsInListByNormalMode ( const TDesC& aNumber ); |
|
89 |
|
90 /** |
|
91 * Is number in current list with advanced mode. |
|
92 * |
|
93 * @param aNumber This is number to be checked. |
|
94 * @return Returns ETrue if in list, otherwice EFalse. |
|
95 */ |
|
96 TBool IsInListByAdvancedMode ( TDes& aNumber ); |
|
97 |
|
98 /** |
|
99 * Parses number in corrent format to be checked as |
|
100 * emergency number. |
|
101 * |
|
102 * @since 3.0 |
|
103 * @param aTelNumber This is number to be parsed. |
|
104 * @return Returns None. |
|
105 */ |
|
106 void ParseNumber( TPhCltTelephoneNumber& aTelNumber ); |
|
107 |
|
108 private: // From MCenRepNotifyHandlerCallback |
|
109 |
|
110 void HandleNotifyString( TUint32 aId, const TDesC16& aNewValue ); |
|
111 |
|
112 private:// Data |
|
113 |
|
114 // The RTelServer instance. |
|
115 /***************************************************** |
|
116 * Series 60 Customer / ETel |
|
117 * Series 60 ETel API |
|
118 *****************************************************/ |
|
119 RTelServer iETelServer; |
|
120 |
|
121 // The RMobilePhone instance. |
|
122 /***************************************************** |
|
123 * Series 60 Customer / ETel |
|
124 * Series 60 ETel API |
|
125 *****************************************************/ |
|
126 RMobilePhone iMobilePhone; |
|
127 |
|
128 // The CustomAPI instance. |
|
129 /***************************************************** |
|
130 * Series 60 Customer / ETel |
|
131 * Series 60 ETel API |
|
132 *****************************************************/ |
|
133 RMmCustomAPI iCustomPhone; |
|
134 |
|
135 // The information if advanced Emergency check is supported. |
|
136 TBool iAdvancedCheck; |
|
137 |
|
138 |
|
139 // The product specific emergency numbers. |
|
140 TBuf< KEnPolicySDEmergencyNumberListLength > iProductSpecificList; |
|
141 |
|
142 /** |
|
143 * CenRep, needed by listener |
|
144 * |
|
145 * Own |
|
146 */ |
|
147 CRepository* iCenRep; |
|
148 |
|
149 /** |
|
150 * CenRep listener |
|
151 * |
|
152 * Own |
|
153 */ |
|
154 CCenRepNotifyHandler* iListener; |
|
155 |
|
156 }; |
|
157 |
|
158 #endif // CDOSEMERGENCYNUMBERPOLICY_H |
|
159 |
|
160 // End of File |
|