| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_BLUETOOTH_TEST_ANDROID_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 BluetoothGattCharacteristic* characteristic) override; | 57 BluetoothGattCharacteristic* characteristic) override; |
| 58 void SimulateGattCharacteristicWrite( | 58 void SimulateGattCharacteristicWrite( |
| 59 BluetoothGattCharacteristic* characteristic) override; | 59 BluetoothGattCharacteristic* characteristic) override; |
| 60 void SimulateGattCharacteristicWriteError( | 60 void SimulateGattCharacteristicWriteError( |
| 61 BluetoothGattCharacteristic* characteristic, | 61 BluetoothGattCharacteristic* characteristic, |
| 62 BluetoothGattService::GattErrorCode) override; | 62 BluetoothGattService::GattErrorCode) override; |
| 63 void SimulateGattCharacteristicWriteWillFailSynchronouslyOnce( | 63 void SimulateGattCharacteristicWriteWillFailSynchronouslyOnce( |
| 64 BluetoothGattCharacteristic* characteristic) override; | 64 BluetoothGattCharacteristic* characteristic) override; |
| 65 void SimulateGattDescriptor(BluetoothGattCharacteristic* characteristic, | 65 void SimulateGattDescriptor(BluetoothGattCharacteristic* characteristic, |
| 66 const std::string& uuid) override; | 66 const std::string& uuid) override; |
| 67 void SimulateGattDescriptorWriteWillFailSynchronouslyOnce( |
| 68 BluetoothGattDescriptor* descriptor) override; |
| 67 | 69 |
| 68 // Records that Java FakeBluetoothDevice connectGatt was called. | 70 // Records that Java FakeBluetoothDevice connectGatt was called. |
| 69 void OnFakeBluetoothDeviceConnectGattCalled( | 71 void OnFakeBluetoothDeviceConnectGattCalled( |
| 70 JNIEnv* env, | 72 JNIEnv* env, |
| 71 const base::android::JavaParamRef<jobject>& caller); | 73 const base::android::JavaParamRef<jobject>& caller); |
| 72 | 74 |
| 73 // Records that Java FakeBluetoothGatt disconnect was called. | 75 // Records that Java FakeBluetoothGatt disconnect was called. |
| 74 void OnFakeBluetoothGattDisconnect( | 76 void OnFakeBluetoothGattDisconnect( |
| 75 JNIEnv* env, | 77 JNIEnv* env, |
| 76 const base::android::JavaParamRef<jobject>& caller); | 78 const base::android::JavaParamRef<jobject>& caller); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 90 void OnFakeBluetoothGattReadCharacteristic( | 92 void OnFakeBluetoothGattReadCharacteristic( |
| 91 JNIEnv* env, | 93 JNIEnv* env, |
| 92 const base::android::JavaParamRef<jobject>& caller); | 94 const base::android::JavaParamRef<jobject>& caller); |
| 93 | 95 |
| 94 // Records that Java FakeBluetoothGatt writeCharacteristic was called. | 96 // Records that Java FakeBluetoothGatt writeCharacteristic was called. |
| 95 void OnFakeBluetoothGattWriteCharacteristic( | 97 void OnFakeBluetoothGattWriteCharacteristic( |
| 96 JNIEnv* env, | 98 JNIEnv* env, |
| 97 const base::android::JavaParamRef<jobject>& caller, | 99 const base::android::JavaParamRef<jobject>& caller, |
| 98 const base::android::JavaParamRef<jbyteArray>& value); | 100 const base::android::JavaParamRef<jbyteArray>& value); |
| 99 | 101 |
| 102 // Records that Java FakeBluetoothGatt writeDescriptor was called. |
| 103 void OnFakeBluetoothGattWriteDescriptor( |
| 104 JNIEnv* env, |
| 105 const base::android::JavaParamRef<jobject>& caller, |
| 106 const base::android::JavaParamRef<jbyteArray>& value); |
| 107 |
| 100 base::android::ScopedJavaGlobalRef<jobject> j_fake_bluetooth_adapter_; | 108 base::android::ScopedJavaGlobalRef<jobject> j_fake_bluetooth_adapter_; |
| 101 }; | 109 }; |
| 102 | 110 |
| 103 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). | 111 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). |
| 104 typedef BluetoothTestAndroid BluetoothTest; | 112 typedef BluetoothTestAndroid BluetoothTest; |
| 105 | 113 |
| 106 } // namespace device | 114 } // namespace device |
| 107 | 115 |
| 108 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ | 116 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ |
| OLD | NEW |