1 #ifndef I18N_PHONENUMBERS_MATCHER_API_H_
2 #define I18N_PHONENUMBERS_MATCHER_API_H_
7 namespace phonenumbers {
11 class PhoneNumberDesc;
13 // Internal phonenumber matching API used to isolate the underlying
14 // implementation of the matcher and allow different implementations to be
18 virtual ~MatcherApi() {}
20 // Returns whether the given national number (a string containing only decimal
21 // digits) matches the national number pattern defined in the given
22 // PhoneNumberDesc message.
23 virtual bool MatchesNationalNumber(const string& national_number,
24 const PhoneNumberDesc& number_desc,
25 bool allow_prefix_match) const = 0;
27 // Returns whether the given national number (a string containing only decimal
28 // digits) matches the possible number pattern defined in the given
29 // PhoneNumberDesc message.
30 virtual bool MatchesPossibleNumber(
31 const string& national_number,
32 const PhoneNumberDesc& number_desc) const = 0;
35 } // namespace phonenumbers
38 #endif // I18N_PHONENUMBERS_MATCHER_API_H_