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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothCharacteristicProperties.cpp

Issue 1403723004: bluetooth: Implement BluetoothCharacteristicProperties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-query-cache
Patch Set: Fix web exposed test Created 5 years, 2 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 2015 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 "config.h"
6 #include "modules/bluetooth/BluetoothCharacteristicProperties.h"
7
8 namespace blink {
9
10 BluetoothCharacteristicProperties* BluetoothCharacteristicProperties::create(uin t32_t properties)
11 {
12 return new BluetoothCharacteristicProperties(properties);
13 }
14
15 BluetoothCharacteristicProperties::BluetoothCharacteristicProperties(uint32_t pr operties)
16 : m_broadcast(false)
17 , m_read(false)
18 , m_writeWithoutResponse(false)
19 , m_write(false)
20 , m_notify(false)
21 , m_indicate(false)
22 , m_authenticatedSignedWrites(false)
23 , m_reliableWrite(false)
24 , m_writableAuxiliaries(false)
25 {
26 ASSERT(properties != static_cast<uint32_t>(Property::NONE));
27
28 if (properties & static_cast<uint32_t>(Property::BROADCAST))
scheib 2015/10/20 19:50:35 The 'enum class' vs 'enum' is requiring you to add
ortuno 2015/10/20 23:33:23 Done.
29 m_broadcast = true;
30 if (properties & static_cast<uint32_t>(Property::READ))
31 m_read = true;
32 if (properties & static_cast<uint32_t>(Property::WRITE_WITHOUT_RESPONSE))
33 m_writeWithoutResponse = true;
34 if (properties & static_cast<uint32_t>(Property::WRITE))
35 m_write = true;
36 if (properties & static_cast<uint32_t>(Property::NOTIFY))
37 m_notify = true;
38 if (properties & static_cast<uint32_t>(Property::INDICATE))
39 m_indicate = true;
40 if (properties & static_cast<uint32_t>(Property::AUTHENTICATED_SIGNED_WRITES ))
41 m_authenticatedSignedWrites = true;
42 if (properties & static_cast<uint32_t>(Property::RELIABLE_WRITE))
43 m_reliableWrite = true;
44 if (properties & static_cast<uint32_t>(Property::WRITABLE_AUXILIARIES))
45 m_writableAuxiliaries = true;
46 }
47
48 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698