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 
17 package com.android.settings.wifi;
18 
19 import android.content.Context;
20 import android.view.LayoutInflater;
21 import android.widget.Button;
22 
23 /**
24  * Foundation interface glues between Activities and UIs like {@link WifiDialog}.
25  */
26 public 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 
getContext()43     public Context getContext();
getController()44     public WifiConfigController getController();
getLayoutInflater()45     public LayoutInflater getLayoutInflater();
getMode()46     public int getMode();
47 
dispatchSubmit()48     public void dispatchSubmit();
49 
setTitle(int id)50     public void setTitle(int id);
setTitle(CharSequence title)51     public void setTitle(CharSequence title);
52 
setSubmitButton(CharSequence text)53     public void setSubmitButton(CharSequence text);
setForgetButton(CharSequence text)54     public void setForgetButton(CharSequence text);
setCancelButton(CharSequence text)55     public void setCancelButton(CharSequence text);
getSubmitButton()56     public Button getSubmitButton();
getForgetButton()57     public Button getForgetButton();
getCancelButton()58     public Button getCancelButton();
59 }