1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2002-2012 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.
18 // Suppress "warning: 'DNSServiceDiscoveryMachPort' is deprecated" messages -- we already know this code is building the deprecated API
19 // Since we compile with all warnings treated as errors, we have to turn off the warnings here or the project won't compile
20 #include <AvailabilityMacros.h>
21 #undef AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED
22 #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED
23 #undef AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
24 #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
26 #include "../mDNSMacOSX/DNSServiceDiscovery.h"
27 #include "DNSServiceDiscoveryDefines.h"
31 #include <servers/bootstrap.h>
32 #include <mach/mach.h>
33 #include <mach/mach_error.h>
36 #include <netinet/in.h>
38 extern boolean_t
DNSServiceDiscoveryReply_server(
39 mach_msg_header_t
*InHeadP
,
40 mach_msg_header_t
*OutHeadP
);
43 kern_return_t DNSServiceBrowserCreate_rpc
53 kern_return_t DNSServiceResolverResolve_rpc
64 struct a_requests
*next
;
65 mach_port_t client_port
;
67 DNSServiceBrowserReply browserCallback
;
68 DNSServiceDomainEnumerationReply enumCallback
;
69 DNSServiceRegistrationReply regCallback
;
70 DNSServiceResolverReply resolveCallback
;
75 typedef struct _dns_service_discovery_t
{
77 } dns_service_discovery_t
;
80 dns_service_discovery_ref
DNSServiceBrowserCreate (const char *regtype
, const char *domain
, DNSServiceBrowserReply callBack
,void *context
)
83 (void) regtype
; // Unused
84 (void) domain
; // Unused
85 (void) callBack
; // Unused
86 (void) context
; // Unused
88 printf("DNSServiceBrowserCreate deprecated since 10.3 \n");
93 dns_service_discovery_ref
DNSServiceResolverResolve(const char *name
, const char *regtype
, const char *domain
, DNSServiceResolverReply callBack
, void *context
)
95 (void) name
; // Unused
96 (void) regtype
; // Unused
97 (void) domain
; // Unused
98 (void) callBack
; // Unused
99 (void) context
; // Unused
101 printf("DNSServiceResolverResolve deprecated since 10.3 \n");
106 void DNSServiceDiscovery_handleReply(void *replyMsg
)
108 (void) replyMsg
; // Unused
109 printf("DNSServiceDiscovery_handleReply deprecated since 10.3 \n");
112 mach_port_t
DNSServiceDiscoveryMachPort(dns_service_discovery_ref dnsServiceDiscovery
)
114 printf("DNSServiceDiscoveryMachPort deprecated since 10.3 \n");
115 return dnsServiceDiscovery
->port
;
118 void DNSServiceDiscoveryDeallocate(dns_service_discovery_ref dnsServiceDiscovery
)
120 (void) dnsServiceDiscovery
; // Unused
121 printf("DNSServiceDiscoveryDeallocate deprecated since 10.3 \n");