| OLD | NEW |
| (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 |
| OLD | NEW |