|
|
|
Location:
dial.h
Link against: dial.lib
class TelephoneNumber;
A static class that provides parsing functions for telephone numbers.
Defined in TelephoneNumber:
CalculateDialCityPrefix(), Parse(), Parse(), Parse()
static TInt Parse(TDialString& aDialString, const TDialLocation& aDialLocation, const TChargeCard& aChargeCard, const TDesC& aPhoneNumber, TParseMode aParseMode);
Parses the specified telephone number after applying the rules contained in aChargeCard and places the result in aDialString.
The phone number (aPhoneNumber) must be specified using the following format:
+<International code>(<area code>)<subscriber number>
or
+<International code> <area code> <subscriber number>
For example, +44(207)563231.
Note that by default if the international and area codes of a specified number are the same as the current location, the returned parsed number will only contain the subscriber number. To force the international and area codes, use the next overloaded version of Parse() below.
|
|
static TInt Parse(TDialString& aDialString, const TDialLocation& aDialLocation, const TDesC& aPhoneNumber, TCityDialOptions aOption);
Parses the specified telephone number and places the result in aDialString.
Whether the international and area codes are included in the parsed output depends on how aOption is set.
The phone number (aPhoneNumber) must be specified using the following format:
+<International code>(<area code>)<subscriber number>
or
+<International code> <area code> <subscriber number>
For example, +44(207)563231.
|
|
static TInt Parse(TDialString& aDialString, const TDialLocation& aDialLocation, const TDesC& aPhoneNumber);
Parses the specified telephone number and places the result in aDialString.
If the international and area codes of a specified number are the same as the current location, the returned parsed number will only contain the subscriber number. To force the international and area codes, use the previous overloaded version of Parse() above.
The phone number (aPhoneNumber) must be specified using the following format:
+<International code>(<area code>)<subscriber number>
or
+<International code> <area code> <subscriber number>
For example, +44(207)563231.
|
|
static TInt CalculateDialCityPrefix(TDialString& aDialString, const TCityDialCodes& aFrom, const TCityDialCodes& aTo, TCityDialOptions aOption, TChar aCodeSeparator, TPlusFormatDialOptions aPlusOption);
Formats a city dial code and places the result in aDialString.
This function compares two TCityDialCodes; if the two differ, then the difference is formatted and the result placed in aDialString.
For example, if
aFrom.iNatPrefCode and aFrom.iAreaCode equalled '44' and '207' and aTo.iNatPrefCode and aTo.iAreaCodewas equaled '31' and '55' then the formatted result would be '0031-55' (assuming that TDialLocation::IntlPrefCode() = '00' and aCodeSeparator = '-').
|
|