1/*
2 * Copyright (C) 2010 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 com.android.settings.wifi;
18
19import android.content.Context;
20import android.view.LayoutInflater;
21import android.widget.Button;
22
23/**
24 * Foundation interface glues between Activities and UIs like {@link WifiDialog}.
25 */
26public interface WifiConfigUiBase {
27
28    /**
29     * Viewing mode for a Wi-Fi access point. Data is displayed in non-editable mode.
30     */
31    int MODE_VIEW = 0;
32    /**
33     * Connect mode. Data is displayed in editable mode, and a connect button will be shown.
34     */
35    int MODE_CONNECT = 1;
36    /**
37     * Modify mode. All data is displayed in editable fields, and a "save" button is shown instead
38     * of "connect". Clients are expected to only save but not connect to the access point in this
39     * mode.
40     */
41    int MODE_MODIFY = 2;
42
43    public Context getContext();
44    public WifiConfigController getController();
45    public LayoutInflater getLayoutInflater();
46    public int getMode();
47
48    public void dispatchSubmit();
49
50    public void setTitle(int id);
51    public void setTitle(CharSequence title);
52
53    public void setSubmitButton(CharSequence text);
54    public void setForgetButton(CharSequence text);
55    public void setCancelButton(CharSequence text);
56    public Button getSubmitButton();
57    public Button getForgetButton();
58    public Button getCancelButton();
59}