OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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_advertisement.h" |
| 6 |
| 7 namespace device { |
| 8 |
| 9 BluetoothAdvertisement::Data::Data( |
| 10 AdvertisementType type, |
| 11 scoped_ptr<UUIDList> service_uuids, |
| 12 scoped_ptr<ManufacturerData> manufacturer_data, |
| 13 scoped_ptr<UUIDList> solicit_uuids, |
| 14 scoped_ptr<ServiceData> service_data) |
| 15 : type_(type), |
| 16 service_uuids_(service_uuids.Pass()), |
| 17 manufacturer_data_(manufacturer_data.Pass()), |
| 18 solicit_uuids_(solicit_uuids.Pass()), |
| 19 service_data_(service_data.Pass()) { |
| 20 } |
| 21 |
| 22 BluetoothAdvertisement::Data::~Data() { |
| 23 } |
| 24 |
| 25 BluetoothAdvertisement::Data::Data() : type_(ADVERTISEMENT_TYPE_BROADCAST) { |
| 26 } |
| 27 |
| 28 void BluetoothAdvertisement::AddObserver( |
| 29 BluetoothAdvertisement::Observer* observer) { |
| 30 CHECK(observer); |
| 31 observers_.AddObserver(observer); |
| 32 } |
| 33 |
| 34 void BluetoothAdvertisement::RemoveObserver( |
| 35 BluetoothAdvertisement::Observer* observer) { |
| 36 CHECK(observer); |
| 37 observers_.RemoveObserver(observer); |
| 38 } |
| 39 |
| 40 BluetoothAdvertisement::BluetoothAdvertisement() { |
| 41 } |
| 42 BluetoothAdvertisement::~BluetoothAdvertisement() { |
| 43 } |
| 44 |
| 45 } // namespace device |
OLD | NEW |