summaryrefslogtreecommitdiffstats
path: root/device/bluetooth/test/mock_bluetooth_gatt_service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'device/bluetooth/test/mock_bluetooth_gatt_service.cc')
-rw-r--r--device/bluetooth/test/mock_bluetooth_gatt_service.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_service.cc b/device/bluetooth/test/mock_bluetooth_gatt_service.cc
index 37392a6..faba596 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_service.cc
+++ b/device/bluetooth/test/mock_bluetooth_gatt_service.cc
@@ -33,4 +33,18 @@ MockBluetoothGattService::MockBluetoothGattService(
MockBluetoothGattService::~MockBluetoothGattService() {
}
+void MockBluetoothGattService::AddMockCharacteristic(
+ scoped_ptr<MockBluetoothGattCharacteristic> mock_characteristic) {
+ mock_characteristics_.push_back(mock_characteristic.Pass());
+}
+
+std::vector<BluetoothGattCharacteristic*>
+MockBluetoothGattService::GetMockCharacteristics() const {
+ std::vector<BluetoothGattCharacteristic*> characteristics;
+ for (BluetoothGattCharacteristic* characteristic : mock_characteristics_) {
+ characteristics.push_back(characteristic);
+ }
+ return characteristics;
+}
+
} // namespace device