blob: 63cc33f7bf6ad0c780a381fecc63095217e735fd [file] [log] [blame]
Irfan Sheriffbe9ee6a2010-12-01 16:13:16 -08001/*
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
Vinit Deshapndeffadfb92013-12-06 15:12:41 -080017package com.android.server.wifi;
Irfan Sheriffbe9ee6a2010-12-01 16:13:16 -080018
19import static android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID;
20
21class NetworkUpdateResult {
22 int netId;
23 boolean ipChanged;
24 boolean proxyChanged;
Mike Lockwood1b6989c2012-03-22 12:42:21 -070025 boolean isNewNetwork = false;
Irfan Sheriffbe9ee6a2010-12-01 16:13:16 -080026
27 public NetworkUpdateResult(int id) {
28 netId = id;
29 ipChanged = false;
30 proxyChanged = false;
31 }
32
33 public NetworkUpdateResult(boolean ip, boolean proxy) {
34 netId = INVALID_NETWORK_ID;
35 ipChanged = ip;
36 proxyChanged = proxy;
37 }
38
39 public void setNetworkId(int id) {
40 netId = id;
41 }
42
43 public int getNetworkId() {
44 return netId;
45 }
46
47 public void setIpChanged(boolean ip) {
48 ipChanged = ip;
49 }
50
51 public boolean hasIpChanged() {
52 return ipChanged;
53 }
54
55 public void setProxyChanged(boolean proxy) {
56 proxyChanged = proxy;
57 }
58
59 public boolean hasProxyChanged() {
60 return proxyChanged;
61 }
Mike Lockwood1b6989c2012-03-22 12:42:21 -070062
63 public boolean isNewNetwork() {
64 return isNewNetwork;
65 }
66
67 public void setIsNewNetwork(boolean isNew) {
68 isNewNetwork = isNew;
69 }
Irfan Sheriffbe9ee6a2010-12-01 16:13:16 -080070}