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

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

Issue 134263008: device/bluetooth: Add abstract API definition for BluetoothGattDescriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « device/bluetooth/bluetooth_gatt_descriptor.cc ('k') | no next file » | 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_GATT_SERVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_GATT_SERVICE_H_
6 #define DEVICE_BLUETOOTH_GATT_SERVICE_H_ 6 #define DEVICE_BLUETOOTH_GATT_SERVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 BluetoothGattService* service, 140 BluetoothGattService* service,
141 const std::vector<BluetoothGattService*>& included_services) {} 141 const std::vector<BluetoothGattService*>& included_services) {}
142 142
143 // Called when the characteristics that belong to |service| have changed. 143 // Called when the characteristics that belong to |service| have changed.
144 virtual void CharacteristicsChanged( 144 virtual void CharacteristicsChanged(
145 BluetoothGattService* service, 145 BluetoothGattService* service,
146 const std::vector<BluetoothGattCharacteristic*>& characteristics) {} 146 const std::vector<BluetoothGattCharacteristic*>& characteristics) {}
147 }; 147 };
148 148
149 // The ErrorCallback is used by methods to asynchronously report errors. 149 // The ErrorCallback is used by methods to asynchronously report errors.
150 typedef base::Callback<const std::string&> ErrorCallback; 150 typedef base::Callback<void(const std::string&)> ErrorCallback;
151 151
152 // Constructs a BluetoothGattService that can be locally hosted when the local 152 // Constructs a BluetoothGattService that can be locally hosted when the local
153 // adapter is in the peripheral role. The resulting object can then be made 153 // adapter is in the peripheral role. The resulting object can then be made
154 // available by calling the "Register" method. This method constructs a 154 // available by calling the "Register" method. This method constructs a
155 // service with UUID |uuid|. Whether the constructed service is primary or 155 // service with UUID |uuid|. Whether the constructed service is primary or
156 // secondary is determined by |is_primary|. |delegate| is used to send certain 156 // secondary is determined by |is_primary|. |delegate| is used to send certain
157 // peripheral role events. If |delegate| is NULL, then this service will 157 // peripheral role events. If |delegate| is NULL, then this service will
158 // employ a default behavior when responding to read and write requests based 158 // employ a default behavior when responding to read and write requests based
159 // on the cached value of its characteristics and descriptors at a given time. 159 // on the cached value of its characteristics and descriptors at a given time.
160 static BluetoothGattService* Create(const bluetooth_utils::UUID& uuid, 160 static BluetoothGattService* Create(const bluetooth_utils::UUID& uuid,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 BluetoothGattService(); 217 BluetoothGattService();
218 virtual ~BluetoothGattService(); 218 virtual ~BluetoothGattService();
219 219
220 private: 220 private:
221 DISALLOW_COPY_AND_ASSIGN(BluetoothGattService); 221 DISALLOW_COPY_AND_ASSIGN(BluetoothGattService);
222 }; 222 };
223 223
224 } // namespace device 224 } // namespace device
225 225
226 #endif // DEVICE_BLUETOOTH_GATT_SERVICE_H_ 226 #endif // DEVICE_BLUETOOTH_GATT_SERVICE_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_gatt_descriptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698