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

Side by Side Diff: device/bluetooth/bluetooth_remote_gatt_service_android.cc

Issue 1872943002: Add support for local services/characteristics/descriptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 #include "device/bluetooth/bluetooth_remote_gatt_service_android.h" 5 #include "device/bluetooth/bluetooth_remote_gatt_service_android.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 bool BluetoothRemoteGattServiceAndroid::AddIncludedService( 164 bool BluetoothRemoteGattServiceAndroid::AddIncludedService(
165 device::BluetoothGattService* service) { 165 device::BluetoothGattService* service) {
166 return false; 166 return false;
167 } 167 }
168 168
169 void BluetoothRemoteGattServiceAndroid::Register( 169 void BluetoothRemoteGattServiceAndroid::Register(
170 const base::Closure& callback, 170 const base::Closure& callback,
171 const ErrorCallback& error_callback) { 171 const ErrorCallback& error_callback) {
172 error_callback.Run(); 172 error_callback.Run(GATT_ERROR_NOT_SUPPORTED);
173 } 173 }
174 174
175 void BluetoothRemoteGattServiceAndroid::Unregister( 175 void BluetoothRemoteGattServiceAndroid::Unregister(
176 const base::Closure& callback, 176 const base::Closure& callback,
177 const ErrorCallback& error_callback) { 177 const ErrorCallback& error_callback) {
178 error_callback.Run(); 178 error_callback.Run(GATT_ERROR_NOT_SUPPORTED);
179 } 179 }
180 180
181 void BluetoothRemoteGattServiceAndroid::CreateGattRemoteCharacteristic( 181 void BluetoothRemoteGattServiceAndroid::CreateGattRemoteCharacteristic(
182 JNIEnv* env, 182 JNIEnv* env,
183 const JavaParamRef<jobject>& caller, 183 const JavaParamRef<jobject>& caller,
184 const JavaParamRef<jstring>& instance_id, 184 const JavaParamRef<jstring>& instance_id,
185 const JavaParamRef<jobject>& /* BluetoothGattCharacteristicWrapper */ 185 const JavaParamRef<jobject>& /* BluetoothGattCharacteristicWrapper */
186 bluetooth_gatt_characteristic_wrapper, 186 bluetooth_gatt_characteristic_wrapper,
187 const JavaParamRef< 187 const JavaParamRef<
188 jobject>& /* ChromeBluetoothDevice */ chrome_bluetooth_device) { 188 jobject>& /* ChromeBluetoothDevice */ chrome_bluetooth_device) {
(...skipping 18 matching lines...) Expand all
207 void BluetoothRemoteGattServiceAndroid::EnsureCharacteristicsCreated() const { 207 void BluetoothRemoteGattServiceAndroid::EnsureCharacteristicsCreated() const {
208 if (!characteristics_.empty()) 208 if (!characteristics_.empty())
209 return; 209 return;
210 210
211 // Java call 211 // Java call
212 Java_ChromeBluetoothRemoteGattService_createCharacteristics( 212 Java_ChromeBluetoothRemoteGattService_createCharacteristics(
213 AttachCurrentThread(), j_service_.obj()); 213 AttachCurrentThread(), j_service_.obj());
214 } 214 }
215 215
216 } // namespace device 216 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.cc ('k') | device/bluetooth/bluetooth_remote_gatt_service_bluez.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698