xref: /aosp_15_r20/prebuilts/sdk/33/public/api/framework-connectivity-t.txt (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0
2*344a7f5eSAndroid Build Coastguard Workerpackage android.app.usage {
3*344a7f5eSAndroid Build Coastguard Worker
4*344a7f5eSAndroid Build Coastguard Worker  public final class NetworkStats implements java.lang.AutoCloseable {
5*344a7f5eSAndroid Build Coastguard Worker    method public void close();
6*344a7f5eSAndroid Build Coastguard Worker    method public boolean getNextBucket(@Nullable android.app.usage.NetworkStats.Bucket);
7*344a7f5eSAndroid Build Coastguard Worker    method public boolean hasNextBucket();
8*344a7f5eSAndroid Build Coastguard Worker  }
9*344a7f5eSAndroid Build Coastguard Worker
10*344a7f5eSAndroid Build Coastguard Worker  public static class NetworkStats.Bucket {
11*344a7f5eSAndroid Build Coastguard Worker    ctor public NetworkStats.Bucket();
12*344a7f5eSAndroid Build Coastguard Worker    method public int getDefaultNetworkStatus();
13*344a7f5eSAndroid Build Coastguard Worker    method public long getEndTimeStamp();
14*344a7f5eSAndroid Build Coastguard Worker    method public int getMetered();
15*344a7f5eSAndroid Build Coastguard Worker    method public int getRoaming();
16*344a7f5eSAndroid Build Coastguard Worker    method public long getRxBytes();
17*344a7f5eSAndroid Build Coastguard Worker    method public long getRxPackets();
18*344a7f5eSAndroid Build Coastguard Worker    method public long getStartTimeStamp();
19*344a7f5eSAndroid Build Coastguard Worker    method public int getState();
20*344a7f5eSAndroid Build Coastguard Worker    method public int getTag();
21*344a7f5eSAndroid Build Coastguard Worker    method public long getTxBytes();
22*344a7f5eSAndroid Build Coastguard Worker    method public long getTxPackets();
23*344a7f5eSAndroid Build Coastguard Worker    method public int getUid();
24*344a7f5eSAndroid Build Coastguard Worker    field public static final int DEFAULT_NETWORK_ALL = -1; // 0xffffffff
25*344a7f5eSAndroid Build Coastguard Worker    field public static final int DEFAULT_NETWORK_NO = 1; // 0x1
26*344a7f5eSAndroid Build Coastguard Worker    field public static final int DEFAULT_NETWORK_YES = 2; // 0x2
27*344a7f5eSAndroid Build Coastguard Worker    field public static final int METERED_ALL = -1; // 0xffffffff
28*344a7f5eSAndroid Build Coastguard Worker    field public static final int METERED_NO = 1; // 0x1
29*344a7f5eSAndroid Build Coastguard Worker    field public static final int METERED_YES = 2; // 0x2
30*344a7f5eSAndroid Build Coastguard Worker    field public static final int ROAMING_ALL = -1; // 0xffffffff
31*344a7f5eSAndroid Build Coastguard Worker    field public static final int ROAMING_NO = 1; // 0x1
32*344a7f5eSAndroid Build Coastguard Worker    field public static final int ROAMING_YES = 2; // 0x2
33*344a7f5eSAndroid Build Coastguard Worker    field public static final int STATE_ALL = -1; // 0xffffffff
34*344a7f5eSAndroid Build Coastguard Worker    field public static final int STATE_DEFAULT = 1; // 0x1
35*344a7f5eSAndroid Build Coastguard Worker    field public static final int STATE_FOREGROUND = 2; // 0x2
36*344a7f5eSAndroid Build Coastguard Worker    field public static final int TAG_NONE = 0; // 0x0
37*344a7f5eSAndroid Build Coastguard Worker    field public static final int UID_ALL = -1; // 0xffffffff
38*344a7f5eSAndroid Build Coastguard Worker    field public static final int UID_REMOVED = -4; // 0xfffffffc
39*344a7f5eSAndroid Build Coastguard Worker    field public static final int UID_TETHERING = -5; // 0xfffffffb
40*344a7f5eSAndroid Build Coastguard Worker  }
41*344a7f5eSAndroid Build Coastguard Worker
42*344a7f5eSAndroid Build Coastguard Worker  public class NetworkStatsManager {
43*344a7f5eSAndroid Build Coastguard Worker    method @WorkerThread public android.app.usage.NetworkStats queryDetails(int, @Nullable String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
44*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForUid(int, @Nullable String, long, long, int) throws java.lang.SecurityException;
45*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForUidTag(int, @Nullable String, long, long, int, int) throws java.lang.SecurityException;
46*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForUidTagState(int, @Nullable String, long, long, int, int, int) throws java.lang.SecurityException;
47*344a7f5eSAndroid Build Coastguard Worker    method @WorkerThread public android.app.usage.NetworkStats querySummary(int, @Nullable String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
48*344a7f5eSAndroid Build Coastguard Worker    method @WorkerThread public android.app.usage.NetworkStats.Bucket querySummaryForDevice(int, @Nullable String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
49*344a7f5eSAndroid Build Coastguard Worker    method @WorkerThread public android.app.usage.NetworkStats.Bucket querySummaryForUser(int, @Nullable String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
50*344a7f5eSAndroid Build Coastguard Worker    method public void registerUsageCallback(int, @Nullable String, long, @NonNull android.app.usage.NetworkStatsManager.UsageCallback);
51*344a7f5eSAndroid Build Coastguard Worker    method public void registerUsageCallback(int, @Nullable String, long, @NonNull android.app.usage.NetworkStatsManager.UsageCallback, @Nullable android.os.Handler);
52*344a7f5eSAndroid Build Coastguard Worker    method public void unregisterUsageCallback(@NonNull android.app.usage.NetworkStatsManager.UsageCallback);
53*344a7f5eSAndroid Build Coastguard Worker  }
54*344a7f5eSAndroid Build Coastguard Worker
55*344a7f5eSAndroid Build Coastguard Worker  public abstract static class NetworkStatsManager.UsageCallback {
56*344a7f5eSAndroid Build Coastguard Worker    ctor public NetworkStatsManager.UsageCallback();
57*344a7f5eSAndroid Build Coastguard Worker    method public abstract void onThresholdReached(int, @Nullable String);
58*344a7f5eSAndroid Build Coastguard Worker  }
59*344a7f5eSAndroid Build Coastguard Worker
60*344a7f5eSAndroid Build Coastguard Worker}
61*344a7f5eSAndroid Build Coastguard Worker
62*344a7f5eSAndroid Build Coastguard Workerpackage android.net {
63*344a7f5eSAndroid Build Coastguard Worker
64*344a7f5eSAndroid Build Coastguard Worker  public final class EthernetNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
65*344a7f5eSAndroid Build Coastguard Worker    ctor public EthernetNetworkSpecifier(@NonNull String);
66*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
67*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public String getInterfaceName();
68*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
69*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.EthernetNetworkSpecifier> CREATOR;
70*344a7f5eSAndroid Build Coastguard Worker  }
71*344a7f5eSAndroid Build Coastguard Worker
72*344a7f5eSAndroid Build Coastguard Worker  public final class IpSecAlgorithm implements android.os.Parcelable {
73*344a7f5eSAndroid Build Coastguard Worker    ctor public IpSecAlgorithm(@NonNull String, @NonNull byte[]);
74*344a7f5eSAndroid Build Coastguard Worker    ctor public IpSecAlgorithm(@NonNull String, @NonNull byte[], int);
75*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
76*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public byte[] getKey();
77*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String getName();
78*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.util.Set<java.lang.String> getSupportedAlgorithms();
79*344a7f5eSAndroid Build Coastguard Worker    method public int getTruncationLengthBits();
80*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(android.os.Parcel, int);
81*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_AES_CMAC = "cmac(aes)";
82*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_AES_XCBC = "xcbc(aes)";
83*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_CRYPT_AES_GCM = "rfc4106(gcm(aes))";
84*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_CRYPT_CHACHA20_POLY1305 = "rfc7539esp(chacha20,poly1305)";
85*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_HMAC_MD5 = "hmac(md5)";
86*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_HMAC_SHA1 = "hmac(sha1)";
87*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_HMAC_SHA256 = "hmac(sha256)";
88*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_HMAC_SHA384 = "hmac(sha384)";
89*344a7f5eSAndroid Build Coastguard Worker    field public static final String AUTH_HMAC_SHA512 = "hmac(sha512)";
90*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.IpSecAlgorithm> CREATOR;
91*344a7f5eSAndroid Build Coastguard Worker    field public static final String CRYPT_AES_CBC = "cbc(aes)";
92*344a7f5eSAndroid Build Coastguard Worker    field public static final String CRYPT_AES_CTR = "rfc3686(ctr(aes))";
93*344a7f5eSAndroid Build Coastguard Worker  }
94*344a7f5eSAndroid Build Coastguard Worker
95*344a7f5eSAndroid Build Coastguard Worker  public class IpSecManager {
96*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.InetAddress) throws android.net.IpSecManager.ResourceUnavailableException;
97*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.InetAddress, int) throws android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
98*344a7f5eSAndroid Build Coastguard Worker    method public void applyTransportModeTransform(@NonNull java.net.Socket, int, @NonNull android.net.IpSecTransform) throws java.io.IOException;
99*344a7f5eSAndroid Build Coastguard Worker    method public void applyTransportModeTransform(@NonNull java.net.DatagramSocket, int, @NonNull android.net.IpSecTransform) throws java.io.IOException;
100*344a7f5eSAndroid Build Coastguard Worker    method public void applyTransportModeTransform(@NonNull java.io.FileDescriptor, int, @NonNull android.net.IpSecTransform) throws java.io.IOException;
101*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket(int) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
102*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket() throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
103*344a7f5eSAndroid Build Coastguard Worker    method public void removeTransportModeTransforms(@NonNull java.net.Socket) throws java.io.IOException;
104*344a7f5eSAndroid Build Coastguard Worker    method public void removeTransportModeTransforms(@NonNull java.net.DatagramSocket) throws java.io.IOException;
105*344a7f5eSAndroid Build Coastguard Worker    method public void removeTransportModeTransforms(@NonNull java.io.FileDescriptor) throws java.io.IOException;
106*344a7f5eSAndroid Build Coastguard Worker    field public static final int DIRECTION_IN = 0; // 0x0
107*344a7f5eSAndroid Build Coastguard Worker    field public static final int DIRECTION_OUT = 1; // 0x1
108*344a7f5eSAndroid Build Coastguard Worker  }
109*344a7f5eSAndroid Build Coastguard Worker
110*344a7f5eSAndroid Build Coastguard Worker  public static final class IpSecManager.ResourceUnavailableException extends android.util.AndroidException {
111*344a7f5eSAndroid Build Coastguard Worker  }
112*344a7f5eSAndroid Build Coastguard Worker
113*344a7f5eSAndroid Build Coastguard Worker  public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable {
114*344a7f5eSAndroid Build Coastguard Worker    method public void close();
115*344a7f5eSAndroid Build Coastguard Worker    method public int getSpi();
116*344a7f5eSAndroid Build Coastguard Worker  }
117*344a7f5eSAndroid Build Coastguard Worker
118*344a7f5eSAndroid Build Coastguard Worker  public static final class IpSecManager.SpiUnavailableException extends android.util.AndroidException {
119*344a7f5eSAndroid Build Coastguard Worker    method public int getSpi();
120*344a7f5eSAndroid Build Coastguard Worker  }
121*344a7f5eSAndroid Build Coastguard Worker
122*344a7f5eSAndroid Build Coastguard Worker  public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable {
123*344a7f5eSAndroid Build Coastguard Worker    method public void close() throws java.io.IOException;
124*344a7f5eSAndroid Build Coastguard Worker    method public java.io.FileDescriptor getFileDescriptor();
125*344a7f5eSAndroid Build Coastguard Worker    method public int getPort();
126*344a7f5eSAndroid Build Coastguard Worker  }
127*344a7f5eSAndroid Build Coastguard Worker
128*344a7f5eSAndroid Build Coastguard Worker  public final class IpSecTransform implements java.lang.AutoCloseable {
129*344a7f5eSAndroid Build Coastguard Worker    method public void close();
130*344a7f5eSAndroid Build Coastguard Worker  }
131*344a7f5eSAndroid Build Coastguard Worker
132*344a7f5eSAndroid Build Coastguard Worker  public static class IpSecTransform.Builder {
133*344a7f5eSAndroid Build Coastguard Worker    ctor public IpSecTransform.Builder(@NonNull android.content.Context);
134*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecTransform buildTransportModeTransform(@NonNull java.net.InetAddress, @NonNull android.net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
135*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecTransform.Builder setAuthenticatedEncryption(@NonNull android.net.IpSecAlgorithm);
136*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecTransform.Builder setAuthentication(@NonNull android.net.IpSecAlgorithm);
137*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecTransform.Builder setEncryption(@NonNull android.net.IpSecAlgorithm);
138*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.IpSecTransform.Builder setIpv4Encapsulation(@NonNull android.net.IpSecManager.UdpEncapsulationSocket, int);
139*344a7f5eSAndroid Build Coastguard Worker  }
140*344a7f5eSAndroid Build Coastguard Worker
141*344a7f5eSAndroid Build Coastguard Worker  public class TrafficStats {
142*344a7f5eSAndroid Build Coastguard Worker    ctor public TrafficStats();
143*344a7f5eSAndroid Build Coastguard Worker    method public static void clearThreadStatsTag();
144*344a7f5eSAndroid Build Coastguard Worker    method public static void clearThreadStatsUid();
145*344a7f5eSAndroid Build Coastguard Worker    method public static int getAndSetThreadStatsTag(int);
146*344a7f5eSAndroid Build Coastguard Worker    method public static long getMobileRxBytes();
147*344a7f5eSAndroid Build Coastguard Worker    method public static long getMobileRxPackets();
148*344a7f5eSAndroid Build Coastguard Worker    method public static long getMobileTxBytes();
149*344a7f5eSAndroid Build Coastguard Worker    method public static long getMobileTxPackets();
150*344a7f5eSAndroid Build Coastguard Worker    method public static long getRxBytes(@NonNull String);
151*344a7f5eSAndroid Build Coastguard Worker    method public static long getRxPackets(@NonNull String);
152*344a7f5eSAndroid Build Coastguard Worker    method public static int getThreadStatsTag();
153*344a7f5eSAndroid Build Coastguard Worker    method public static int getThreadStatsUid();
154*344a7f5eSAndroid Build Coastguard Worker    method public static long getTotalRxBytes();
155*344a7f5eSAndroid Build Coastguard Worker    method public static long getTotalRxPackets();
156*344a7f5eSAndroid Build Coastguard Worker    method public static long getTotalTxBytes();
157*344a7f5eSAndroid Build Coastguard Worker    method public static long getTotalTxPackets();
158*344a7f5eSAndroid Build Coastguard Worker    method public static long getTxBytes(@NonNull String);
159*344a7f5eSAndroid Build Coastguard Worker    method public static long getTxPackets(@NonNull String);
160*344a7f5eSAndroid Build Coastguard Worker    method public static long getUidRxBytes(int);
161*344a7f5eSAndroid Build Coastguard Worker    method public static long getUidRxPackets(int);
162*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidTcpRxBytes(int);
163*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidTcpRxSegments(int);
164*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidTcpTxBytes(int);
165*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidTcpTxSegments(int);
166*344a7f5eSAndroid Build Coastguard Worker    method public static long getUidTxBytes(int);
167*344a7f5eSAndroid Build Coastguard Worker    method public static long getUidTxPackets(int);
168*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidUdpRxBytes(int);
169*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidUdpRxPackets(int);
170*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidUdpTxBytes(int);
171*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public static long getUidUdpTxPackets(int);
172*344a7f5eSAndroid Build Coastguard Worker    method public static void incrementOperationCount(int);
173*344a7f5eSAndroid Build Coastguard Worker    method public static void incrementOperationCount(int, int);
174*344a7f5eSAndroid Build Coastguard Worker    method public static void setThreadStatsTag(int);
175*344a7f5eSAndroid Build Coastguard Worker    method public static void setThreadStatsUid(int);
176*344a7f5eSAndroid Build Coastguard Worker    method public static void tagDatagramSocket(@NonNull java.net.DatagramSocket) throws java.net.SocketException;
177*344a7f5eSAndroid Build Coastguard Worker    method public static void tagFileDescriptor(@NonNull java.io.FileDescriptor) throws java.io.IOException;
178*344a7f5eSAndroid Build Coastguard Worker    method public static void tagSocket(@NonNull java.net.Socket) throws java.net.SocketException;
179*344a7f5eSAndroid Build Coastguard Worker    method public static void untagDatagramSocket(@NonNull java.net.DatagramSocket) throws java.net.SocketException;
180*344a7f5eSAndroid Build Coastguard Worker    method public static void untagFileDescriptor(@NonNull java.io.FileDescriptor) throws java.io.IOException;
181*344a7f5eSAndroid Build Coastguard Worker    method public static void untagSocket(@NonNull java.net.Socket) throws java.net.SocketException;
182*344a7f5eSAndroid Build Coastguard Worker    field public static final int UNSUPPORTED = -1; // 0xffffffff
183*344a7f5eSAndroid Build Coastguard Worker  }
184*344a7f5eSAndroid Build Coastguard Worker
185*344a7f5eSAndroid Build Coastguard Worker}
186*344a7f5eSAndroid Build Coastguard Worker
187*344a7f5eSAndroid Build Coastguard Workerpackage android.net.nsd {
188*344a7f5eSAndroid Build Coastguard Worker
189*344a7f5eSAndroid Build Coastguard Worker  public final class NsdManager {
190*344a7f5eSAndroid Build Coastguard Worker    method public void discoverServices(String, int, android.net.nsd.NsdManager.DiscoveryListener);
191*344a7f5eSAndroid Build Coastguard Worker    method public void discoverServices(@NonNull String, int, @Nullable android.net.Network, @NonNull java.util.concurrent.Executor, @NonNull android.net.nsd.NsdManager.DiscoveryListener);
192*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void discoverServices(@NonNull String, int, @NonNull android.net.NetworkRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.nsd.NsdManager.DiscoveryListener);
193*344a7f5eSAndroid Build Coastguard Worker    method public void registerService(android.net.nsd.NsdServiceInfo, int, android.net.nsd.NsdManager.RegistrationListener);
194*344a7f5eSAndroid Build Coastguard Worker    method public void registerService(@NonNull android.net.nsd.NsdServiceInfo, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.nsd.NsdManager.RegistrationListener);
195*344a7f5eSAndroid Build Coastguard Worker    method public void resolveService(android.net.nsd.NsdServiceInfo, android.net.nsd.NsdManager.ResolveListener);
196*344a7f5eSAndroid Build Coastguard Worker    method public void resolveService(@NonNull android.net.nsd.NsdServiceInfo, @NonNull java.util.concurrent.Executor, @NonNull android.net.nsd.NsdManager.ResolveListener);
197*344a7f5eSAndroid Build Coastguard Worker    method public void stopServiceDiscovery(android.net.nsd.NsdManager.DiscoveryListener);
198*344a7f5eSAndroid Build Coastguard Worker    method public void unregisterService(android.net.nsd.NsdManager.RegistrationListener);
199*344a7f5eSAndroid Build Coastguard Worker    field public static final String ACTION_NSD_STATE_CHANGED = "android.net.nsd.STATE_CHANGED";
200*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_NSD_STATE = "nsd_state";
201*344a7f5eSAndroid Build Coastguard Worker    field public static final int FAILURE_ALREADY_ACTIVE = 3; // 0x3
202*344a7f5eSAndroid Build Coastguard Worker    field public static final int FAILURE_INTERNAL_ERROR = 0; // 0x0
203*344a7f5eSAndroid Build Coastguard Worker    field public static final int FAILURE_MAX_LIMIT = 4; // 0x4
204*344a7f5eSAndroid Build Coastguard Worker    field public static final int NSD_STATE_DISABLED = 1; // 0x1
205*344a7f5eSAndroid Build Coastguard Worker    field public static final int NSD_STATE_ENABLED = 2; // 0x2
206*344a7f5eSAndroid Build Coastguard Worker    field public static final int PROTOCOL_DNS_SD = 1; // 0x1
207*344a7f5eSAndroid Build Coastguard Worker  }
208*344a7f5eSAndroid Build Coastguard Worker
209*344a7f5eSAndroid Build Coastguard Worker  public static interface NsdManager.DiscoveryListener {
210*344a7f5eSAndroid Build Coastguard Worker    method public void onDiscoveryStarted(String);
211*344a7f5eSAndroid Build Coastguard Worker    method public void onDiscoveryStopped(String);
212*344a7f5eSAndroid Build Coastguard Worker    method public void onServiceFound(android.net.nsd.NsdServiceInfo);
213*344a7f5eSAndroid Build Coastguard Worker    method public void onServiceLost(android.net.nsd.NsdServiceInfo);
214*344a7f5eSAndroid Build Coastguard Worker    method public void onStartDiscoveryFailed(String, int);
215*344a7f5eSAndroid Build Coastguard Worker    method public void onStopDiscoveryFailed(String, int);
216*344a7f5eSAndroid Build Coastguard Worker  }
217*344a7f5eSAndroid Build Coastguard Worker
218*344a7f5eSAndroid Build Coastguard Worker  public static interface NsdManager.RegistrationListener {
219*344a7f5eSAndroid Build Coastguard Worker    method public void onRegistrationFailed(android.net.nsd.NsdServiceInfo, int);
220*344a7f5eSAndroid Build Coastguard Worker    method public void onServiceRegistered(android.net.nsd.NsdServiceInfo);
221*344a7f5eSAndroid Build Coastguard Worker    method public void onServiceUnregistered(android.net.nsd.NsdServiceInfo);
222*344a7f5eSAndroid Build Coastguard Worker    method public void onUnregistrationFailed(android.net.nsd.NsdServiceInfo, int);
223*344a7f5eSAndroid Build Coastguard Worker  }
224*344a7f5eSAndroid Build Coastguard Worker
225*344a7f5eSAndroid Build Coastguard Worker  public static interface NsdManager.ResolveListener {
226*344a7f5eSAndroid Build Coastguard Worker    method public void onResolveFailed(android.net.nsd.NsdServiceInfo, int);
227*344a7f5eSAndroid Build Coastguard Worker    method public void onServiceResolved(android.net.nsd.NsdServiceInfo);
228*344a7f5eSAndroid Build Coastguard Worker  }
229*344a7f5eSAndroid Build Coastguard Worker
230*344a7f5eSAndroid Build Coastguard Worker  public final class NsdServiceInfo implements android.os.Parcelable {
231*344a7f5eSAndroid Build Coastguard Worker    ctor public NsdServiceInfo();
232*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
233*344a7f5eSAndroid Build Coastguard Worker    method public java.util.Map<java.lang.String,byte[]> getAttributes();
234*344a7f5eSAndroid Build Coastguard Worker    method public java.net.InetAddress getHost();
235*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public android.net.Network getNetwork();
236*344a7f5eSAndroid Build Coastguard Worker    method public int getPort();
237*344a7f5eSAndroid Build Coastguard Worker    method public String getServiceName();
238*344a7f5eSAndroid Build Coastguard Worker    method public String getServiceType();
239*344a7f5eSAndroid Build Coastguard Worker    method public void removeAttribute(String);
240*344a7f5eSAndroid Build Coastguard Worker    method public void setAttribute(String, String);
241*344a7f5eSAndroid Build Coastguard Worker    method public void setHost(java.net.InetAddress);
242*344a7f5eSAndroid Build Coastguard Worker    method public void setNetwork(@Nullable android.net.Network);
243*344a7f5eSAndroid Build Coastguard Worker    method public void setPort(int);
244*344a7f5eSAndroid Build Coastguard Worker    method public void setServiceName(String);
245*344a7f5eSAndroid Build Coastguard Worker    method public void setServiceType(String);
246*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(android.os.Parcel, int);
247*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.nsd.NsdServiceInfo> CREATOR;
248*344a7f5eSAndroid Build Coastguard Worker  }
249*344a7f5eSAndroid Build Coastguard Worker
250*344a7f5eSAndroid Build Coastguard Worker}
251*344a7f5eSAndroid Build Coastguard Worker
252