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

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

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 #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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698