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