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 perNmissions and 14 * limitations under the License. 15 */ 16 package android.net; 17 18 import android.net.NattKeepalivePacketData; 19 import android.net.QosFilterParcelable; 20 import android.net.TcpKeepalivePacketData; 21 22 import android.net.INetworkAgentRegistry; 23 24 /** 25 * Interface to notify NetworkAgent of connectivity events. 26 * @hide 27 */ 28 oneway interface INetworkAgent { 29 void onRegistered(in INetworkAgentRegistry registry); 30 void onDisconnected(); 31 void onBandwidthUpdateRequested(); 32 void onValidationStatusChanged(int validationStatus, 33 in @nullable String captivePortalUrl); 34 void onSaveAcceptUnvalidated(boolean acceptUnvalidated); 35 void onStartNattSocketKeepalive(int slot, int intervalDurationMs, 36 in NattKeepalivePacketData packetData); 37 void onStartTcpSocketKeepalive(int slot, int intervalDurationMs, 38 in TcpKeepalivePacketData packetData); 39 void onStopSocketKeepalive(int slot); 40 void onSignalStrengthThresholdsUpdated(in int[] thresholds); 41 void onPreventAutomaticReconnect(); 42 void onAddNattKeepalivePacketFilter(int slot, 43 in NattKeepalivePacketData packetData); 44 void onAddTcpKeepalivePacketFilter(int slot, 45 in TcpKeepalivePacketData packetData); 46 void onRemoveKeepalivePacketFilter(int slot); 47 void onQosFilterCallbackRegistered(int qosCallbackId, in QosFilterParcelable filterParcel); 48 void onQosCallbackUnregistered(int qosCallbackId); 49 void onNetworkCreated(); 50 void onNetworkDestroyed(); 51 } 52