• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 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.wifi.aware;
18 
19 /**
20  * Base class for Aware attach callbacks. Should be extended by applications and set when calling
21  * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}. These are callbacks
22  * applying to the Aware connection as a whole - not to specific publish or subscribe sessions -
23  * for that see {@link DiscoverySessionCallback}.
24  */
25 public class AttachCallback {
26     /**
27      * Called when Aware attach operation
28      * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}
29      * is completed and that we can now start discovery sessions or connections.
30      *
31      * @param session The Aware object on which we can execute further Aware operations - e.g.
32      *                discovery, connections.
33      */
onAttached(WifiAwareSession session)34     public void onAttached(WifiAwareSession session) {
35         /* empty */
36     }
37 
38     /**
39      * Called when Aware attach operation
40      * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)} failed.
41      */
onAttachFailed()42     public void onAttachFailed() {
43         /* empty */
44     }
45 }
46