-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathHAPBLECharacteristic.c
24 lines (19 loc) · 1.11 KB
/
HAPBLECharacteristic.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2015-2019 The HomeKit ADK Contributors
//
// Licensed under the Apache License, Version 2.0 (the “License”);
// you may not use this file except in compliance with the License.
// See [CONTRIBUTORS.md] for the list of HomeKit ADK project authors.
#include "HAP+Internal.h"
HAP_RESULT_USE_CHECK
bool HAPBLECharacteristicSupportsServiceProcedures(const HAPCharacteristic* characteristic_) {
HAPPrecondition(characteristic_);
const HAPBaseCharacteristic* characteristic = characteristic_;
return HAPUUIDAreEqual(characteristic->characteristicType, &kHAPCharacteristicType_ServiceSignature);
}
bool HAPBLECharacteristicDropsSecuritySession(const HAPCharacteristic* characteristic_) {
HAPPrecondition(characteristic_);
const HAPBaseCharacteristic* characteristic = characteristic_;
return HAPUUIDAreEqual(characteristic->characteristicType, &kHAPCharacteristicType_PairSetup) ||
HAPUUIDAreEqual(characteristic->characteristicType, &kHAPCharacteristicType_PairVerify) ||
HAPUUIDAreEqual(characteristic->characteristicType, &kHAPCharacteristicType_PairingFeatures);
}