OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 std::unique_ptr<BluetoothGattApplicationServiceProviderImpl> app_provider = | 366 std::unique_ptr<BluetoothGattApplicationServiceProviderImpl> app_provider = |
367 base::WrapUnique(new BluetoothGattApplicationServiceProviderImpl( | 367 base::WrapUnique(new BluetoothGattApplicationServiceProviderImpl( |
368 nullptr, dbus::ObjectPath(kAppObjectPath), | 368 nullptr, dbus::ObjectPath(kAppObjectPath), |
369 std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>())); | 369 std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>())); |
370 const std::string& kServicePath = | 370 const std::string& kServicePath = |
371 CreateFakeService(app_provider.get(), "service0"); | 371 CreateFakeService(app_provider.get(), "service0"); |
372 const std::string& kCharacteristicPath = CreateFakeCharacteristic( | 372 const std::string& kCharacteristicPath = CreateFakeCharacteristic( |
373 app_provider.get(), "characteristic0", kServicePath); | 373 app_provider.get(), "characteristic0", kServicePath); |
374 | 374 |
375 std::vector<uint8_t> kNewValue = {0x13, 0x37, 0xba, 0xad, 0xf0}; | 375 std::vector<uint8_t> kNewValue = {0x13, 0x37, 0xba, 0xad, 0xf0}; |
376 app_provider->SendValueChanged(dbus::ObjectPath(), | 376 app_provider->SendValueChanged(dbus::ObjectPath(kCharacteristicPath), |
377 dbus::ObjectPath(kCharacteristicPath), | 377 kNewValue); |
378 kNewValue, false); | |
379 // TODO(rkc): Write a test implementation of dbus::Bus and | 378 // TODO(rkc): Write a test implementation of dbus::Bus and |
380 // dbus::ExportedObject so we can capture the actual signal that is sent and | 379 // dbus::ExportedObject so we can capture the actual signal that is sent and |
381 // verify its contents. | 380 // verify its contents. |
382 } | 381 } |
383 | 382 |
384 } // namespace bluez | 383 } // namespace bluez |
OLD | NEW |