NBMetadataHelper.h 1020 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // NBMetadataHelper.h
  3. // libPhoneNumber
  4. //
  5. // Created by tabby on 2015. 2. 8..
  6. // Copyright (c) 2015년 ohtalk.me. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "NBPhoneNumberDefines.h"
  10. @class NBPhoneMetaData;
  11. @interface NBMetadataHelper : NSObject
  12. + (BOOL)hasValue:(NSString *)string;
  13. + (NSDictionary *)CCode2CNMap;
  14. - (NSArray *)getAllMetadata;
  15. - (NBPhoneMetaData *)getMetadataForNonGeographicalRegion:(NSNumber *)countryCallingCode;
  16. - (NBPhoneMetaData *)getMetadataForRegion:(NSString *)regionCode;
  17. + (NSArray *)regionCodeFromCountryCode:(NSNumber *)countryCodeNumber;
  18. + (NSString *)countryCodeFromRegionCode:(NSString *)regionCode;
  19. #if SHORT_NUMBER_SUPPORT
  20. /**
  21. * Returns the short number metadata for the given region code or {@code nil} if the region
  22. * code is invalid or unknown.
  23. *
  24. * @param regionCode regionCode
  25. * @return {i18n.phonenumbers.PhoneMetadata}
  26. */
  27. - (NBPhoneMetaData *)shortNumberMetadataForRegion:(NSString *)regionCode;
  28. #endif // SHORT_NUMBER_SUPPORT
  29. @end