OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "device/bluetooth/bluetooth_remote_gatt_service_android.h" |
| 6 |
| 7 #include "device/bluetooth/bluetooth_adapter_android.h" |
| 8 #include "device/bluetooth/bluetooth_device_android.h" |
| 9 |
| 10 namespace device { |
| 11 |
| 12 // static |
| 13 BluetoothRemoteGattServiceAndroid* BluetoothRemoteGattServiceAndroid::Create( |
| 14 BluetoothAdapterAndroid* adapter, |
| 15 BluetoothDeviceAndroid* device, |
| 16 jobject bluetooth_remote_gatt_service_wrapper, |
| 17 std::string instanceId) { |
| 18 BluetoothRemoteGattServiceAndroid* service = |
| 19 new BluetoothRemoteGattServiceAndroid(adapter, device, instanceId); |
| 20 |
| 21 return service; |
| 22 } |
| 23 |
| 24 std::string BluetoothRemoteGattServiceAndroid::GetIdentifier() const { |
| 25 return instanceId_; |
| 26 } |
| 27 |
| 28 device::BluetoothUUID BluetoothRemoteGattServiceAndroid::GetUUID() const { |
| 29 NOTIMPLEMENTED(); |
| 30 return device::BluetoothUUID(); |
| 31 } |
| 32 |
| 33 bool BluetoothRemoteGattServiceAndroid::IsLocal() const { |
| 34 return false; |
| 35 } |
| 36 |
| 37 bool BluetoothRemoteGattServiceAndroid::IsPrimary() const { |
| 38 NOTIMPLEMENTED(); |
| 39 return true; |
| 40 } |
| 41 |
| 42 device::BluetoothDevice* BluetoothRemoteGattServiceAndroid::GetDevice() const { |
| 43 return device_; |
| 44 } |
| 45 |
| 46 std::vector<device::BluetoothGattCharacteristic*> |
| 47 BluetoothRemoteGattServiceAndroid::GetCharacteristics() const { |
| 48 NOTIMPLEMENTED(); |
| 49 std::vector<device::BluetoothGattCharacteristic*> characteristics; |
| 50 return characteristics; |
| 51 } |
| 52 |
| 53 std::vector<device::BluetoothGattService*> |
| 54 BluetoothRemoteGattServiceAndroid::GetIncludedServices() const { |
| 55 NOTIMPLEMENTED(); |
| 56 return std::vector<device::BluetoothGattService*>(); |
| 57 } |
| 58 |
| 59 device::BluetoothGattCharacteristic* |
| 60 BluetoothRemoteGattServiceAndroid::GetCharacteristic( |
| 61 const std::string& identifier) const { |
| 62 NOTIMPLEMENTED(); |
| 63 return nullptr; |
| 64 } |
| 65 |
| 66 bool BluetoothRemoteGattServiceAndroid::AddCharacteristic( |
| 67 device::BluetoothGattCharacteristic* characteristic) { |
| 68 return false; |
| 69 } |
| 70 |
| 71 bool BluetoothRemoteGattServiceAndroid::AddIncludedService( |
| 72 device::BluetoothGattService* service) { |
| 73 return false; |
| 74 } |
| 75 |
| 76 void BluetoothRemoteGattServiceAndroid::Register( |
| 77 const base::Closure& callback, |
| 78 const ErrorCallback& error_callback) { |
| 79 error_callback.Run(); |
| 80 } |
| 81 |
| 82 void BluetoothRemoteGattServiceAndroid::Unregister( |
| 83 const base::Closure& callback, |
| 84 const ErrorCallback& error_callback) { |
| 85 error_callback.Run(); |
| 86 } |
| 87 |
| 88 BluetoothRemoteGattServiceAndroid::BluetoothRemoteGattServiceAndroid( |
| 89 BluetoothAdapterAndroid* adapter, |
| 90 BluetoothDeviceAndroid* device, |
| 91 std::string instanceId) |
| 92 : adapter_(adapter), device_(device), instanceId_(instanceId) {} |
| 93 |
| 94 BluetoothRemoteGattServiceAndroid::~BluetoothRemoteGattServiceAndroid() {} |
| 95 |
| 96 } // namespace device |
OLD | NEW |