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