sl4f_lib/bluetooth/
constants.rs

1// Copyright 2018 The Fuchsia 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/// GATT Attribute Permission Values
6pub const PERMISSION_READ_ENCRYPTED: u32 = 0x02;
7pub const PERMISSION_READ_ENCRYPTED_MITM: u32 = 0x04;
8pub const PERMISSION_WRITE_ENCRYPTED: u32 = 0x20;
9pub const PERMISSION_WRITE_ENCRYPTED_MITM: u32 = 0x40;
10pub const PERMISSION_WRITE_SIGNED: u32 = 0x80;
11pub const PERMISSION_WRITE_SIGNED_MITM: u32 = 0x100;
12
13/// GATT Attribute Property Values
14pub const PROPERTY_READ: u32 = 0x2;
15pub const PROPERTY_WRITE: u32 = 0x8;
16pub const PROPERTY_NOTIFY: u32 = 0x10;
17pub const PROPERTY_INDICATE: u32 = 0x20;
18
19/// GATT Max Attribute Length (Vol 3, Part F, 3.2.9)
20pub const GATT_MAX_ATTRIBUTE_VALUE_LENGTH: usize = 512;
21
22/// GATT UUIDs
23pub const CHARACTERISTIC_EXTENDED_PROPERTIES_UUID: u16 = 0x2900;