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
17package android.net.wifi.aware;
18
19import android.app.PendingIntent;
20
21import android.net.wifi.aware.ConfigRequest;
22import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
23import android.net.wifi.aware.IWifiAwareEventCallback;
24import android.net.wifi.aware.IWifiAwareMacAddressProvider;
25import android.net.wifi.aware.PublishConfig;
26import android.net.wifi.aware.SubscribeConfig;
27import android.net.wifi.aware.Characteristics;
28
29/**
30 * Interface that WifiAwareService implements
31 *
32 * {@hide}
33 */
34interface IWifiAwareManager
35{
36    // Aware API
37    boolean isUsageEnabled();
38    Characteristics getCharacteristics();
39
40    // client API
41    void connect(in IBinder binder, in String callingPackage, in IWifiAwareEventCallback callback,
42            in ConfigRequest configRequest, boolean notifyOnIdentityChanged);
43    void disconnect(int clientId, in IBinder binder);
44
45    void publish(in String callingPackage, int clientId, in PublishConfig publishConfig,
46            in IWifiAwareDiscoverySessionCallback callback);
47    void subscribe(in String callingPackage, int clientId, in SubscribeConfig subscribeConfig,
48            in IWifiAwareDiscoverySessionCallback callback);
49
50    // session API
51    void updatePublish(int clientId, int discoverySessionId, in PublishConfig publishConfig);
52    void updateSubscribe(int clientId, int discoverySessionId, in SubscribeConfig subscribeConfig);
53    void sendMessage(int clientId, int discoverySessionId, int peerId, in byte[] message,
54        int messageId, int retryCount);
55    void terminateSession(int clientId, int discoverySessionId);
56
57    // internal APIs: intended to be used between System Services (restricted permissions)
58    void requestMacAddresses(int uid, in List peerIds, in IWifiAwareMacAddressProvider callback);
59}
60