Lorenzo Colitti | 2edad7a | 2014-05-21 16:23:43 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 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 android.net; |
| 18 | |
| 19 | import android.net.IpConfiguration; |
Jaewan Kim | 32b3f2c | 2014-10-20 12:04:13 +0900 | [diff] [blame] | 20 | import android.net.IEthernetServiceListener; |
Patrick Rohr | d6156a9 | 2022-03-17 19:19:21 +0000 | [diff] [blame] | 21 | import android.net.EthernetNetworkManagementException; |
James Mattis | 1ecadfa | 2022-01-28 13:42:38 -0800 | [diff] [blame] | 22 | import android.net.EthernetNetworkUpdateRequest; |
Patrick Rohr | d6156a9 | 2022-03-17 19:19:21 +0000 | [diff] [blame] | 23 | import android.net.INetworkInterfaceOutcomeReceiver; |
Lorenzo Colitti | 19b8b88 | 2020-01-24 19:29:17 +0900 | [diff] [blame] | 24 | import android.net.ITetheredInterfaceCallback; |
Lorenzo Colitti | 2edad7a | 2014-05-21 16:23:43 -0700 | [diff] [blame] | 25 | |
Xiao Ma | 1edd455 | 2022-03-17 05:56:09 +0000 | [diff] [blame] | 26 | import java.util.List; |
| 27 | |
Lorenzo Colitti | 2edad7a | 2014-05-21 16:23:43 -0700 | [diff] [blame] | 28 | /** |
| 29 | * Interface that answers queries about, and allows changing |
| 30 | * ethernet configuration. |
| 31 | */ |
| 32 | /** {@hide} */ |
| 33 | interface IEthernetManager |
| 34 | { |
Pavel Maltsev | 50ec1f3 | 2017-10-31 15:34:16 -0700 | [diff] [blame] | 35 | String[] getAvailableInterfaces(); |
| 36 | IpConfiguration getConfiguration(String iface); |
| 37 | void setConfiguration(String iface, in IpConfiguration config); |
| 38 | boolean isAvailable(String iface); |
Jaewan Kim | 32b3f2c | 2014-10-20 12:04:13 +0900 | [diff] [blame] | 39 | void addListener(in IEthernetServiceListener listener); |
| 40 | void removeListener(in IEthernetServiceListener listener); |
Lorenzo Colitti | 013187d | 2020-03-17 00:16:13 +0900 | [diff] [blame] | 41 | void setIncludeTestInterfaces(boolean include); |
Lorenzo Colitti | 19b8b88 | 2020-01-24 19:29:17 +0900 | [diff] [blame] | 42 | void requestTetheredInterface(in ITetheredInterfaceCallback callback); |
| 43 | void releaseTetheredInterface(in ITetheredInterfaceCallback callback); |
James Mattis | 1ecadfa | 2022-01-28 13:42:38 -0800 | [diff] [blame] | 44 | void updateConfiguration(String iface, in EthernetNetworkUpdateRequest request, |
Patrick Rohr | d6156a9 | 2022-03-17 19:19:21 +0000 | [diff] [blame] | 45 | in INetworkInterfaceOutcomeReceiver listener); |
| 46 | void connectNetwork(String iface, in INetworkInterfaceOutcomeReceiver listener); |
| 47 | void disconnectNetwork(String iface, in INetworkInterfaceOutcomeReceiver listener); |
markchien | 5912ab6 | 2022-03-17 18:19:39 +0800 | [diff] [blame] | 48 | void setEthernetEnabled(boolean enabled); |
Xiao Ma | 1edd455 | 2022-03-17 05:56:09 +0000 | [diff] [blame] | 49 | List<String> getInterfaceList(); |
Lorenzo Colitti | 2edad7a | 2014-05-21 16:23:43 -0700 | [diff] [blame] | 50 | } |