|
1 // Copyright (c) 1997-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 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedAll |
|
21 @deprecated 9.1 |
|
22 */ |
|
23 |
|
24 #ifndef __DIAL_H__ |
|
25 /** |
|
26 @publishedAll |
|
27 @deprecated 9.1 |
|
28 */ |
|
29 #define __DIAL_H__ |
|
30 |
|
31 #include <e32base.h> |
|
32 #include <dial_consts.h> |
|
33 |
|
34 /** |
|
35 @publishedAll |
|
36 @deprecated 9.1 |
|
37 */ |
|
38 const TInt KChargeCardRuleSize=32; |
|
39 /** |
|
40 @publishedAll |
|
41 @deprecated 9.1 |
|
42 */ |
|
43 const TInt KChargeCardAccountNumberSize=32; |
|
44 /** |
|
45 @publishedAll |
|
46 @deprecated 9.1 |
|
47 */ |
|
48 const TInt KChargeCardPinSize=8; |
|
49 |
|
50 /** |
|
51 Represents a dialling rule. |
|
52 @deprecated 9.1 |
|
53 */ |
|
54 typedef TBuf<KChargeCardRuleSize> TChargeCardRule ; |
|
55 /** |
|
56 Represents the charge card account number. |
|
57 @deprecated 9.1 |
|
58 */ |
|
59 typedef TBuf<KChargeCardAccountNumberSize> TChargeCardAccount ; |
|
60 /** |
|
61 Represents the charge card PIN number. |
|
62 @deprecated 9.1 |
|
63 */ |
|
64 typedef TBuf<KChargeCardPinSize> TChargeCardPin; |
|
65 |
|
66 /** |
|
67 Contains information about a charge card. |
|
68 There are functions to get and set this information. |
|
69 |
|
70 @deprecated This class has been deprecated from 9.1 and should no longer be used. |
|
71 */ |
|
72 class TChargeCard |
|
73 { |
|
74 public: |
|
75 IMPORT_C TChargeCard () ; |
|
76 IMPORT_C TChargeCard( |
|
77 const TChargeCardAccount& aNumber, |
|
78 const TChargeCardPin& aPin , |
|
79 const TChargeCardRule& aLocalRule, |
|
80 const TChargeCardRule& aNatRule, |
|
81 const TChargeCardRule& aIntlRule) ; |
|
82 |
|
83 IMPORT_C void SetNumber(const TDesC&); |
|
84 IMPORT_C void SetPin(const TDesC&); |
|
85 IMPORT_C void SetLocalRule (const TDesC&); |
|
86 IMPORT_C void SetNatRule(const TDesC&); |
|
87 IMPORT_C void SetIntlRule(const TDesC&); |
|
88 |
|
89 IMPORT_C TBool ValidateChargeCardInfo() const; |
|
90 IMPORT_C TPtrC Number() const; |
|
91 IMPORT_C TPtrC Pin() const; |
|
92 IMPORT_C TPtrC LocalRule () const; |
|
93 IMPORT_C TPtrC NatRule() const; |
|
94 IMPORT_C TPtrC IntlRule() const; |
|
95 private: |
|
96 |
|
97 TChargeCardAccount iNumber; |
|
98 TChargeCardPin iPin; |
|
99 TChargeCardRule iLocalRule; |
|
100 TChargeCardRule iNatRule; |
|
101 TChargeCardRule iIntlRule; |
|
102 }; |
|
103 |
|
104 /** |
|
105 This can be passed to TelephoneNumber::Parse() to define whether a |
|
106 telephone number is for dialling or for display. |
|
107 |
|
108 @deprecated 9.1 |
|
109 */ |
|
110 enum TParseMode |
|
111 { |
|
112 EForDialing, |
|
113 EForDisplay |
|
114 } ; |
|
115 |
|
116 /** |
|
117 Defines the size of TDialOutLocalCode |
|
118 @deprecated 9.1 |
|
119 */ |
|
120 const TInt KDialOutLocalCodeSize=4; |
|
121 /** |
|
122 Defines the size of TDialOutLongDistanceCode |
|
123 @deprecated 9.1 |
|
124 */ |
|
125 const TInt KDialOutLongDistanceCodeSize=4; |
|
126 /** |
|
127 Defines the size of TDisableCallWaitingCode |
|
128 @deprecated 9.1 |
|
129 */ |
|
130 const TInt KDisableCallWaitingCodeSize=8; |
|
131 /** |
|
132 Defines the size of TPhoneNumber |
|
133 @deprecated 9.1 |
|
134 */ |
|
135 const TInt KPhoneNumberSize=100; |
|
136 |
|
137 /** |
|
138 Descriptor for the Local Dial-Out Code. |
|
139 @deprecated 9.1 |
|
140 */ |
|
141 typedef TBuf<KDialOutLocalCodeSize> TDialOutLocalCode ; |
|
142 /** |
|
143 Descriptor for the Long Distance Dial-Out Code. |
|
144 @deprecated 9.1 |
|
145 */ |
|
146 typedef TBuf<KDialOutLongDistanceCodeSize> TDialOutLongDistanceCode ; |
|
147 /** |
|
148 Descriptor for code to disable call waiting |
|
149 @deprecated 9.1 |
|
150 */ |
|
151 typedef TBuf<KDisableCallWaitingCodeSize> TDisableCallWaitingCode ; |
|
152 /** |
|
153 Descriptor for the phone number. |
|
154 @deprecated 9.1 |
|
155 */ |
|
156 typedef TBuf<KPhoneNumberSize> TPhoneNumber ; |
|
157 |
|
158 /** |
|
159 These flags are part of the location information stored by TDialLocation. |
|
160 @deprecated 9.1 |
|
161 */ |
|
162 enum { |
|
163 KPhoneNumberMobile =0x00000001, |
|
164 KPhoneNumberUsePulseDial =0x00000002, |
|
165 KPhoneNumberPbxUsePulseDial =0x00000004, |
|
166 KPhoneNumberWaitForDialingTone =0x00000008, |
|
167 KPhoneNumberWaitForProceedTone =0x00000010, |
|
168 KReturnPhoneNumberWithPlusFormat=0x00000020 |
|
169 }; |
|
170 |
|
171 /** |
|
172 @publishedAll |
|
173 @deprecated 9.1 |
|
174 */ |
|
175 const TInt KPhoneNumberDefaultFlags=KPhoneNumberUsePulseDial; |
|
176 |
|
177 /** |
|
178 Contains information about the current location |
|
179 such as international prefix code, area code etc. |
|
180 |
|
181 There are functions to get and set this information. |
|
182 |
|
183 @deprecated This class has been deprecated from 9.1 and should no longer be used. |
|
184 */ |
|
185 class TDialLocation |
|
186 { |
|
187 public: |
|
188 IMPORT_C TDialLocation() ; |
|
189 IMPORT_C TDialLocation( |
|
190 const TIntlPrefCode & aIntlPrefCode, |
|
191 const TNatPrefCode& aNatPrefCode, |
|
192 const TNatCode& aNatCode, |
|
193 const TAreaCode& aAreaCode, |
|
194 const TDialOutLocalCode& aDialOutLocalCode, |
|
195 const TDialOutLongDistanceCode& aDialOutLongDistanceCode, |
|
196 const TDisableCallWaitingCode& aDisableCallWaitingCode, |
|
197 TUint aFlags, |
|
198 TUint aPauseAfterDialout ) ; |
|
199 |
|
200 IMPORT_C void SetIntlPrefCode(const TDesC&) ; |
|
201 IMPORT_C void SetNatPrefCode(const TDesC&); |
|
202 IMPORT_C void SetNatCode(const TDesC&); |
|
203 IMPORT_C void SetAreaCode(const TDesC&); |
|
204 IMPORT_C void SetDialOutLocalCode(const TDesC&); |
|
205 IMPORT_C void SetDialOutLongDistanceCode(const TDesC&); |
|
206 IMPORT_C void SetDisableCallWaitingCode(const TDesC&); |
|
207 IMPORT_C void SetDialLocationFlags (TUint); |
|
208 inline void ClearDialLocationFlags (TUint); |
|
209 IMPORT_C void SetPauseAfterDialout ( TUint); |
|
210 IMPORT_C TPtrC IntlPrefCode() const ; |
|
211 IMPORT_C TPtrC NatPrefCode() const; |
|
212 IMPORT_C TPtrC NatCode() const; |
|
213 IMPORT_C TPtrC AreaCode() const; |
|
214 IMPORT_C TPtrC DialOutLocalCode() const; |
|
215 IMPORT_C TPtrC DialOutLongDistanceCode() const; |
|
216 IMPORT_C TPtrC DisableCallWaitingCode() const; |
|
217 IMPORT_C TInt PauseAfterDialout () const; |
|
218 IMPORT_C TBool IsMobile () const ; |
|
219 inline TBool IsReturnPhoneNumberWithPlusFormat() const; |
|
220 IMPORT_C TBool IsUsePulseDial () const; |
|
221 IMPORT_C TBool IsPbxUsePulseDial () const ; |
|
222 IMPORT_C TBool IsWaitForDialingTone () const ; |
|
223 IMPORT_C TBool IsWaitForProceedTone () const; |
|
224 IMPORT_C TBool IsDialOutRequired () const; |
|
225 IMPORT_C TBool IsDisableCallWaitingCode() const; |
|
226 |
|
227 private: |
|
228 TIntlPrefCode iIntlPrefCode; |
|
229 TNatPrefCode iNatPrefCode; |
|
230 TNatCode iNatCode; |
|
231 TAreaCode iAreaCode; |
|
232 TDialOutLocalCode iDialOutLocalCode; |
|
233 TDialOutLongDistanceCode iDialOutLongDistanceCode; |
|
234 TDisableCallWaitingCode iDisableCallWaitingCode; |
|
235 TUint iFlags; |
|
236 TUint iPauseAfterDialout; |
|
237 }; |
|
238 |
|
239 /** |
|
240 This can be passed to TelephoneNumber::Parse() to define whether the |
|
241 dial string is in full or in the ‘+’ char format. |
|
242 |
|
243 @deprecated 9.1 |
|
244 */ |
|
245 enum TPlusFormatDialOptions |
|
246 { |
|
247 EPlusFormatDialNotAllow , |
|
248 EPlusFormatDialAllow |
|
249 }; |
|
250 |
|
251 /** |
|
252 This option applies when the phone number being dialled is in the |
|
253 same location as the dialler: It controls whether the area code |
|
254 is included in the final dial string. |
|
255 |
|
256 @deprecated 9.1 |
|
257 */ |
|
258 enum TCityDialOptions |
|
259 { |
|
260 EDialCityStripDuplicateAreaCode, |
|
261 EDialCityAllowDuplicateAreaCode |
|
262 }; |
|
263 |
|
264 /** |
|
265 This can be passed to TelephoneNumber::Parse() to define the |
|
266 area code of the dialling and diallers locations. |
|
267 |
|
268 @deprecated This class has been deprecated from 9.1 and should no longer be used. |
|
269 */ |
|
270 class TCityDialCodes |
|
271 { |
|
272 public: |
|
273 TAreaCode iAreaCode; |
|
274 TNatCode iNatCode; |
|
275 TNatPrefCode iNatPref; |
|
276 TIntlPrefCode iIntlPref; |
|
277 }; |
|
278 |
|
279 |
|
280 /** |
|
281 A static class that provides functions to resolve telephone numbers. |
|
282 |
|
283 @deprecated This class has been deprecated from 9.1 and should no longer be used. |
|
284 */ |
|
285 class TelephoneNumber |
|
286 { |
|
287 public: |
|
288 IMPORT_C static TInt Parse( |
|
289 TDialString& aDialString , |
|
290 const TDialLocation& aDialLocation , |
|
291 const TChargeCard& aChargeCard, |
|
292 const TDesC& aPhoneNumber, |
|
293 TParseMode aParseMode ) ; |
|
294 |
|
295 IMPORT_C static TInt Parse ( TDialString& aDialString , |
|
296 const TDialLocation& aDialLocation, |
|
297 const TDesC& aPhoneNumber ); |
|
298 |
|
299 IMPORT_C static TInt CalculateDialCityPrefix( |
|
300 TDialString& aDialString , |
|
301 const TCityDialCodes& aFrom, |
|
302 const TCityDialCodes& aTo, |
|
303 TCityDialOptions aOption, |
|
304 TChar aCodeSeparator , |
|
305 TPlusFormatDialOptions aPlusOption ) ; |
|
306 // |
|
307 IMPORT_C static TInt Parse ( TDialString& aDialString , |
|
308 const TDialLocation& aDialLocation, |
|
309 const TDesC& aPhoneNumber, |
|
310 TCityDialOptions aOption) ; |
|
311 }; |
|
312 |
|
313 #include <dial.inl> |
|
314 |
|
315 #endif |