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

Side by Side Diff: device/bluetooth/bluetooth_remote_gatt_service_win.h

Issue 1681853003: Add BluetoothRemoteGattServiceWin to BluetoothDeviceWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add PlatformSupportsLowEnergy check in the unittests Created 4 years, 10 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698