1155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande/* 2155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * Copyright (C) 2011 The Android Open Source Project 3155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * 4155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * Licensed under the Apache License, Version 2.0 (the "License"); 5155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * you may not use this file except in compliance with the License. 6155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * You may obtain a copy of the License at 7155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * 8155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * http://www.apache.org/licenses/LICENSE-2.0 9155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * 10155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * Unless required by applicable law or agreed to in writing, software 11155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * distributed under the License is distributed on an "AS IS" BASIS, 12155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * See the License for the specific language governing permissions and 14155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * limitations under the License. 15155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande */ 16155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande 17155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpandepackage com.android.server.wifi; 18155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande 19155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpandeimport android.net.wifi.SupplicantState; 20155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpandeimport android.net.wifi.WifiSsid; 21155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande 22155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande/** 23155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * Stores supplicant state change information passed from WifiMonitor to 24155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * a state machine. WifiStateMachine, SupplicantStateTracker and WpsStateMachine 25155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * are example state machines that handle it. 26155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande * @hide 27155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande */ 28155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpandepublic class StateChangeResult { 29155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande StateChangeResult(int networkId, WifiSsid wifiSsid, String BSSID, 30155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande SupplicantState state) { 31155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande this.state = state; 32155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande this.wifiSsid= wifiSsid; 33155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande this.BSSID = BSSID; 34155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande this.networkId = networkId; 35155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande } 36155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande 37155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande int networkId; 38155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande WifiSsid wifiSsid; 39155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande String BSSID; 40155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande SupplicantState state; 41b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle 42b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle @Override 43b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle public String toString() { 44b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle StringBuffer sb = new StringBuffer(); 45b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle 46b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle sb.append(" SSID: ").append(wifiSsid.toString()); 47b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle sb.append(" BSSID: ").append(BSSID); 48b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle sb.append(" nid: ").append(networkId); 49b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle sb.append(" state: ").append(state); 50b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle return sb.toString(); 51b07da189850a4bfa268f8ab9be7867935eb2ecb5vandwalle } 52155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande} 53