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

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: Address scheib's comments 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 bool BluetoothCharacteristicProperties::broadcast() const
16 {
17 return properties & Property::Broadcast;
18 }
19
20 bool BluetoothCharacteristicProperties::read() const
21 {
22 return properties & Property::Read;
23 }
24
25 bool BluetoothCharacteristicProperties::writeWithoutResponse() const
26 {
27 return properties & Property::WriteWithoutResponse;
28 }
29
30 bool BluetoothCharacteristicProperties::write() const
31 {
32 return properties & Property::Write;
33 }
34
35 bool BluetoothCharacteristicProperties::notify() const
36 {
37 return properties & Property::Notify;
38 }
39
40 bool BluetoothCharacteristicProperties::indicate() const
41 {
42 return properties & Property::Indicate;
43 }
44
45 bool BluetoothCharacteristicProperties::authenticatedSignedWrites() const
46 {
47 return properties & Property::AuthenticatedSignedWrites;
48 }
49
50 bool BluetoothCharacteristicProperties::reliableWrite() const
51 {
52 return properties & Property::ReliableWrite;
53 }
54
55 bool BluetoothCharacteristicProperties::writableAuxiliaries() const
56 {
57 return properties & Property::WritableAuxiliaries;
58 }
59
60 BluetoothCharacteristicProperties::BluetoothCharacteristicProperties(uint32_t de vice_properties)
61 {
62 ASSERT(device_properties != Property::None);
63 properties = device_properties;
64 }
65
66 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698