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 EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_R
OUTER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_R
OUTER_H_ |
6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_R
OUTER_H_ | 6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_R
OUTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Possible ways that an API method can fail or succeed. | 54 // Possible ways that an API method can fail or succeed. |
55 enum Status { | 55 enum Status { |
56 kStatusSuccess = 0, | 56 kStatusSuccess = 0, |
57 kStatusErrorPermissionDenied, | 57 kStatusErrorPermissionDenied, |
58 kStatusErrorNotFound, | 58 kStatusErrorNotFound, |
59 kStatusErrorAlreadyConnected, | 59 kStatusErrorAlreadyConnected, |
60 kStatusErrorAlreadyNotifying, | 60 kStatusErrorAlreadyNotifying, |
61 kStatusErrorNotConnected, | 61 kStatusErrorNotConnected, |
62 kStatusErrorNotNotifying, | 62 kStatusErrorNotNotifying, |
63 kStatusErrorInProgress, | 63 kStatusErrorInProgress, |
| 64 kStatusErrorAuthenticationFailed, |
| 65 kStatusErrorCanceled, |
| 66 kStatusErrorTimeout, |
| 67 kStatusErrorInvalidLength, |
| 68 kStatusErrorUnsupportedDevice, |
| 69 kStatusErrorGattNotSupported, |
64 kStatusErrorFailed | 70 kStatusErrorFailed |
65 }; | 71 }; |
66 | 72 |
67 // Error callback is used by asynchronous methods to report failures. | 73 // Error callback is used by asynchronous methods to report failures. |
68 typedef base::Callback<void(Status)> ErrorCallback; | 74 typedef base::Callback<void(Status)> ErrorCallback; |
69 | 75 |
70 // Returns true if Bluetooth is supported on the current platform or if the | 76 // Returns true if Bluetooth is supported on the current platform or if the |
71 // internal |adapter_| instance has been initialized for testing. | 77 // internal |adapter_| instance has been initialized for testing. |
72 bool IsBluetoothSupported() const; | 78 bool IsBluetoothSupported() const; |
73 | 79 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // Note: This should remain the last member so it'll be destroyed and | 418 // Note: This should remain the last member so it'll be destroyed and |
413 // invalidate its weak pointers before any other members are destroyed. | 419 // invalidate its weak pointers before any other members are destroyed. |
414 base::WeakPtrFactory<BluetoothLowEnergyEventRouter> weak_ptr_factory_; | 420 base::WeakPtrFactory<BluetoothLowEnergyEventRouter> weak_ptr_factory_; |
415 | 421 |
416 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyEventRouter); | 422 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyEventRouter); |
417 }; | 423 }; |
418 | 424 |
419 } // namespace extensions | 425 } // namespace extensions |
420 | 426 |
421 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVEN
T_ROUTER_H_ | 427 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVEN
T_ROUTER_H_ |
OLD | NEW |