Path: blob/trunk/third_party/closure/goog/i18n/uchar/namefetcher.js
2868 views
// Copyright 2012 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview Definition of the goog.i18n.CharNameFetcher interface. This16* interface is used to retrieve individual character names.17*/1819goog.provide('goog.i18n.uChar.NameFetcher');20212223/**24* NameFetcher interface. Implementations of this interface are used to retrieve25* Unicode character names.26*27* @interface28*/29goog.i18n.uChar.NameFetcher = function() {};303132/**33* Retrieves the names of a given set of characters and stores them in a cache34* for fast retrieval. Offline implementations can simply provide an empty35* implementation.36*37* @param {string} characters The list of characters in base 88 to fetch. These38* lists are stored by category and subcategory in the39* goog.i18n.charpickerdata class.40*/41goog.i18n.uChar.NameFetcher.prototype.prefetch = function(characters) {};424344/**45* Retrieves the name of a particular character.46*47* @param {string} character The character to retrieve.48* @param {function(?string)} callback The callback function called when the49* name retrieval is complete, contains a single string parameter with the50* codepoint name, this parameter will be null if the character name is not51* defined.52*/53goog.i18n.uChar.NameFetcher.prototype.getName = function(character, callback) {54};555657/**58* Tests whether the name of a given character is available to be retrieved by59* the getName() function.60*61* @param {string} character The character to test.62* @return {boolean} True if the fetcher can retrieve or has a name available63* for the given character.64*/65goog.i18n.uChar.NameFetcher.prototype.isNameAvailable = function(character) {};666768