Object <- Dialing |
|
Class Dialing defines no new attributes.
Fields
No fields are defined by Dialing or any of its superclasses.
Instance template
instance Dialing tag; end instance;
Define Class Dialing;
inherits from Object;
intrinsic FindDialingCountryByISO3166Code(iso3155code: HasText): DialingCountry;
// Return the first DialingCountry in iDialingCountries that matches
// code, a two-letter ISO3166 Country Code. Returns nilObject if no
// DialingCountry matches.
intrinsic FindDialingCountryByCountryCode(countryCode: Text): DialingCountry;
// Return the first DialingCountry in iDialingCountries whose
// CountryCode matches countryCode. Returns nilObject if no matching
// DialingCountry is found.
intrinsic PhoneNumberToDialingCountry(globalPhoneNumber: HasText): DialingCountry;
// Return the DialingCountry that matches the country code at the head
// of globalPhoneNumber.
intrinsic NormalizedPhoneNumber(globalPhoneNumber: HasText; kindOfPhoneNumber: Unsigned; forUser: Boolean): Text;
// Return the domestic portion of globalPhoneNumber, normalized
// according to the rules of its country. kindOfPhoneNumber is one of
// kVoicePhoneNumber, kCellularPhoneNumber, kFaxPhoneNumber, or
// kModemPhoneNumber. Specify kVoiceNumber if the type is unknown.
// forUser should be true if the number is for user to view. If forUser
// is true, an initial '0' will be added to area codes for countries
// that typically include the national access code in area codes.
// forUser is false for system phone numbers that are stored in
// FullContact objects.
intrinsic CreateDialableNumber(globalPhoneNumber: HasText;
var isLongDistance: Boolean; var usedCallingCard: Boolean): Text;
// Build a number from a global phone number that can be dialed from the
// current DialingLocation. isLongDistance will be set to true if the
// number is considered long distance, and usedCallingCard is true if
// the user has set up a calling card and it can be used with this
// number from the current dialing location.
intrinsic IsQuotedPhoneNumber(domesticPhoneNumber: HasText): Boolean;
// Returns true if domesticPhoneNumber starts with a single or double
// quote, false otherwise.
intrinsic HasPhoneControlCharacters(phoneNumber: HasText): Boolean;
// Returns true if phoneNumber contains phone control characters ',',
// '*' or '#'. Otherwise returns false.
intrinsic GlobalPhoneNumberFromDomesticNumber(country: DialingCountry; domesticNumber: HasText): Text;
// Returns the global phone number formed by concatenating the country's country code and the
// domesticNumber ('+<countryCode>\t<domesticNumber>'). If the country is nilObject, then
// iSystemDialingCountry is used.
intrinsic PhoneNumberPartText(phoneNumber: HasText; phoneNumberPart: Unsigned): Text;
// Return the phone number part: kCountryPhoneNumberPart, kDomesticPhoneNumberPart,
// or kExtensionPhoneNumberPart.
intrinsic SetPhoneNumberPartText(phoneNumber: HasText; phoneNumberPart: Unsigned; newPartText: HasText);
// Replace the phone number part: kCountryPhoneNumberPart, kDomesticPhoneNumberPart,
// or kExtensionPhoneNumberPart.
intrinsic LocalizedWithCallingCard(globalPhoneNumber: HasText; var usesCallingCard: Boolean): Text;
// Given a global phone number of the form
// '+<countryCode>\t<domesticNumber>', returns a Text object containing
// the digits that need to be dialed from the current dialing location.
// Respects the selected calling card for the current location, if available
// and appropriate for this phone number. If non-nil, usesCallingCard
// is set to true if the calling card was available and used in creating
// the dialable number.
intrinsic LocalizedPhoneNumber(globalPhoneNumber: HasText; var isLongDistance: Boolean): Text;
// Given a global phone number of the form
// '+<countryCode>\t<domesticNumber>', returns a Text object containing
// the digits that need to be dialed from the current dialing location.
// If non-nil, isLongDistance set to true if globalPhoneNumber is a long
// distance number from the current dialing location.
intrinsic UsesCallingCard(globalPhoneNumber: HasText): Boolean;
// Given a global phone number of the form
// '+<countryCode>\t<domesticNumber>', returns true if the dialable
// number from the current dialing location would use a calling card.
intrinsic IsInternational(globalPhoneNumber: HasText): Boolean;
// Given a global phone number of the form
// '+<countryCode>\t<domesticNumber>', returns true if globalPhoneNumber
// is an international call from the current dialing location.
intrinsic IsLongDistance(globalPhoneNumber: HasText): Boolean;
// Given a global phone number of the form
// '+<countryCode>\t<domesticNumber>', returns true if globalPhoneNumber
// is a long distance call from the current dialing location.
intrinsic IsValidPhoneNumber(globalPhoneNumber: HasText;
var areaCodeRage: TextRange; var localNumberRange: TextRange): Boolean;
// Given a global phone number of the form
// '+<countryCode>\t<domesticNumber>', returns true if the number is
// valid. (Uses country-specific information.) If true is returned,
// and areaCodeRange and localNumberRange are non-nil, then they will be
// filled with the probable areaCode and localNumber of globalNumber.
intrinsic IsValidPhoneNumberWithAnnouncement(globalPhoneNumber: HasText;
var areaCodeRage: TextRange; var localNumberRange: TextRange): Boolean;
// calls IsValidPhoneNumber on the global phone number and announces
// the appropriate announcement if it is not a valid number
intrinsic PhoneDigitToLetters(dialingCountry: DialingCountry; digitCharacter: Character): Text;
// For a given digit character, returns the a text object that includes
// all the letters that map to that digit on the phone keypad. I.e.,
// PhoneDigitsToLetters(usaCountry, '2') returns 'ABC'. nilObject is
// returned for digits that are not mapped.
intrinsic MapPhoneKeys(dialingCountry: DialingCountry; domesticNumber: HasText): Unsigned;
// Modifies domesticNumber by replacing characters (like "USA-RAIL")
// with digits, according to the rules of dialingCountry. Returns the
// number of characters changed.
intrinsic GlobalPhoneNumber(telephoneAddressInfo: Object): Text;
// Given a TelephoneAddressInfo, returns a Text object of
// the form '+<country code>\t<domestic number>' or
// '+<country code>\t<domestic number>\t<extension>'.
// returns nilObject if the number in the address info is not a valid local number for the country
end class;