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.DscpPolicy; 19 import android.net.LinkProperties; 20 import android.net.Network; 21 import android.net.NetworkCapabilities; 22 import android.net.NetworkInfo; 23 import android.net.NetworkScore; 24 import android.net.QosSession; 25 import android.telephony.data.EpsBearerQosSessionAttributes; 26 import android.telephony.data.NrQosSessionAttributes; 27 28 /** 29 * Interface for NetworkAgents to send network properties. 30 * @hide 31 */ 32 oneway interface INetworkAgentRegistry { sendNetworkCapabilities(in NetworkCapabilities nc)33 void sendNetworkCapabilities(in NetworkCapabilities nc); sendLinkProperties(in LinkProperties lp)34 void sendLinkProperties(in LinkProperties lp); 35 // TODO: consider replacing this by "markConnected()" and removing sendNetworkInfo(in NetworkInfo info)36 void sendNetworkInfo(in NetworkInfo info); sendScore(in NetworkScore score)37 void sendScore(in NetworkScore score); sendExplicitlySelected(boolean explicitlySelected, boolean acceptPartial)38 void sendExplicitlySelected(boolean explicitlySelected, boolean acceptPartial); sendSocketKeepaliveEvent(int slot, int reason)39 void sendSocketKeepaliveEvent(int slot, int reason); sendUnderlyingNetworks(in @ullable List<Network> networks)40 void sendUnderlyingNetworks(in @nullable List<Network> networks); sendEpsQosSessionAvailable(int callbackId, in QosSession session, in EpsBearerQosSessionAttributes attributes)41 void sendEpsQosSessionAvailable(int callbackId, in QosSession session, in EpsBearerQosSessionAttributes attributes); sendNrQosSessionAvailable(int callbackId, in QosSession session, in NrQosSessionAttributes attributes)42 void sendNrQosSessionAvailable(int callbackId, in QosSession session, in NrQosSessionAttributes attributes); sendQosSessionLost(int qosCallbackId, in QosSession session)43 void sendQosSessionLost(int qosCallbackId, in QosSession session); sendQosCallbackError(int qosCallbackId, int exceptionType)44 void sendQosCallbackError(int qosCallbackId, int exceptionType); sendTeardownDelayMs(int teardownDelayMs)45 void sendTeardownDelayMs(int teardownDelayMs); sendLingerDuration(int durationMs)46 void sendLingerDuration(int durationMs); sendAddDscpPolicy(in DscpPolicy policy)47 void sendAddDscpPolicy(in DscpPolicy policy); sendRemoveDscpPolicy(int policyId)48 void sendRemoveDscpPolicy(int policyId); sendRemoveAllDscpPolicies()49 void sendRemoveAllDscpPolicies(); sendUnregisterAfterReplacement(int timeoutMillis)50 void sendUnregisterAfterReplacement(int timeoutMillis); 51 } 52