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 * Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near 27 * future, please develop in {@link WifiConfigUiBase2}. 28 */ 29 public interface WifiConfigUiBase { 30 31 /** 32 * Viewing mode for a Wi-Fi access point. Data is displayed in non-editable mode. 33 */ 34 int MODE_VIEW = 0; 35 /** 36 * Connect mode. Data is displayed in editable mode, and a connect button will be shown. 37 */ 38 int MODE_CONNECT = 1; 39 /** 40 * Modify mode. All data is displayed in editable fields, and a "save" button is shown instead 41 * of "connect". Clients are expected to only save but not connect to the access point in this 42 * mode. 43 */ 44 int MODE_MODIFY = 2; 45 getContext()46 public Context getContext(); getController()47 public WifiConfigController getController(); getLayoutInflater()48 public LayoutInflater getLayoutInflater(); getMode()49 public int getMode(); 50 dispatchSubmit()51 public void dispatchSubmit(); 52 setTitle(int id)53 public void setTitle(int id); setTitle(CharSequence title)54 public void setTitle(CharSequence title); 55 setSubmitButton(CharSequence text)56 public void setSubmitButton(CharSequence text); setForgetButton(CharSequence text)57 public void setForgetButton(CharSequence text); setCancelButton(CharSequence text)58 public void setCancelButton(CharSequence text); getSubmitButton()59 public Button getSubmitButton(); getForgetButton()60 public Button getForgetButton(); getCancelButton()61 public Button getCancelButton(); 62 } 63