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

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

Issue 1973343005: Remove service, add device, in BluetoothLocalGattService::Delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 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 2016 The Chromium Authors. All rights reserved. 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 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_LOCAL_GATT_CHARACTERISTIC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // read and write requests. The service instance will contain this 48 // read and write requests. The service instance will contain this
49 // characteristic. 49 // characteristic.
50 // TODO(rkc): Investigate how to handle |PROPERTY_EXTENDED_PROPERTIES| 50 // TODO(rkc): Investigate how to handle |PROPERTY_EXTENDED_PROPERTIES|
51 // correctly. 51 // correctly.
52 static base::WeakPtr<BluetoothLocalGattCharacteristic> Create( 52 static base::WeakPtr<BluetoothLocalGattCharacteristic> Create(
53 const BluetoothUUID& uuid, 53 const BluetoothUUID& uuid,
54 Properties properties, 54 Properties properties,
55 Permissions permissions, 55 Permissions permissions,
56 BluetoothLocalGattService* service); 56 BluetoothLocalGattService* service);
57 57
58 // Notify that the remote central that the value of this characteristic has 58 // Notify that the remote device |device| that the value of characteristic
scheib 2016/05/17 19:54:27 "Notify the remote"
rkc 2016/05/17 19:56:35 Done.
59 // been changed and the new value is |new_value|. |indicate| should be set to 59 // |characteristic| has changed and the new value is |new_value|. |indicate|
60 // true if we want to use an indication instead of a notification. An 60 // should be set to true if we want to use an indication instead of a
61 // indication waits for a response from the remote, making it more reliable 61 // notification. An indication waits for a response from the remote, making
62 // but notifications may be faster. 62 // it more reliable but notifications may be faster.
63 virtual NotificationStatus NotifyValueChanged( 63 virtual NotificationStatus NotifyValueChanged(
64 const BluetoothDevice* device,
64 const std::vector<uint8_t>& new_value, 65 const std::vector<uint8_t>& new_value,
65 bool indicate) = 0; 66 bool indicate) = 0;
66 67
68 virtual BluetoothLocalGattService* GetService() const = 0;
69
67 protected: 70 protected:
68 BluetoothLocalGattCharacteristic(); 71 BluetoothLocalGattCharacteristic();
69 ~BluetoothLocalGattCharacteristic() override; 72 ~BluetoothLocalGattCharacteristic() override;
70 73
71 private: 74 private:
72 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattCharacteristic); 75 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattCharacteristic);
73 }; 76 };
74 77
75 } // namespace device 78 } // namespace device
76 79
77 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_H_ 80 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698