Debian Codegraph @

core/java/android/net/INetworkManagementEventObserver.aidl

raw
1 /*
2 * Copyright (C) 2009 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
17 package android.net;
18
19 import android.net.LinkAddress;
20 import android.net.RouteInfo;
21
22 /**
23 * Callback class for receiving events from an INetworkManagementService
24 *
25 * @hide
26 */
27 oneway interface INetworkManagementEventObserver {
28 /**
29 * Interface configuration status has changed.
30 *
31 * @param iface The interface.
32 * @param up True if the interface has been enabled.
33 */
34 void interfaceStatusChanged(String iface, boolean up);
35
36 /**
37 * Interface physical-layer link state has changed. For Ethernet,
38 * this method is invoked when the cable is plugged in or unplugged.
39 *
40 * @param iface The interface.
41 * @param up True if the physical link-layer connection signal is valid.
42 */
43 void interfaceLinkStateChanged(String iface, boolean up);
44
45 /**
46 * An interface has been added to the system
47 *
48 * @param iface The interface.
49 */
50 void interfaceAdded(String iface);
51
52 /**
53 * An interface has been removed from the system
54 *
55 * @param iface The interface.
56 */
57 void interfaceRemoved(String iface);
58
59
60 /**
61 * An interface address has been added or updated.
62 *
63 * @param iface The interface.
64 * @param address The address.
65 */
66 void addressUpdated(String iface, in LinkAddress address);
67
68 /**
69 * An interface address has been removed.
70 *
71 * @param iface The interface.
72 * @param address The address.
73 */
74 void addressRemoved(String iface, in LinkAddress address);
75
76 /**
77 * A networking quota limit has been reached. The quota might not
78 * be specific to an interface.
79 *
80 * @param limitName The name of the limit that triggered.
81 * @param iface The interface on which the limit was detected.
82 */
83 void limitReached(String limitName, String iface);
84
85 /**
86 * Interface data activity status is changed.
87 *
88 * @param transportType The transport type of the data activity change.
89 * @param active True if the interface is actively transmitting data, false if it is idle.
90 * @param tsNanos Elapsed realtime in nanos when the state of the network interface changed.
91 * @param uid Uid of this event. It represents the uid that was responsible for waking the
92 * radio. For those events that are reported by system itself, not from specific uid,
93 * use -1 for the events which means no uid.
94 */
95 void interfaceClassDataActivityChanged(int transportType, boolean active, long tsNanos, int uid);
96
97 /**
98 * Information about available DNS servers has been received.
99 *
100 * @param iface The interface on which the information was received.
101 * @param lifetime The time in seconds for which the DNS servers may be used.
102 * @param servers The IP addresses of the DNS servers.
103 */
104 void interfaceDnsServerInfo(String iface, long lifetime, in String[] servers);
105
106 /**
107 * A route has been added or updated.
108 */
109 void routeUpdated(in RouteInfo route);
110
111 /**
112 * A route has been removed.
113 */
114 void routeRemoved(in RouteInfo route);
115 }