Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_android.h

Issue 1502833002: bluetooth: android: Enable characteristic change notification events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-check-null-
Patch Set: fix imports Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool AddDescriptor(BluetoothGattDescriptor* descriptor) override; 66 bool AddDescriptor(BluetoothGattDescriptor* descriptor) override;
67 bool UpdateValue(const std::vector<uint8_t>& value) override; 67 bool UpdateValue(const std::vector<uint8_t>& value) override;
68 void StartNotifySession(const NotifySessionCallback& callback, 68 void StartNotifySession(const NotifySessionCallback& callback,
69 const ErrorCallback& error_callback) override; 69 const ErrorCallback& error_callback) override;
70 void ReadRemoteCharacteristic(const ValueCallback& callback, 70 void ReadRemoteCharacteristic(const ValueCallback& callback,
71 const ErrorCallback& error_callback) override; 71 const ErrorCallback& error_callback) override;
72 void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value, 72 void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value,
73 const base::Closure& callback, 73 const base::Closure& callback,
74 const ErrorCallback& error_callback) override; 74 const ErrorCallback& error_callback) override;
75 75
76 // Called when value changed event occurs.
77 void OnChanged(JNIEnv* env,
78 const base::android::JavaParamRef<jobject>& jcaller,
79 const base::android::JavaParamRef<jbyteArray>& value);
80
76 // Callback after Read operation completes. 81 // Callback after Read operation completes.
77 void OnRead(JNIEnv* env, 82 void OnRead(JNIEnv* env,
78 const base::android::JavaParamRef<jobject>& jcaller, 83 const base::android::JavaParamRef<jobject>& jcaller,
79 int32_t status, 84 int32_t status,
80 const base::android::JavaParamRef<jbyteArray>& value); 85 const base::android::JavaParamRef<jbyteArray>& value);
81 86
82 // Callback after Write operation completes. 87 // Callback after Write operation completes.
83 void OnWrite(JNIEnv* env, 88 void OnWrite(JNIEnv* env,
84 const base::android::JavaParamRef<jobject>& jcaller, 89 const base::android::JavaParamRef<jobject>& jcaller,
85 int32_t status); 90 int32_t status);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 base::ScopedPtrHashMap<std::string, 139 base::ScopedPtrHashMap<std::string,
135 scoped_ptr<BluetoothRemoteGattDescriptorAndroid>> 140 scoped_ptr<BluetoothRemoteGattDescriptorAndroid>>
136 descriptors_; 141 descriptors_;
137 142
138 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicAndroid); 143 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicAndroid);
139 }; 144 };
140 145
141 } // namespace device 146 } // namespace device
142 147
143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_ 148 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698