| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "device/bluetooth/bluetooth_export.h" | 12 #include "device/bluetooth/bluetooth_export.h" |
| 13 #include "device/bluetooth/bluetooth_uuid.h" | 13 #include "device/bluetooth/bluetooth_uuid.h" |
| 14 | 14 |
| 15 namespace device { | 15 namespace device { |
| 16 | 16 |
| 17 // BluetoothGattService represents a local or remote GATT service. A GATT | 17 // BluetoothGattService represents a local or remote GATT service. A GATT |
| 18 // service is hosted by a peripheral and represents a collection of data in | 18 // service is hosted by a peripheral and represents a collection of data in |
| 19 // the form of GATT characteristics and a set of included GATT services if this | 19 // the form of GATT characteristics and a set of included GATT services if this |
| 20 // service is what is called "a primary service". | 20 // service is what is called "a primary service". |
| 21 class DEVICE_BLUETOOTH_EXPORT BluetoothGattService { | 21 class DEVICE_BLUETOOTH_EXPORT BluetoothGattService { |
| 22 public: | 22 public: |
| 23 // Interacting with Characteristics and Descriptors can produce | 23 // Interacting with Characteristics and Descriptors can produce |
| 24 // this set of errors. | 24 // this set of errors. |
| 25 // TODO(rkc): Update this list. |
| 25 enum GattErrorCode { | 26 enum GattErrorCode { |
| 26 GATT_ERROR_UNKNOWN = 0, | 27 GATT_ERROR_UNKNOWN = 0, |
| 27 GATT_ERROR_FAILED, | 28 GATT_ERROR_FAILED, |
| 28 GATT_ERROR_IN_PROGRESS, | 29 GATT_ERROR_IN_PROGRESS, |
| 29 GATT_ERROR_INVALID_LENGTH, | 30 GATT_ERROR_INVALID_LENGTH, |
| 30 GATT_ERROR_NOT_PERMITTED, | 31 GATT_ERROR_NOT_PERMITTED, |
| 31 GATT_ERROR_NOT_AUTHORIZED, | 32 GATT_ERROR_NOT_AUTHORIZED, |
| 32 GATT_ERROR_NOT_PAIRED, | 33 GATT_ERROR_NOT_PAIRED, |
| 33 GATT_ERROR_NOT_SUPPORTED | 34 GATT_ERROR_NOT_SUPPORTED |
| 34 }; | 35 }; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 58 protected: | 59 protected: |
| 59 BluetoothGattService(); | 60 BluetoothGattService(); |
| 60 | 61 |
| 61 private: | 62 private: |
| 62 DISALLOW_COPY_AND_ASSIGN(BluetoothGattService); | 63 DISALLOW_COPY_AND_ASSIGN(BluetoothGattService); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace device | 66 } // namespace device |
| 66 | 67 |
| 67 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_ | 68 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_ |
| OLD | NEW |