1/**
2 * Copyright (c) 2006, 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 */
16
17package com.google.android.mail.common.html.parser;
18
19/**
20 * HtmlWhitelist is an interface that defines methods required by HtmlParser for
21 * looking up accepted HTML elements and attributes.
22 *
23 * @author sammy@google.com (Sammy Leong)
24 */
25public interface HtmlWhitelist {
26  /**
27   * Looks up the HTML.Element object associated with the given element tag
28   * name.
29   *
30   * @param name The tag name of the element to lookup
31   * @return The HTML.Element object associated with the given element tag name,
32   * or null if the given name is not in the whitelist.
33   */
34  HTML.Element lookupElement(String name);
35
36  /**
37   * Looks up the HTML.Attribute object associated with the given attribute
38   * name.
39   *
40   * @param name The name of the attribute to lookup
41   * @return The HTML.Attribute object associated with the given attribute name,
42   * or null if the given name is not in the whitelist.
43   */
44  HTML.Attribute lookupAttribute(String name);
45}