1 /**
2  * Copyright (c) 2021, 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.nsd;
18 
19 import android.os.Messenger;
20 import android.net.nsd.DiscoveryRequest;
21 import android.net.nsd.NsdServiceInfo;
22 
23 /**
24  * Callbacks from NsdService to NsdManager
25  * @hide
26  */
27 oneway interface INsdManagerCallback {
onDiscoverServicesStarted(int listenerKey, in DiscoveryRequest discoveryRequest)28     void onDiscoverServicesStarted(int listenerKey, in DiscoveryRequest discoveryRequest);
onDiscoverServicesFailed(int listenerKey, int error)29     void onDiscoverServicesFailed(int listenerKey, int error);
onServiceFound(int listenerKey, in NsdServiceInfo info)30     void onServiceFound(int listenerKey, in NsdServiceInfo info);
onServiceLost(int listenerKey, in NsdServiceInfo info)31     void onServiceLost(int listenerKey, in NsdServiceInfo info);
onStopDiscoveryFailed(int listenerKey, int error)32     void onStopDiscoveryFailed(int listenerKey, int error);
onStopDiscoverySucceeded(int listenerKey)33     void onStopDiscoverySucceeded(int listenerKey);
onRegisterServiceFailed(int listenerKey, int error)34     void onRegisterServiceFailed(int listenerKey, int error);
onRegisterServiceSucceeded(int listenerKey, in NsdServiceInfo info)35     void onRegisterServiceSucceeded(int listenerKey, in NsdServiceInfo info);
onUnregisterServiceFailed(int listenerKey, int error)36     void onUnregisterServiceFailed(int listenerKey, int error);
onUnregisterServiceSucceeded(int listenerKey)37     void onUnregisterServiceSucceeded(int listenerKey);
onResolveServiceFailed(int listenerKey, int error)38     void onResolveServiceFailed(int listenerKey, int error);
onResolveServiceSucceeded(int listenerKey, in NsdServiceInfo info)39     void onResolveServiceSucceeded(int listenerKey, in NsdServiceInfo info);
onStopResolutionFailed(int listenerKey, int error)40     void onStopResolutionFailed(int listenerKey, int error);
onStopResolutionSucceeded(int listenerKey)41     void onStopResolutionSucceeded(int listenerKey);
onServiceInfoCallbackRegistrationFailed(int listenerKey, int error)42     void onServiceInfoCallbackRegistrationFailed(int listenerKey, int error);
onServiceUpdated(int listenerKey, in NsdServiceInfo info)43     void onServiceUpdated(int listenerKey, in NsdServiceInfo info);
onServiceUpdatedLost(int listenerKey)44     void onServiceUpdatedLost(int listenerKey);
onServiceInfoCallbackUnregistered(int listenerKey)45     void onServiceInfoCallbackUnregistered(int listenerKey);
46 }
47