Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbdf5bab authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

service: use AIDL

Change-Id: Ic6261a9bafc65a5534f4e580ef9cae1fa82b4086
parent 8a8a04cc
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -51,14 +51,14 @@ btserviceCommonSrc := \
	common/bluetooth/uuid.cpp
	common/bluetooth/uuid.cpp


btserviceCommonBinderSrc := \
btserviceCommonBinderSrc := \
	common/bluetooth/binder/IBluetooth.cpp \
	common/android/bluetooth/IBluetooth.aidl \
	common/bluetooth/binder/IBluetoothCallback.cpp \
	common/android/bluetooth/IBluetoothCallback.aidl \
	common/bluetooth/binder/IBluetoothGattClient.cpp \
	common/android/bluetooth/IBluetoothGattClient.aidl \
	common/bluetooth/binder/IBluetoothGattClientCallback.cpp \
	common/android/bluetooth/IBluetoothGattClientCallback.aidl \
	common/bluetooth/binder/IBluetoothGattServer.cpp \
	common/android/bluetooth/IBluetoothGattServer.aidl \
	common/bluetooth/binder/IBluetoothGattServerCallback.cpp \
	common/android/bluetooth/IBluetoothGattServerCallback.aidl \
	common/bluetooth/binder/IBluetoothLowEnergy.cpp \
	common/android/bluetooth/IBluetoothLowEnergy.aidl \
	common/bluetooth/binder/IBluetoothLowEnergyCallback.cpp \
	common/android/bluetooth/IBluetoothLowEnergyCallback.aidl \
	common/android/bluetooth/advertise_data.cpp \
	common/android/bluetooth/advertise_data.cpp \
	common/android/bluetooth/advertise_settings.cpp \
	common/android/bluetooth/advertise_settings.cpp \
	common/android/bluetooth/gatt_identifier.cpp \
	common/android/bluetooth/gatt_identifier.cpp \
+203 −158

File changed.

Preview size limit exceeded, changes collapsed.

+46 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2016 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.
 */

package android.bluetooth;

import android.bluetooth.IBluetoothCallback;
import android.bluetooth.IBluetoothLowEnergy;
import android.bluetooth.IBluetoothGattClient;
import android.bluetooth.IBluetoothGattServer;

import android.bluetooth.UUID;

interface IBluetooth {
  boolean IsEnabled();
  int GetState();
  boolean Enable();
  boolean EnableNoAutoConnect();
  boolean Disable();

  String GetAddress();
  UUID[] GetUUIDs();
  boolean SetName(String name);
  String GetName();

  void RegisterCallback(IBluetoothCallback callback);
  void UnregisterCallback(IBluetoothCallback callback);

  boolean IsMultiAdvertisementSupported();

  IBluetoothLowEnergy GetLowEnergyInterface();
  IBluetoothGattClient GetGattClientInterface();
  IBluetoothGattServer GetGattServerInterface();
}
 No newline at end of file
+21 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2016 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.
 */

package android.bluetooth;

oneway interface IBluetoothCallback {
   void OnBluetoothStateChange(int prev_state, int new_state);
}
 No newline at end of file
+26 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2016 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.
 */

package android.bluetooth;

import android.bluetooth.IBluetoothGattClientCallback;

interface IBluetoothGattClient {

  boolean RegisterClient(in IBluetoothGattClientCallback callback);
  void UnregisterClient(int client_id);
  void UnregisterAll();
}
 No newline at end of file
Loading