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

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

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 4 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include <map> 11 #include <map>
9 #include <queue> 12 #include <queue>
10 #include <string> 13 #include <string>
11 #include <utility> 14 #include <utility>
12 #include <vector> 15 #include <vector>
13 16
14 #include "base/macros.h" 17 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
16 #include "dbus/object_path.h" 19 #include "dbus/object_path.h"
17 #include "device/bluetooth/bluetooth_gatt_characteristic.h" 20 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
(...skipping 16 matching lines...) Expand all
34 // BluetoothGattCharacteristic for remote GATT characteristics on the Chrome OS 37 // BluetoothGattCharacteristic for remote GATT characteristics on the Chrome OS
35 // platform. 38 // platform.
36 class BluetoothRemoteGattCharacteristicBlueZ 39 class BluetoothRemoteGattCharacteristicBlueZ
37 : public device::BluetoothGattCharacteristic, 40 : public device::BluetoothGattCharacteristic,
38 public bluez::BluetoothGattDescriptorClient::Observer { 41 public bluez::BluetoothGattDescriptorClient::Observer {
39 public: 42 public:
40 // device::BluetoothGattCharacteristic overrides. 43 // device::BluetoothGattCharacteristic overrides.
41 std::string GetIdentifier() const override; 44 std::string GetIdentifier() const override;
42 device::BluetoothUUID GetUUID() const override; 45 device::BluetoothUUID GetUUID() const override;
43 bool IsLocal() const override; 46 bool IsLocal() const override;
44 const std::vector<uint8>& GetValue() const override; 47 const std::vector<uint8_t>& GetValue() const override;
45 device::BluetoothGattService* GetService() const override; 48 device::BluetoothGattService* GetService() const override;
46 Properties GetProperties() const override; 49 Properties GetProperties() const override;
47 Permissions GetPermissions() const override; 50 Permissions GetPermissions() const override;
48 bool IsNotifying() const override; 51 bool IsNotifying() const override;
49 std::vector<device::BluetoothGattDescriptor*> GetDescriptors() const override; 52 std::vector<device::BluetoothGattDescriptor*> GetDescriptors() const override;
50 device::BluetoothGattDescriptor* GetDescriptor( 53 device::BluetoothGattDescriptor* GetDescriptor(
51 const std::string& identifier) const override; 54 const std::string& identifier) const override;
52 bool AddDescriptor(device::BluetoothGattDescriptor* descriptor) override; 55 bool AddDescriptor(device::BluetoothGattDescriptor* descriptor) override;
53 bool UpdateValue(const std::vector<uint8>& value) override; 56 bool UpdateValue(const std::vector<uint8_t>& value) override;
54 void ReadRemoteCharacteristic(const ValueCallback& callback, 57 void ReadRemoteCharacteristic(const ValueCallback& callback,
55 const ErrorCallback& error_callback) override; 58 const ErrorCallback& error_callback) override;
56 void WriteRemoteCharacteristic(const std::vector<uint8>& new_value, 59 void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value,
57 const base::Closure& callback, 60 const base::Closure& callback,
58 const ErrorCallback& error_callback) override; 61 const ErrorCallback& error_callback) override;
59 void StartNotifySession(const NotifySessionCallback& callback, 62 void StartNotifySession(const NotifySessionCallback& callback,
60 const ErrorCallback& error_callback) override; 63 const ErrorCallback& error_callback) override;
61 64
62 // Removes one value update session and invokes |callback| on completion. This 65 // Removes one value update session and invokes |callback| on completion. This
63 // decrements the session reference count by 1 and if the number reaches 0, 66 // decrements the session reference count by 1 and if the number reaches 0,
64 // makes a call to the subsystem to stop notifications from this 67 // makes a call to the subsystem to stop notifications from this
65 // characteristic. 68 // characteristic.
66 void RemoveNotifySession(const base::Closure& callback); 69 void RemoveNotifySession(const base::Closure& callback);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // invalidate its weak pointers before any other members are destroyed. 145 // invalidate its weak pointers before any other members are destroyed.
143 base::WeakPtrFactory<BluetoothRemoteGattCharacteristicBlueZ> 146 base::WeakPtrFactory<BluetoothRemoteGattCharacteristicBlueZ>
144 weak_ptr_factory_; 147 weak_ptr_factory_;
145 148
146 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicBlueZ); 149 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicBlueZ);
147 }; 150 };
148 151
149 } // namespace bluez 152 } // namespace bluez
150 153
151 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_ 154 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698