-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathHAPAccessoryValidation.h
49 lines (40 loc) · 1.28 KB
/
HAPAccessoryValidation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// 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.
#ifndef HAP_ACCESSORY_VALIDATION_H
#define HAP_ACCESSORY_VALIDATION_H
#ifdef __cplusplus
extern "C" {
#endif
#include "HAP+Internal.h"
#if __has_feature(nullability)
#pragma clang assume_nonnull begin
#endif
/**
* Validates a regular (Bluetooth LE / IP) accessory definition.
*
* @param server Accessory server.
* @param accessory Accessory to validate.
*
* @return true If the accessory definition is valid.
* @return false Otherwise.
*/
bool HAPRegularAccessoryIsValid(HAPAccessoryServerRef* server, const HAPAccessory* accessory);
/**
* Validates a bridged accessory definition.
*
* @param bridgedAccessory Accessory to validate.
*
* @return true If the accessory definition is valid.
* @return false Otherwise.
*/
bool HAPBridgedAccessoryIsValid(const HAPAccessory* bridgedAccessory);
#if __has_feature(nullability)
#pragma clang assume_nonnull end
#endif
#ifdef __cplusplus
}
#endif
#endif