| 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 WebBluetooth_h | 5 #ifndef WebBluetooth_h |
| 6 #define WebBluetooth_h | 6 #define WebBluetooth_h |
| 7 | 7 |
| 8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
| 9 #include "public/platform/WebPassOwnPtr.h" | 9 #include "public/platform/WebPassOwnPtr.h" |
| 10 #include "public/platform/WebString.h" | 10 #include "public/platform/WebString.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Success and failure callbacks for getPrimaryService. | 30 // Success and failure callbacks for getPrimaryService. |
| 31 using WebBluetoothGetPrimaryServiceCallbacks = WebCallbacks<WebPassOwnPtr<WebBlu
etoothGATTService>, const WebBluetoothError&>; | 31 using WebBluetoothGetPrimaryServiceCallbacks = WebCallbacks<WebPassOwnPtr<WebBlu
etoothGATTService>, const WebBluetoothError&>; |
| 32 | 32 |
| 33 // Success and failure callbacks for getCharacteristic. | 33 // Success and failure callbacks for getCharacteristic. |
| 34 using WebBluetoothGetCharacteristicCallbacks = WebCallbacks<WebPassOwnPtr<WebBlu
etoothGATTCharacteristicInit>, const WebBluetoothError&>; | 34 using WebBluetoothGetCharacteristicCallbacks = WebCallbacks<WebPassOwnPtr<WebBlu
etoothGATTCharacteristicInit>, const WebBluetoothError&>; |
| 35 | 35 |
| 36 // Success and failure callbacks for readValue. | 36 // Success and failure callbacks for readValue. |
| 37 using WebBluetoothReadValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, c
onst WebBluetoothError&>; | 37 using WebBluetoothReadValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, c
onst WebBluetoothError&>; |
| 38 | 38 |
| 39 // Success and failure callbacks for writeValue. | 39 // Success and failure callbacks for writeValue. |
| 40 using WebBluetoothWriteValueCallbacks = WebCallbacks<void, const WebBluetoothErr
or&>; | 40 using WebBluetoothWriteValueCallbacks = WebCallbacks<const WebVector<uint8_t>&,
const WebBluetoothError&>; |
| 41 | 41 |
| 42 // Success and failure callbacks for characteristic.startNotifications and | 42 // Success and failure callbacks for characteristic.startNotifications and |
| 43 // characteristic.stopNotifications. | 43 // characteristic.stopNotifications. |
| 44 using WebBluetoothNotificationsCallbacks = WebCallbacks<void, const WebBluetooth
Error&>; | 44 using WebBluetoothNotificationsCallbacks = WebCallbacks<void, const WebBluetooth
Error&>; |
| 45 | 45 |
| 46 class WebBluetooth { | 46 class WebBluetooth { |
| 47 public: | 47 public: |
| 48 virtual ~WebBluetooth() { } | 48 virtual ~WebBluetooth() { } |
| 49 | 49 |
| 50 // Bluetooth Methods: | 50 // Bluetooth Methods: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 const WebString& characteristicInstanceID, | 91 const WebString& characteristicInstanceID, |
| 92 WebBluetoothGATTCharacteristic*) = 0; | 92 WebBluetoothGATTCharacteristic*) = 0; |
| 93 virtual void characteristicObjectRemoved( | 93 virtual void characteristicObjectRemoved( |
| 94 const WebString& characteristicInstanceID, | 94 const WebString& characteristicInstanceID, |
| 95 WebBluetoothGATTCharacteristic*) {} | 95 WebBluetoothGATTCharacteristic*) {} |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace blink | 98 } // namespace blink |
| 99 | 99 |
| 100 #endif // WebBluetooth_h | 100 #endif // WebBluetooth_h |
| OLD | NEW |