1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2015-2016 Apple Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
21 #include "mDNSEmbeddedAPI.h" // Defines the interface provided to the client layer above
22 #include "dnssd_ipc.h"
23 #include <DeviceToDeviceManager/DeviceToDeviceManager.h>
25 extern void internal_start_browsing_for_service(mDNSInterfaceID InterfaceID
, const domainname
*const type
, DNS_TypeValues qtype
, DNSServiceFlags flags
);
26 extern void internal_stop_browsing_for_service(mDNSInterfaceID InterfaceID
, const domainname
*const type
, DNS_TypeValues qtype
, DNSServiceFlags flags
);
27 extern void internal_start_advertising_service(const ResourceRecord
*const resourceRecord
, DNSServiceFlags flags
);
28 extern void internal_stop_advertising_service(const ResourceRecord
*const resourceRecord
, DNSServiceFlags flags
);
30 void xD2DAddToCache(D2DStatus result
, D2DServiceInstance instanceHandle
, D2DTransportType transportType
, const Byte
*key
, size_t keySize
, const Byte
*value
, size_t valueSize
);
31 void xD2DRemoveFromCache(D2DStatus result
, D2DServiceInstance instanceHandle
, D2DTransportType transportType
, const Byte
*key
, size_t keySize
, const Byte
*value
, size_t valueSize
);
33 #if ENABLE_BLE_TRIGGERED_BONJOUR
34 // Just define as the current max value for now for BLE.c prototype.
35 // TODO: Will need to define in DeviceToDeviceManager.framework if we convert the
36 // BLE discovery code to a D2D plugin.
37 #define D2DBLETransport D2DTransportMax
38 #endif // ENABLE_BLE_TRIGGERED_BONJOUR
41 #pragma mark - Unit test declarations
43 // Unit test entry points, which are not used in the mDNSResponder runtime code paths.
44 void D2D_unitTest(void);