1/*
2 * Copyright (C) 2008 The Android Open Source Project
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 android.webkit;
18
19import android.annotation.Nullable;
20import android.webkit.CacheManager.CacheResult;
21import android.webkit.PluginData;
22
23import java.util.Map;
24
25/**
26 * @hide
27 * @deprecated This interface was inteded to be used by Gears. Since Gears was
28 * deprecated, so is this class.
29 */
30@Deprecated
31public interface UrlInterceptHandler {
32
33    /**
34     * Given an URL, returns the CacheResult which contains the
35     * surrogate response for the request, or {@code null} if the handler is
36     * not interested.
37     *
38     * @param url URL string.
39     * @param headers The headers associated with the request.
40     * @return The CacheResult containing the surrogate response.
41     *
42     * @hide
43     * @deprecated Do not use, this interface is deprecated.
44     */
45    @Deprecated
46    @Nullable
47    CacheResult service(String url, @Nullable Map<String, String> headers);
48
49    /**
50     * Given an URL, returns the PluginData which contains the
51     * surrogate response for the request, or {@code null} if the handler is
52     * not interested.
53     *
54     * @param url URL string.
55     * @param headers The headers associated with the request.
56     * @return The PluginData containing the surrogate response.
57     *
58     * @hide
59     * @deprecated Do not use, this interface is deprecated.
60     */
61    @Deprecated
62    @Nullable
63    PluginData getPluginData(String url, @Nullable Map<String, String> headers);
64}
65