| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 
|  | 2 // Use of this source code is governed by a BSD-style license that can be | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ | 
|  | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ | 
|  | 7 | 
|  | 8 #include "base/files/file.h" | 
|  | 9 #include "device/bluetooth/bluetooth_device_win.h" | 
|  | 10 #include "device/bluetooth/bluetooth_gatt_service.h" | 
|  | 11 | 
|  | 12 namespace device { | 
|  | 13 | 
|  | 14 // The BluetoothRemoteGattServiceWin class implements BluetoothGattService | 
|  | 15 // for remote GATT services on Windows 8 and later. | 
|  | 16 class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattServiceWin | 
|  | 17     : public BluetoothGattService { | 
|  | 18  public: | 
|  | 19   BluetoothRemoteGattServiceWin( | 
|  | 20       BluetoothDeviceWin* device, | 
|  | 21       base::FilePath service_path, | 
|  | 22       BluetoothUUID service_uuid, | 
|  | 23       uint16_t service_attribute_handle, | 
|  | 24       bool is_primary, | 
|  | 25       BluetoothRemoteGattServiceWin* parent_service, | 
|  | 26       scoped_refptr<base::SequencedTaskRunner>& ui_task_runner); | 
|  | 27   ~BluetoothRemoteGattServiceWin() override; | 
|  | 28 | 
|  | 29   // Override BluetoothGattService interfaces. | 
|  | 30   std::string GetIdentifier() const override; | 
|  | 31   BluetoothUUID GetUUID() const override; | 
|  | 32   bool IsLocal() const override; | 
|  | 33   bool IsPrimary() const override; | 
|  | 34   BluetoothDevice* GetDevice() const override; | 
|  | 35   std::vector<BluetoothGattCharacteristic*> GetCharacteristics() const override; | 
|  | 36   std::vector<BluetoothGattService*> GetIncludedServices() const override; | 
|  | 37   BluetoothGattCharacteristic* GetCharacteristic( | 
|  | 38       const std::string& identifier) const override; | 
|  | 39   bool AddCharacteristic(BluetoothGattCharacteristic* characteristic) override; | 
|  | 40   bool AddIncludedService(BluetoothGattService* service) override; | 
|  | 41   void Register(const base::Closure& callback, | 
|  | 42                 const ErrorCallback& error_callback) override; | 
|  | 43   void Unregister(const base::Closure& callback, | 
|  | 44                   const ErrorCallback& error_callback) override; | 
|  | 45 | 
|  | 46   // Update included services and characteristics. | 
|  | 47   void Update(); | 
|  | 48   uint16_t GetAttributeHandle(); | 
|  | 49 | 
|  | 50  private: | 
|  | 51   BluetoothDeviceWin* device_; | 
|  | 52   base::FilePath service_path_; | 
|  | 53   BluetoothUUID service_uuid_; | 
|  | 54   uint16_t service_attribute_handle_; | 
|  | 55   bool is_primary_; | 
|  | 56   BluetoothRemoteGattServiceWin* parent_service_; | 
|  | 57   scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 
|  | 58 | 
|  | 59   DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceWin); | 
|  | 60 }; | 
|  | 61 | 
|  | 62 }  // namespace device. | 
|  | 63 #endif  // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ | 
| OLD | NEW | 
|---|