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

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

Issue 346743002: device/bluetooth: Send GattServiceChanged event for new Chrc. properties. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simple rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SERVICE_CHROMEOS_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // BluetoothGattServiceClient::Observer override. 106 // BluetoothGattServiceClient::Observer override.
107 virtual void GattServicePropertyChanged( 107 virtual void GattServicePropertyChanged(
108 const dbus::ObjectPath& object_path, 108 const dbus::ObjectPath& object_path,
109 const std::string& property_name) OVERRIDE; 109 const std::string& property_name) OVERRIDE;
110 110
111 // BluetoothGattCharacteristicClient::Observer override. 111 // BluetoothGattCharacteristicClient::Observer override.
112 virtual void GattCharacteristicAdded( 112 virtual void GattCharacteristicAdded(
113 const dbus::ObjectPath& object_path) OVERRIDE; 113 const dbus::ObjectPath& object_path) OVERRIDE;
114 virtual void GattCharacteristicRemoved( 114 virtual void GattCharacteristicRemoved(
115 const dbus::ObjectPath& object_path) OVERRIDE; 115 const dbus::ObjectPath& object_path) OVERRIDE;
116 virtual void GattCharacteristicPropertyChanged(
117 const dbus::ObjectPath& object_path,
118 const std::string& property_name) OVERRIDE;
116 119
117 // Object path of the GATT service. 120 // Object path of the GATT service.
118 dbus::ObjectPath object_path_; 121 dbus::ObjectPath object_path_;
119 122
120 // List of observers interested in event notifications from us. 123 // List of observers interested in event notifications from us.
121 ObserverList<device::BluetoothGattService::Observer> observers_; 124 ObserverList<device::BluetoothGattService::Observer> observers_;
122 125
123 // The device this GATT service belongs to. 126 // The device this GATT service belongs to.
124 BluetoothDeviceChromeOS* device_; 127 BluetoothDeviceChromeOS* device_;
125 128
126 // Mapping from GATT characteristic object paths to characteristic objects. 129 // Mapping from GATT characteristic object paths to characteristic objects.
127 // owned by this service. Since the Chrome OS implementation uses object 130 // owned by this service. Since the Chrome OS implementation uses object
128 // paths as unique identifiers, we also use this mapping to return 131 // paths as unique identifiers, we also use this mapping to return
129 // characteristics by identifier. 132 // characteristics by identifier.
130 typedef std::map<dbus::ObjectPath, BluetoothRemoteGattCharacteristicChromeOS*> 133 typedef std::map<dbus::ObjectPath, BluetoothRemoteGattCharacteristicChromeOS*>
131 CharacteristicMap; 134 CharacteristicMap;
132 CharacteristicMap characteristics_; 135 CharacteristicMap characteristics_;
133 136
134 // Note: This should remain the last member so it'll be destroyed and 137 // Note: This should remain the last member so it'll be destroyed and
135 // invalidate its weak pointers before any other members are destroyed. 138 // invalidate its weak pointers before any other members are destroyed.
136 base::WeakPtrFactory<BluetoothRemoteGattServiceChromeOS> weak_ptr_factory_; 139 base::WeakPtrFactory<BluetoothRemoteGattServiceChromeOS> weak_ptr_factory_;
137 140
138 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceChromeOS); 141 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceChromeOS);
139 }; 142 };
140 143
141 } // namespace chromeos 144 } // namespace chromeos
142 145
143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ 146 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698