1/**
2 * Copyright (c) 2004, Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package com.android.mail.lib.html.parser;
17
18/**
19 * HtmlWhitelist is an interface that defines methods required by HtmlParser for
20 * looking up accepted HTML elements and attributes.
21 *
22 * @author sammy@google.com (Sammy Leong)
23 */
24public interface HtmlWhitelist {
25  /**
26   * Looks up the HTML.Element object associated with the given element tag
27   * name.
28   *
29   * @param name The tag name of the element to lookup
30   * @return The HTML.Element object associated with the given element tag name,
31   * or null if the given name is not in the whitelist.
32   */
33  HTML.Element lookupElement(String name);
34
35  /**
36   * Looks up the HTML.Attribute object associated with the given attribute
37   * name.
38   *
39   * @param name The name of the attribute to lookup
40   * @return The HTML.Attribute object associated with the given attribute name,
41   * or null if the given name is not in the whitelist.
42   */
43  HTML.Attribute lookupAttribute(String name);
44}