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 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h" | 5 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h" |
6 | 6 |
7 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h" | 7 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h" |
8 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 8 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
9 #include "device/bluetooth/dbus/fake_bluetooth_gatt_service_service_provider.h" | 9 #include "device/bluetooth/dbus/fake_bluetooth_gatt_service_service_provider.h" |
10 | 10 |
11 namespace bluez { | 11 namespace bluez { |
12 | 12 |
13 BluetoothGattServiceServiceProvider::BluetoothGattServiceServiceProvider() {} | 13 BluetoothGattServiceServiceProvider::BluetoothGattServiceServiceProvider() {} |
14 | 14 |
15 BluetoothGattServiceServiceProvider::~BluetoothGattServiceServiceProvider() {} | 15 BluetoothGattServiceServiceProvider::~BluetoothGattServiceServiceProvider() {} |
16 | 16 |
17 // static | 17 // static |
18 BluetoothGattServiceServiceProvider* | 18 BluetoothGattServiceServiceProvider* |
19 BluetoothGattServiceServiceProvider::Create( | 19 BluetoothGattServiceServiceProvider::Create( |
20 dbus::Bus* bus, | 20 dbus::Bus* bus, |
21 const dbus::ObjectPath& object_path, | 21 const dbus::ObjectPath& object_path, |
22 const std::string& uuid, | 22 const std::string& uuid, |
| 23 bool is_primary, |
23 const std::vector<dbus::ObjectPath>& includes) { | 24 const std::vector<dbus::ObjectPath>& includes) { |
24 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { | 25 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { |
25 return new BluetoothGattServiceServiceProviderImpl(bus, object_path, uuid, | 26 return new BluetoothGattServiceServiceProviderImpl(bus, object_path, uuid, |
26 includes); | 27 is_primary, includes); |
27 } | 28 } |
28 return new FakeBluetoothGattServiceServiceProvider(object_path, uuid, | 29 return new FakeBluetoothGattServiceServiceProvider(object_path, uuid, |
29 includes); | 30 includes); |
30 } | 31 } |
31 | 32 |
32 } // namespace bluez | 33 } // namespace bluez |
OLD | NEW |