| Index: device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
|
| diff --git a/device/bluetooth/bluetooth_local_gatt_service_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
|
| similarity index 19%
|
| copy from device/bluetooth/bluetooth_local_gatt_service_bluez.h
|
| copy to device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
|
| index ad2523aa4d0a1f142fd30ffe50acae21908d4b12..566070ee22fba0cd97ca9935322a3adc7ddc6903 100644
|
| --- a/device/bluetooth/bluetooth_local_gatt_service_bluez.h
|
| +++ b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
|
| @@ -2,68 +2,37 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_
|
| -#define DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_
|
| +#ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_
|
| +#define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_
|
|
|
| -#include <string>
|
| -
|
| -#include "base/callback_forward.h"
|
| #include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "dbus/object_path.h"
|
| -#include "device/bluetooth/bluetooth_gatt_service_bluez.h"
|
| -#include "device/bluetooth/bluetooth_uuid.h"
|
| -
|
| -namespace device {
|
| -
|
| -class BluetoothAdapter;
|
| -class BluetoothDevice;
|
| -class BluetoothGattCharacteristic;
|
| -
|
| -} // namespace device
|
| +#include "device/bluetooth/bluetooth_local_gatt_descriptor.h"
|
| +#include "device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h"
|
|
|
| namespace bluez {
|
|
|
| -class BluetoothAdapterBlueZ;
|
| -class BluetoothDeviceBlueZ;
|
| -
|
| -// The BluetoothLocalGattServiceBlueZ class implements BluetootGattService
|
| -// for local GATT services for platforms that use BlueZ.
|
| -class BluetoothLocalGattServiceBlueZ : public BluetoothGattServiceBlueZ {
|
| +// The BluetoothLocalGattDescriptorBlueZ class implements
|
| +// BluetoothRemoteGattDescriptor for remote and local GATT characteristic
|
| +// descriptors
|
| +// for platforms that use BlueZ.
|
| +class BluetoothLocalGattDescriptorBlueZ
|
| + : public BluetoothGattDescriptorBlueZ,
|
| + public device::BluetoothLocalGattDescriptor {
|
| public:
|
| - // device::BluetoothGattService overrides.
|
| - device::BluetoothUUID GetUUID() const override;
|
| - bool IsLocal() const override;
|
| - bool IsPrimary() const override;
|
| - device::BluetoothDevice* GetDevice() const override;
|
| - bool AddCharacteristic(
|
| - device::BluetoothGattCharacteristic* characteristic) override;
|
| - bool AddIncludedService(device::BluetoothGattService* service) override;
|
| - void Register(const base::Closure& callback,
|
| - const ErrorCallback& error_callback) override;
|
| - void Unregister(const base::Closure& callback,
|
| - const ErrorCallback& error_callback) override;
|
| -
|
| private:
|
| - friend class BluetoothDeviceBlueZ;
|
| -
|
| - BluetoothLocalGattServiceBlueZ(BluetoothAdapterBlueZ* adapter,
|
| - const dbus::ObjectPath& object_path);
|
| - ~BluetoothLocalGattServiceBlueZ() override;
|
| -
|
| - // Called by dbus:: on unsuccessful completion of a request to register a
|
| - // local service.
|
| - void OnRegistrationError(const ErrorCallback& error_callback,
|
| - const std::string& error_name,
|
| - const std::string& error_message);
|
| + explicit BluetoothLocalGattDescriptorBlueZ(
|
| + const dbus::ObjectPath& object_path);
|
| + ~BluetoothLocalGattDescriptorBlueZ() override;
|
|
|
| // Note: This should remain the last member so it'll be destroyed and
|
| // invalidate its weak pointers before any other members are destroyed.
|
| - base::WeakPtrFactory<BluetoothLocalGattServiceBlueZ> weak_ptr_factory_;
|
| + base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattServiceBlueZ);
|
| + DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptorBlueZ);
|
| };
|
|
|
| } // namespace bluez
|
|
|
| -#endif // DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_
|
| +#endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_
|
|
|