blob: 42e4c1ac55aa313faf8e877223bc3e26ae0d728f [file] [log] [blame]
Lorenzo Colitti2edad7a2014-05-21 16:23:43 -07001/*
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
17package android.net;
18
19import android.net.IpConfiguration;
Jaewan Kim32b3f2c2014-10-20 12:04:13 +090020import android.net.IEthernetServiceListener;
Patrick Rohrd6156a92022-03-17 19:19:21 +000021import android.net.EthernetNetworkManagementException;
James Mattis1ecadfa2022-01-28 13:42:38 -080022import android.net.EthernetNetworkUpdateRequest;
Patrick Rohrd6156a92022-03-17 19:19:21 +000023import android.net.INetworkInterfaceOutcomeReceiver;
Lorenzo Colitti19b8b882020-01-24 19:29:17 +090024import android.net.ITetheredInterfaceCallback;
Lorenzo Colitti2edad7a2014-05-21 16:23:43 -070025
Xiao Ma1edd4552022-03-17 05:56:09 +000026import java.util.List;
27
Lorenzo Colitti2edad7a2014-05-21 16:23:43 -070028/**
29 * Interface that answers queries about, and allows changing
30 * ethernet configuration.
31 */
32/** {@hide} */
33interface IEthernetManager
34{
Pavel Maltsev50ec1f32017-10-31 15:34:16 -070035 String[] getAvailableInterfaces();
36 IpConfiguration getConfiguration(String iface);
37 void setConfiguration(String iface, in IpConfiguration config);
38 boolean isAvailable(String iface);
Jaewan Kim32b3f2c2014-10-20 12:04:13 +090039 void addListener(in IEthernetServiceListener listener);
40 void removeListener(in IEthernetServiceListener listener);
Lorenzo Colitti013187d2020-03-17 00:16:13 +090041 void setIncludeTestInterfaces(boolean include);
Lorenzo Colitti19b8b882020-01-24 19:29:17 +090042 void requestTetheredInterface(in ITetheredInterfaceCallback callback);
43 void releaseTetheredInterface(in ITetheredInterfaceCallback callback);
James Mattis1ecadfa2022-01-28 13:42:38 -080044 void updateConfiguration(String iface, in EthernetNetworkUpdateRequest request,
Patrick Rohrd6156a92022-03-17 19:19:21 +000045 in INetworkInterfaceOutcomeReceiver listener);
46 void connectNetwork(String iface, in INetworkInterfaceOutcomeReceiver listener);
47 void disconnectNetwork(String iface, in INetworkInterfaceOutcomeReceiver listener);
markchien5912ab62022-03-17 18:19:39 +080048 void setEthernetEnabled(boolean enabled);
Xiao Ma1edd4552022-03-17 05:56:09 +000049 List<String> getInterfaceList();
Lorenzo Colitti2edad7a2014-05-21 16:23:43 -070050}