blob: 44e27e26f5d207de83a3c15ad56992fa43ff0bbb [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
26/**
27 * Interface that answers queries about, and allows changing
28 * ethernet configuration.
29 */
30/** {@hide} */
31interface IEthernetManager
32{
Pavel Maltsev50ec1f32017-10-31 15:34:16 -070033 String[] getAvailableInterfaces();
34 IpConfiguration getConfiguration(String iface);
35 void setConfiguration(String iface, in IpConfiguration config);
36 boolean isAvailable(String iface);
Jaewan Kim32b3f2c2014-10-20 12:04:13 +090037 void addListener(in IEthernetServiceListener listener);
38 void removeListener(in IEthernetServiceListener listener);
Lorenzo Colitti013187d2020-03-17 00:16:13 +090039 void setIncludeTestInterfaces(boolean include);
Lorenzo Colitti19b8b882020-01-24 19:29:17 +090040 void requestTetheredInterface(in ITetheredInterfaceCallback callback);
41 void releaseTetheredInterface(in ITetheredInterfaceCallback callback);
James Mattis1ecadfa2022-01-28 13:42:38 -080042 void updateConfiguration(String iface, in EthernetNetworkUpdateRequest request,
Patrick Rohrd6156a92022-03-17 19:19:21 +000043 in INetworkInterfaceOutcomeReceiver listener);
44 void connectNetwork(String iface, in INetworkInterfaceOutcomeReceiver listener);
45 void disconnectNetwork(String iface, in INetworkInterfaceOutcomeReceiver listener);
markchien5912ab62022-03-17 18:19:39 +080046 void setEthernetEnabled(boolean enabled);
Lorenzo Colitti2edad7a2014-05-21 16:23:43 -070047}