| 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 #ifndef BluetoothCharacteristicProperties_h |
| 6 #define BluetoothCharacteristicProperties_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 // Each BluetoothGATTCharacteristic exposes its characteristic properties |
| 14 // through a BluetoothCharacteristicProperties object. These properties express |
| 15 // what operations are valid on the characteristic. |
| 16 class BluetoothCharacteristicProperties final |
| 17 : public GarbageCollected<BluetoothCharacteristicProperties> |
| 18 , public ScriptWrappable { |
| 19 DEFINE_WRAPPERTYPEINFO(); |
| 20 public: |
| 21 static BluetoothCharacteristicProperties* create(uint32_t properties); |
| 22 |
| 23 bool broadcast() const; |
| 24 bool read() const; |
| 25 bool writeWithoutResponse() const; |
| 26 bool write() const; |
| 27 bool notify() const; |
| 28 bool indicate() const; |
| 29 bool authenticatedSignedWrites() const; |
| 30 bool reliableWrite() const; |
| 31 bool writableAuxiliaries() const; |
| 32 |
| 33 DEFINE_INLINE_TRACE() { } |
| 34 |
| 35 private: |
| 36 explicit BluetoothCharacteristicProperties(uint32_t properties); |
| 37 |
| 38 enum Property { |
| 39 None = 0, |
| 40 Broadcast = 1 << 0, |
| 41 Read = 1 << 1, |
| 42 WriteWithoutResponse = 1 << 2, |
| 43 Write = 1 << 3, |
| 44 Notify = 1 << 4, |
| 45 Indicate = 1 << 5, |
| 46 AuthenticatedSignedWrites = 1 << 6, |
| 47 ExtendedProperties = 1 << 7, // Not used in class. |
| 48 ReliableWrite = 1 << 8, |
| 49 WritableAuxiliaries = 1 << 9, |
| 50 }; |
| 51 |
| 52 uint32_t properties; |
| 53 }; |
| 54 |
| 55 } // namespace blink |
| 56 |
| 57 #endif // GamepadButton_h |
| OLD | NEW |