/system/sepolicy/ |
D | bluetooth.te | 1 # bluetooth subsystem 2 type bluetooth, domain, domain_deprecated; 3 app_domain(bluetooth) 4 net_domain(bluetooth) 6 wakelock_use(bluetooth); 9 allow bluetooth bluetooth_data_file:dir create_dir_perms; 10 allow bluetooth bluetooth_data_file:notdevfile_class_set create_file_perms; 13 type_transition bluetooth bluetooth_data_file:sock_file bluetooth_socket; 14 allow bluetooth bluetooth_socket:sock_file create_file_perms; 16 # bluetooth factory file accesses. [all …]
|
/system/bt/service/ipc/binder/ |
D | bluetooth_gatt_server_binder_server.h | 26 namespace bluetooth { 36 public bluetooth::GattServer::Delegate { 38 explicit BluetoothGattServerBinderServer(bluetooth::Adapter* adapter); 47 int server_id, bool is_primary, const bluetooth::UUID& uuid, 48 std::unique_ptr<bluetooth::GattIdentifier>* out_id) override; 50 int server_id, const bluetooth::UUID& uuid, 52 std::unique_ptr<bluetooth::GattIdentifier>* out_id) override; 54 int server_id, const bluetooth::UUID& uuid, int permissions, 55 std::unique_ptr<bluetooth::GattIdentifier>* out_id) override; 63 const bluetooth::GattIdentifier& characteristic_id, [all …]
|
D | bluetooth_low_energy_binder_server.h | 29 namespace bluetooth { 40 public bluetooth::LowEnergyClient::Delegate { 42 explicit BluetoothLowEnergyBinderServer(bluetooth::Adapter* adapter); 55 const bluetooth::ScanSettings& settings, 56 const std::vector<bluetooth::ScanFilter>& filters) override; 60 const bluetooth::AdvertiseData& advertise_data, 61 const bluetooth::AdvertiseData& scan_response, 62 const bluetooth::AdvertiseSettings& settings) override; 66 void OnConnectionState(bluetooth::LowEnergyClient* client, int status, 68 void OnMtuChanged(bluetooth::LowEnergyClient* client, int status, [all …]
|
D | bluetooth_gatt_server_binder_server.cpp | 31 bluetooth::Adapter* adapter) : adapter_(adapter) { in BluetoothGattServerBinderServer() 38 bluetooth::GattServerFactory* gatt_server_factory = in RegisterServer() 55 int server_id, bool is_primary, const bluetooth::UUID& uuid, in BeginServiceDeclaration() 56 std::unique_ptr<bluetooth::GattIdentifier>* out_id) { in BeginServiceDeclaration() 80 int server_id, const bluetooth::UUID& uuid, in AddCharacteristic() 82 std::unique_ptr<bluetooth::GattIdentifier>* out_id) { in AddCharacteristic() 106 int server_id, const bluetooth::UUID& uuid, int permissions, in AddDescriptor() 107 std::unique_ptr<bluetooth::GattIdentifier>* out_id) { in AddDescriptor() 144 bluetooth::BLEStatus status, in EndServiceDeclaration() 145 const bluetooth::GattIdentifier& service_id) { in EndServiceDeclaration() [all …]
|
D | interface_with_instances_base.cpp | 26 bluetooth::BluetoothInstanceFactory* factory) { in RegisterInstanceBase() 37 bluetooth::UUID app_uuid = bluetooth::UUID::GetRandom(); in RegisterInstanceBase() 48 bluetooth::BluetoothInstanceFactory::RegisterCallback cb = in RegisterInstanceBase() 50 bluetooth::BLEStatus status, in RegisterInstanceBase() 51 const bluetooth::UUID& in_uuid, in RegisterInstanceBase() 52 std::unique_ptr<bluetooth::BluetoothInstance> instance) { in RegisterInstanceBase() 96 std::shared_ptr<bluetooth::BluetoothInstance> 100 return std::shared_ptr<bluetooth::BluetoothInstance>(); in GetInstance() 105 bluetooth::BLEStatus status, in OnRegisterInstance() 106 const bluetooth::UUID& uuid, in OnRegisterInstance() [all …]
|
D | interface_with_instances_base.h | 52 bluetooth::BluetoothInstanceFactory* factory); 72 std::shared_ptr<bluetooth::BluetoothInstance> GetInstance( 78 bluetooth::BLEStatus status, 79 const bluetooth::UUID& uuid, 80 std::unique_ptr<bluetooth::BluetoothInstance> instance); 86 bluetooth::BLEStatus status, 88 bluetooth::BluetoothInstance* instance) = 0; 95 RemoteCallbackMap<bluetooth::UUID, android::IInterface> pending_callbacks_; 101 std::unordered_map<int, std::shared_ptr<bluetooth::BluetoothInstance>>
|
D | bluetooth_low_energy_binder_server.cpp | 31 bluetooth::Adapter* adapter) : adapter_(adapter) { in BluetoothLowEnergyBinderServer() 41 bluetooth::LowEnergyClientFactory* ble_factory = in RegisterClient() 108 const bluetooth::ScanSettings& settings, in StartScan() 109 const std::vector<bluetooth::ScanFilter>& filters) { in StartScan() 137 const bluetooth::AdvertiseData& advertise_data, in StartMultiAdvertising() 138 const bluetooth::AdvertiseData& scan_response, in StartMultiAdvertising() 139 const bluetooth::AdvertiseSettings& settings) { in StartMultiAdvertising() 153 auto callback = [=](bluetooth::BLEStatus status) { in StartMultiAdvertising() 194 auto callback = [=](bluetooth::BLEStatus status) { in StopMultiAdvertising() 221 bluetooth::LowEnergyClient* client, int status, in OnConnectionState() [all …]
|
D | bluetooth_gatt_client_binder_server.h | 26 namespace bluetooth { 37 explicit BluetoothGattClientBinderServer(bluetooth::Adapter* adapter); 55 std::shared_ptr<bluetooth::GattClient> GetGattClient(int client_id); 59 bluetooth::BLEStatus status, 61 bluetooth::BluetoothInstance* instance) override; 63 bluetooth::Adapter* adapter_; // weak
|
D | bluetooth_gatt_client_binder_server.cpp | 31 bluetooth::Adapter* adapter) : adapter_(adapter) { in BluetoothGattClientBinderServer() 39 bluetooth::GattClientFactory* gatt_client_factory = in RegisterClient() 62 std::shared_ptr<bluetooth::GattClient> 64 return std::static_pointer_cast<bluetooth::GattClient>( in GetGattClient() 69 bluetooth::BLEStatus status, in OnRegisterInstanceImpl() 71 bluetooth::BluetoothInstance* instance) { in OnRegisterInstanceImpl() 79 (status == bluetooth::BLE_STATUS_SUCCESS) ? in OnRegisterInstanceImpl()
|
D | bluetooth_binder_server.h | 40 public bluetooth::Adapter::Observer { 42 explicit BluetoothBinderServer(bluetooth::Adapter* adapter); 53 std::vector<bluetooth::UUID> GetUUIDs() override; 69 void OnAdapterStateChanged(bluetooth::Adapter* adapter, 70 bluetooth::AdapterState prev_state, 71 bluetooth::AdapterState new_state) override; 74 bluetooth::Adapter* adapter_; // weak
|
/system/bt/service/test/ |
D | adapter_unittest.cpp | 25 namespace bluetooth { namespace 60 class TestObserver final : public bluetooth::Adapter::Observer { 62 TestObserver(bluetooth::Adapter* adapter) in TestObserver() 64 prev_state_(bluetooth::ADAPTER_STATE_INVALID), in TestObserver() 65 cur_state_(bluetooth::ADAPTER_STATE_INVALID), in TestObserver() 75 bluetooth::AdapterState prev_state() const { return prev_state_; } in prev_state() 76 bluetooth::AdapterState cur_state() const { return cur_state_; } in cur_state() 87 void OnAdapterStateChanged(bluetooth::Adapter* adapter, in OnAdapterStateChanged() 88 bluetooth::AdapterState prev_state, in OnAdapterStateChanged() 89 bluetooth::AdapterState new_state) override { in OnAdapterStateChanged() [all …]
|
D | ipc_linux_unittest.cpp | 52 auto mock_daemon = new bluetooth::testing::MockDaemon(); in SetUp() 58 bluetooth::Daemon::InitializeForTesting(mock_daemon); in SetUp() 59 bluetooth::hal::BluetoothInterface::InitializeForTesting( in SetUp() 60 new bluetooth::hal::FakeBluetoothInterface()); in SetUp() 61 bluetooth::hal::BluetoothGattInterface::InitializeForTesting( in SetUp() 62 new bluetooth::hal::FakeBluetoothGattInterface(nullptr, nullptr)); in SetUp() 64 adapter_ = bluetooth::Adapter::Create(); in SetUp() 72 bluetooth::hal::BluetoothGattInterface::CleanUp(); in TearDown() 73 bluetooth::hal::BluetoothInterface::CleanUp(); in TearDown() 74 bluetooth::Daemon::ShutDown(); in TearDown() [all …]
|
/system/bt/service/common/bluetooth/binder/ |
D | parcel_helpers.h | 40 const bluetooth::AdvertiseData& data, 43 std::unique_ptr<bluetooth::AdvertiseData> CreateAdvertiseDataFromParcel( 49 const bluetooth::AdvertiseSettings& settings, 52 std::unique_ptr<bluetooth::AdvertiseSettings> CreateAdvertiseSettingsFromParcel( 57 void WriteUUIDToParcel(const bluetooth::UUID& uuid, android::Parcel* parcel); 59 std::unique_ptr<bluetooth::UUID> CreateUUIDFromParcel( 65 const bluetooth::GattIdentifier& gatt_id, 68 std::unique_ptr<bluetooth::GattIdentifier> CreateGattIdentifierFromParcel( 74 const bluetooth::ScanFilter& filter, 77 std::unique_ptr<bluetooth::ScanFilter> CreateScanFilterFromParcel( [all …]
|
D | IBluetoothGattServer.h | 68 int server_if, bool is_primary, const bluetooth::UUID& uuid, 69 std::unique_ptr<bluetooth::GattIdentifier>* out_id) = 0; 71 int server_if, const bluetooth::UUID& uuid, 73 std::unique_ptr<bluetooth::GattIdentifier>* out_id) = 0; 75 int server_if, const bluetooth::UUID& uuid, int permissions, 76 std::unique_ptr<bluetooth::GattIdentifier>* out_id) = 0; 89 const bluetooth::GattIdentifier& characteristic_id, 130 int server_if, bool is_primary, const bluetooth::UUID& uuid, 131 std::unique_ptr<bluetooth::GattIdentifier>* out_id) override; 133 int server_if, const bluetooth::UUID& uuid, [all …]
|
D | IBluetoothLowEnergy.h | 83 const bluetooth::ScanSettings& settings, 84 const std::vector<bluetooth::ScanFilter>& filters) = 0; 89 const bluetooth::AdvertiseData& advertise_data, 90 const bluetooth::AdvertiseData& scan_response, 91 const bluetooth::AdvertiseSettings& settings) = 0; 136 const bluetooth::ScanSettings& settings, 137 const std::vector<bluetooth::ScanFilter>& filters) override; 141 const bluetooth::AdvertiseData& advertise_data, 142 const bluetooth::AdvertiseData& scan_response, 143 const bluetooth::AdvertiseSettings& settings) override;
|
D | IBluetoothGattServerCallback.h | 60 int status, const bluetooth::GattIdentifier& service_id) = 0; 65 const bluetooth::GattIdentifier& characteristic_id) = 0; 70 const bluetooth::GattIdentifier& descriptor_id) = 0; 76 const bluetooth::GattIdentifier& characteristic_id) = 0; 82 const bluetooth::GattIdentifier& descriptor_id) = 0; 124 const bluetooth::GattIdentifier& service_id) override; 128 const bluetooth::GattIdentifier& characteristic_id) override; 132 const bluetooth::GattIdentifier& descriptor_id) override; 137 const bluetooth::GattIdentifier& characteristic_id) override; 142 const bluetooth::GattIdentifier& descriptor_id) override;
|
/system/bt/service/example/heart_rate/ |
D | heart_rate_server.cpp | 41 void OnScanResult(const bluetooth::ScanResult& scan_result) override {} in OnScanResult() 44 if (status != bluetooth::BLE_STATUS_SUCCESS) { in OnClientRegistered() 55 bluetooth::AdvertiseSettings settings( in OnClientRegistered() 56 bluetooth::AdvertiseSettings::MODE_LOW_POWER, in OnClientRegistered() 58 bluetooth::AdvertiseSettings::TX_POWER_LEVEL_MEDIUM, in OnClientRegistered() 61 bluetooth::AdvertiseData adv_data(data); in OnClientRegistered() 65 bluetooth::AdvertiseData scan_rsp; in OnClientRegistered() 72 const bluetooth::AdvertiseSettings& /* settings */) { in OnMultiAdvertiseCallback() 83 android::sp<ipc::binder::IBluetooth> bluetooth, in HeartRateServer() argument 87 bluetooth_(bluetooth), in HeartRateServer() [all …]
|
D | heart_rate_server.h | 37 android::sp<ipc::binder::IBluetooth> bluetooth, 58 const bluetooth::GattIdentifier& service_id) override; 62 const bluetooth::GattIdentifier& characteristic_id) override; 66 const bluetooth::GattIdentifier& descriptor_id) override; 71 const bluetooth::GattIdentifier& characteristic_id) override; 76 const bluetooth::GattIdentifier& descriptor_id) override; 116 bluetooth::GattIdentifier hr_service_id_; 117 bluetooth::GattIdentifier hr_measurement_id_; 118 bluetooth::GattIdentifier hr_measurement_cccd_id_; 119 bluetooth::GattIdentifier body_sensor_loc_id_; [all …]
|
D | constants.h | 31 const bluetooth::UUID kCCCDescriptorUUID("2902"); 32 const bluetooth::UUID kHRServiceUUID("180D"); 33 const bluetooth::UUID kHRMeasurementUUID("2A37"); 34 const bluetooth::UUID kBodySensorLocationUUID("2A38"); 35 const bluetooth::UUID kHRControlPointUUID("2A39");
|
/system/bt/test/suite/gatt/ |
D | gatt_test.h | 27 public bluetooth::hal::BluetoothGattInterface::ClientObserver, 28 public bluetooth::hal::BluetoothGattInterface::ServerObserver { 57 bluetooth::hal::BluetoothGattInterface* /* unused */, 60 bluetooth::hal::BluetoothGattInterface* /* unused */, 63 bluetooth::hal::BluetoothGattInterface* /* unused */, 68 bluetooth::hal::BluetoothGattInterface* /* unused */, 71 bluetooth::hal::BluetoothGattInterface* /* unused */, 75 bluetooth::hal::BluetoothGattInterface* /* unused */, 79 bluetooth::hal::BluetoothGattInterface* /* unused */, 83 bluetooth::hal::BluetoothGattInterface* /* unused */, [all …]
|
D | gatt_test.cpp | 56 bluetooth::hal::BluetoothGattInterface::Initialize(); in SetUp() 57 ASSERT_TRUE(bluetooth::hal::BluetoothGattInterface::IsInitialized()); in SetUp() 58 auto gatt_interface = bluetooth::hal::BluetoothGattInterface::Get(); in SetUp() 85 bluetooth::hal::BluetoothGattInterface::CleanUp(); in TearDown() 101 bluetooth::hal::BluetoothGattInterface* /* unused */, in RegisterClientCallback() 109 bluetooth::hal::BluetoothGattInterface* /* unused */, in ScanResultCallback() 115 bluetooth::hal::BluetoothGattInterface* /* unused */, in ListenCallback() 124 bluetooth::hal::BluetoothGattInterface* /* unused */, in RegisterServerCallback() 132 bluetooth::hal::BluetoothGattInterface* /* unused */, in ServiceAddedCallback() 142 bluetooth::hal::BluetoothGattInterface* /* unused */, in CharacteristicAddedCallback() [all …]
|
/system/bt/service/ |
D | Android.mk | 42 common/bluetooth/adapter_state.cpp \ 43 common/bluetooth/advertise_data.cpp \ 44 common/bluetooth/advertise_settings.cpp \ 45 common/bluetooth/gatt_identifier.cpp \ 46 common/bluetooth/scan_filter.cpp \ 47 common/bluetooth/scan_result.cpp \ 48 common/bluetooth/scan_settings.cpp \ 49 common/bluetooth/util/address_helper.cpp \ 50 common/bluetooth/util/atomic_string.cpp \ 51 common/bluetooth/uuid.cpp [all …]
|
D | main.cpp | 61 if (command_line->HasSwitch(bluetooth::switches::kHelpLong) || in main() 62 command_line->HasSwitch(bluetooth::switches::kHelpShort)) { in main() 63 LOG(INFO) << bluetooth::switches::kHelpMessage; in main() 78 if (!bluetooth::Daemon::Initialize()) { in main() 84 bluetooth::Daemon::Get()->StartMainLoop(); in main() 87 bluetooth::Daemon::Get()->ShutDown(); in main()
|
D | BUILD.gn | 27 "common/bluetooth/advertise_data.cpp", 28 "common/bluetooth/adapter_state.cpp", 29 "common/bluetooth/uuid.cpp", 30 "common/bluetooth/scan_filter.cpp", 31 "common/bluetooth/scan_result.cpp", 32 "common/bluetooth/scan_settings.cpp", 33 "common/bluetooth/gatt_identifier.cpp", 34 "common/bluetooth/advertise_settings.cpp", 35 "common/bluetooth/util/atomic_string.cpp", 36 "common/bluetooth/util/address_helper.cpp",
|
/system/bt/service/common/ |
D | README | 1 This directory contains all the "common" sources between the bluetooth daemon 2 and our client library. All source files here are under the "bluetooth" 4 Only common files should go here. All headers that go into common/bluetooth must 5 only include other headers from common/bluetooth and must use "bluetooth" as the 8 #include <bluetooth/uuid.h> 16 common/bluetooth/adapter_state.cpp should do: 18 #include "service/common/bluetooth/adapter_state.h"
|