-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathHAPIPServiceDiscovery.h
72 lines (59 loc) · 2.33 KB
/
HAPIPServiceDiscovery.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// 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_IP_SERVICE_DISCOVERY_H
#define HAP_IP_SERVICE_DISCOVERY_H
#ifdef __cplusplus
extern "C" {
#endif
#include "HAP+Internal.h"
#if __has_feature(nullability)
#pragma clang assume_nonnull begin
#endif
/**
* The currently active service.
*/
HAP_ENUM_BEGIN(uint8_t, HAPIPServiceDiscoveryType) { /**
* No Bonjour service discovery active.
*/
kHAPIPServiceDiscoveryType_None,
/**
* _hap service is currently being advertised.
*/
kHAPIPServiceDiscoveryType_HAP,
/**
* _mfi-config service is currently being advertised.
*/
kHAPIPServiceDiscoveryType_MFiConfig
} HAP_ENUM_END(uint8_t, HAPIPServiceDiscoveryType);
/**
* Registers or updates the Bonjour records for the _hap service.
*
* - Only one service may be active at a time. To switch services, first stop Bonjour service discovery.
*
* @param server Accessory server.
*/
void HAPIPServiceDiscoverySetHAPService(HAPAccessoryServerRef* server);
/**
* Registers or updates the Bonjour records for the _mfi-config service.
*
* - Only one service may be active at a time. To switch services, first stop Bonjour service discovery.
*
* @param server Accessory server.
*/
void HAPIPServiceDiscoverySetMFiConfigService(HAPAccessoryServerRef* server);
/**
* Stops Bonjour service discovery.
*
* @param server Accessory server.
*/
void HAPIPServiceDiscoveryStop(HAPAccessoryServerRef* server);
#if __has_feature(nullability)
#pragma clang assume_nonnull end
#endif
#ifdef __cplusplus
}
#endif
#endif