1 /*
2  * Copyright (C) 2020 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 package android.net;
17 
18 import android.net.IIntResultListener;
19 import android.net.ITetheringEventCallback;
20 import android.net.TetheringRequestParcel;
21 import android.os.ResultReceiver;
22 
23 /** @hide */
24 oneway interface ITetheringConnector {
tether(String iface, String callerPkg, IIntResultListener receiver)25     void tether(String iface, String callerPkg, IIntResultListener receiver);
26 
untether(String iface, String callerPkg, IIntResultListener receiver)27     void untether(String iface, String callerPkg, IIntResultListener receiver);
28 
setUsbTethering(boolean enable, String callerPkg, IIntResultListener receiver)29     void setUsbTethering(boolean enable, String callerPkg, IIntResultListener receiver);
30 
startTethering(in TetheringRequestParcel request, String callerPkg, IIntResultListener receiver)31     void startTethering(in TetheringRequestParcel request, String callerPkg,
32             IIntResultListener receiver);
33 
stopTethering(int type, String callerPkg, IIntResultListener receiver)34     void stopTethering(int type, String callerPkg, IIntResultListener receiver);
35 
requestLatestTetheringEntitlementResult(int type, in ResultReceiver receiver, boolean showEntitlementUi, String callerPkg)36     void requestLatestTetheringEntitlementResult(int type, in ResultReceiver receiver,
37             boolean showEntitlementUi, String callerPkg);
38 
registerTetheringEventCallback(ITetheringEventCallback callback, String callerPkg)39     void registerTetheringEventCallback(ITetheringEventCallback callback, String callerPkg);
40 
unregisterTetheringEventCallback(ITetheringEventCallback callback, String callerPkg)41     void unregisterTetheringEventCallback(ITetheringEventCallback callback, String callerPkg);
42 
isTetheringSupported(String callerPkg, IIntResultListener receiver)43     void isTetheringSupported(String callerPkg, IIntResultListener receiver);
44 
stopAllTethering(String callerPkg, IIntResultListener receiver)45     void stopAllTethering(String callerPkg, IIntResultListener receiver);
46 }
47