| /* |
| * Copyright (C) 2015, The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /** |
| * Binder IPC API for interacting with Bluetooth Low-Energy features. |
| */ |
| interface IBluetoothLowEnergy { |
| /** |
| * Registers a client application that can manage its own Low Energy |
| * instance. A special client interface ID will be returned in a callback to |
| * the application that can be used to perform Low Energy operations. Returns |
| * false in case of an error. |
| */ |
| boolean registerClient(in IBluetoothLowEnergyCallback callback); |
| |
| /** |
| * Unregisters a previously registered client with "client interface ID" |
| * |client_if|. |
| */ |
| void unregisterClient(in int client_if); |
| |
| /** |
| * Unregisters all previous registered clients. |
| */ |
| void unregisterAll(); |
| |
| /** |
| * Starts a multi-advertising instance with the given advertising and scan |
| * response data, both of which can be empty. Each of these parameters must |
| * contain the raw advertising packet. Returns false if there were any |
| * synchronous failures, e.g. if the advertising or scan response data are |
| * incorrectly formatted. Otherwise, the result of the operation will be |
| * asynchronously reported in |
| * IBluetoothLowEnergyCallback.onMultiAdvertiseCallback. See the headers in |
| * common/bluetooth/binder for documentation on the AdvertiseData and |
| * AdvertiseSettings data types. |
| */ |
| boolean startMultiAdvertising(in int client_if, |
| in AdvertiseData advertise_data, |
| in AdvertiseData scan_response_data, |
| in AdvertiseSettings settings); |
| |
| /** |
| * Stops the previously started multi-advertising instance for the given |
| * client. Returns false in case of an error, e.g. this client has not started |
| * an instance. |
| */ |
| boolean stopMultiAdvertising(in int client_if); |
| } |