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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h

Issue 2039773005: Add support in Chrome to send notifications to a specific device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 // property are delegated to the Delegate object, an instance of which is 31 // property are delegated to the Delegate object, an instance of which is
32 // mandatory during initialization. In addition, a "SendValueChanged" method is 32 // mandatory during initialization. In addition, a "SendValueChanged" method is
33 // provided, which emits a DBus.Properties.PropertyChanged signal for the 33 // provided, which emits a DBus.Properties.PropertyChanged signal for the
34 // "Value" property. 34 // "Value" property.
35 class DEVICE_BLUETOOTH_EXPORT BluetoothGattCharacteristicServiceProvider { 35 class DEVICE_BLUETOOTH_EXPORT BluetoothGattCharacteristicServiceProvider {
36 public: 36 public:
37 virtual ~BluetoothGattCharacteristicServiceProvider(); 37 virtual ~BluetoothGattCharacteristicServiceProvider();
38 38
39 // Send a PropertyChanged signal to notify the Bluetooth daemon that the value 39 // Send a PropertyChanged signal to notify the Bluetooth daemon that the value
40 // of the "Value" property has changed to |value|. 40 // of the "Value" property has changed to |value|.
41 virtual void SendValueChanged(const std::vector<uint8_t>& value) = 0; 41 virtual void SendValueChanged(const dbus::ObjectPath& device_path,
42 const std::vector<uint8_t>& value,
43 bool indicate) = 0;
42 44
43 // Writes the characteristics's properties into the provided writer. If 45 // Writes the characteristics's properties into the provided writer. If
44 // value is not null, it is written also, otherwise no value property is 46 // value is not null, it is written also, otherwise no value property is
45 // written. 47 // written.
46 virtual void WriteProperties(dbus::MessageWriter* writer) {} 48 virtual void WriteProperties(dbus::MessageWriter* writer) {}
47 49
48 virtual const dbus::ObjectPath& object_path() const = 0; 50 virtual const dbus::ObjectPath& object_path() const = 0;
49 51
50 // Creates the instance, where |bus| is the D-Bus bus connection to export 52 // Creates the instance, where |bus| is the D-Bus bus connection to export
51 // the object onto, |uuid| is the 128-bit GATT characteristic UUID, 53 // the object onto, |uuid| is the 128-bit GATT characteristic UUID,
(...skipping 20 matching lines...) Expand all
72 protected: 74 protected:
73 BluetoothGattCharacteristicServiceProvider(); 75 BluetoothGattCharacteristicServiceProvider();
74 76
75 private: 77 private:
76 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProvider); 78 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProvider);
77 }; 79 };
78 80
79 } // namespace bluez 81 } // namespace bluez
80 82
81 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_ H_ 83 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698