2 * Copyright (C) 2010 ZXing authors
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.google.zxing.client.android.wifi;
19 import java.util.Vector;
21 import com.google.zxing.client.android.wifi.WifiActivity.NetworkType;
24 * Everything we could get from the barcode is to be here
25 * @author Vikram Aggarwal
28 class NetworkSetting {
29 // The ancillary network setting from the barcode
30 private NetworkType mNetworkType;
31 // The password this ssid has
32 private String mPassword;
33 // The ssid we read from the barcode
36 static String[] toStringArray(Vector<String> strings) {
37 int size = strings.size();
38 String[] result = new String[size];
39 for (int j = 0; j < size; j++) {
40 result[j] = (String) strings.elementAt(j);
45 * Create a new NetworkSetting object.
46 * @param ssid: The SSID
47 * @param password: Password for the setting, blank if unsecured network
48 * @param networkType: WPA for WPA/WPA2, or WEP for WEP or unsecured
50 public NetworkSetting(String ssid, String password, NetworkType networkType){
53 mNetworkType = networkType;
56 public NetworkType getNetworkType() {
59 public String getPassword() {
63 public String getSsid() {