| OLD | NEW |
| 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_GATT_SERVICE_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_ | 6 #define DEVICE_BLUETOOTH_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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // peripheral role events. If |delegate| is NULL, then this service will | 152 // peripheral role events. If |delegate| is NULL, then this service will |
| 153 // employ a default behavior when responding to read and write requests based | 153 // employ a default behavior when responding to read and write requests based |
| 154 // on the cached value of its characteristics and descriptors at a given time. | 154 // on the cached value of its characteristics and descriptors at a given time. |
| 155 static BluetoothGattService* Create(const BluetoothUUID& uuid, | 155 static BluetoothGattService* Create(const BluetoothUUID& uuid, |
| 156 bool is_primary, | 156 bool is_primary, |
| 157 Delegate* delegate); | 157 Delegate* delegate); |
| 158 | 158 |
| 159 // Identifier used to uniquely identify a GATT service object. This is | 159 // Identifier used to uniquely identify a GATT service object. This is |
| 160 // different from the service UUID: while multiple services with the same UUID | 160 // different from the service UUID: while multiple services with the same UUID |
| 161 // can exist on a Bluetooth device, the identifier returned from this method | 161 // can exist on a Bluetooth device, the identifier returned from this method |
| 162 // is unique among all services of a device. The contents of the identifier | 162 // is unique among all services on the adapter. The contents of the identifier |
| 163 // are platform specific. | 163 // are platform specific. |
| 164 virtual std::string GetIdentifier() const = 0; | 164 virtual std::string GetIdentifier() const = 0; |
| 165 | 165 |
| 166 // The Bluetooth-specific UUID of the service. | 166 // The Bluetooth-specific UUID of the service. |
| 167 virtual BluetoothUUID GetUUID() const = 0; | 167 virtual BluetoothUUID GetUUID() const = 0; |
| 168 | 168 |
| 169 // Returns true, if this service hosted locally. If false, then this service | 169 // Returns true, if this service hosted locally. If false, then this service |
| 170 // represents a remote GATT service. | 170 // represents a remote GATT service. |
| 171 virtual bool IsLocal() const = 0; | 171 virtual bool IsLocal() const = 0; |
| 172 | 172 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 protected: | 221 protected: |
| 222 BluetoothGattService(); | 222 BluetoothGattService(); |
| 223 | 223 |
| 224 private: | 224 private: |
| 225 DISALLOW_COPY_AND_ASSIGN(BluetoothGattService); | 225 DISALLOW_COPY_AND_ASSIGN(BluetoothGattService); |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 } // namespace device | 228 } // namespace device |
| 229 | 229 |
| 230 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_ | 230 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_ |
| OLD | NEW |