Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: device/bluetooth/bluez/bluetooth_adapter_bluez.h

Issue 1920353002: Implement create attribute API functions for BTLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api_changes
Patch Set: owners Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void RegisterAudioSink( 112 void RegisterAudioSink(
113 const device::BluetoothAudioSink::Options& options, 113 const device::BluetoothAudioSink::Options& options,
114 const device::BluetoothAdapter::AcquiredCallback& callback, 114 const device::BluetoothAdapter::AcquiredCallback& callback,
115 const device::BluetoothAudioSink::ErrorCallback& error_callback) override; 115 const device::BluetoothAudioSink::ErrorCallback& error_callback) override;
116 116
117 void RegisterAdvertisement( 117 void RegisterAdvertisement(
118 std::unique_ptr<device::BluetoothAdvertisement::Data> advertisement_data, 118 std::unique_ptr<device::BluetoothAdvertisement::Data> advertisement_data,
119 const CreateAdvertisementCallback& callback, 119 const CreateAdvertisementCallback& callback,
120 const CreateAdvertisementErrorCallback& error_callback) override; 120 const CreateAdvertisementErrorCallback& error_callback) override;
121 121
122 device::BluetoothLocalGattService* GetGattService(
123 const std::string& identifier) const override;
124
122 // Locates the device object by object path (the devices map and 125 // Locates the device object by object path (the devices map and
123 // BluetoothDevice methods are by address). 126 // BluetoothDevice methods are by address).
124 BluetoothDeviceBlueZ* GetDeviceWithPath(const dbus::ObjectPath& object_path); 127 BluetoothDeviceBlueZ* GetDeviceWithPath(const dbus::ObjectPath& object_path);
125 128
126 // Announces to observers a change in device state that is not reflected by 129 // Announces to observers a change in device state that is not reflected by
127 // its D-Bus properties. |device| is owned by the caller and cannot be NULL. 130 // its D-Bus properties. |device| is owned by the caller and cannot be NULL.
128 void NotifyDeviceChanged(BluetoothDeviceBlueZ* device); 131 void NotifyDeviceChanged(BluetoothDeviceBlueZ* device);
129 132
130 // Announce to observers a device address change. 133 // Announce to observers a device address change.
131 void NotifyDeviceAddressChanged(BluetoothDeviceBlueZ* device, 134 void NotifyDeviceAddressChanged(BluetoothDeviceBlueZ* device,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 std::map<device::BluetoothUUID, BluetoothAdapterProfileBlueZ*> 417 std::map<device::BluetoothUUID, BluetoothAdapterProfileBlueZ*>
415 released_profiles_; 418 released_profiles_;
416 419
417 // Queue of delegates waiting for a profile to register. 420 // Queue of delegates waiting for a profile to register.
418 std::map<device::BluetoothUUID, std::vector<RegisterProfileCompletionPair>*> 421 std::map<device::BluetoothUUID, std::vector<RegisterProfileCompletionPair>*>
419 profile_queues_; 422 profile_queues_;
420 423
421 std::unique_ptr<device::BluetoothDiscoveryFilter> current_filter_; 424 std::unique_ptr<device::BluetoothDiscoveryFilter> current_filter_;
422 425
423 // List of GATT services that are owned by this adapter. 426 // List of GATT services that are owned by this adapter.
424 std::vector<std::unique_ptr<BluetoothLocalGattServiceBlueZ>> 427 std::map<dbus::ObjectPath, std::unique_ptr<BluetoothLocalGattServiceBlueZ>>
425 owned_gatt_services_; 428 owned_gatt_services_;
426 429
427 // GATT services that are currently available on the GATT server. 430 // GATT services that are currently available on the GATT server.
428 std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*> 431 std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>
429 registered_gatt_services_; 432 registered_gatt_services_;
430 433
431 // DBus Object Manager that acts as a service provider for all the services 434 // DBus Object Manager that acts as a service provider for all the services
432 // that are registered with this adapter. 435 // that are registered with this adapter.
433 std::unique_ptr<BluetoothGattApplicationServiceProvider> 436 std::unique_ptr<BluetoothGattApplicationServiceProvider>
434 gatt_application_provider_; 437 gatt_application_provider_;
435 438
436 // Note: This should remain the last member so it'll be destroyed and 439 // Note: This should remain the last member so it'll be destroyed and
437 // invalidate its weak pointers before any other members are destroyed. 440 // invalidate its weak pointers before any other members are destroyed.
438 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; 441 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_;
439 442
440 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); 443 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ);
441 }; 444 };
442 445
443 } // namespace bluez 446 } // namespace bluez
444 447
445 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ 448 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_local_gatt_service.h ('k') | device/bluetooth/bluez/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698