Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: device/bluetooth/bluetooth_advertisement.cc

Issue 1054743003: Add CPP API for BLE advertisments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698