2 * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
25 Change History (most recent first):
27 $Log: DNSSDDirect.h,v $
28 Revision 1.1 2004/01/30 02:46:15 bradley
29 Portable implementation of the DNS-SD API. This interacts with mDNSCore to perform all the real work
30 of the DNS-SD API. This code does not rely on any platform-specifics so it should run on any platform
31 with an mDNS platform plugin available. Software that cannot or does not want to use the IPC mechanism
32 (e.g. Windows CE, VxWorks, etc.) can use this code directly without any of the IPC pieces.
36 //---------------------------------------------------------------------------------------------------------------------------
37 /*! @header DNSSDDirect.h
39 @abstract Direct (compiled-in) implementation of DNS-SD APIs.
43 Portable implementation of the DNS-SD API. This interacts with mDNSCore to perform all the real work of the DNS-SD API.
44 This code does not rely on any platform-specifics so it should run on any platform with an mDNS platform plugin
45 available. Software that cannot or does not want to use the IPC mechanism (e.g. Windows CE, VxWorks, etc.) can use this
46 code directly without any of the IPC pieces.
49 #ifndef __DNS_SD_DIRECT__
50 #define __DNS_SD_DIRECT__
52 #include "CommonServices.h"
61 #pragma mark == General ==
64 //---------------------------------------------------------------------------------------------------------------------------
65 /*! @defined kDNSServiceCacheEntryCountDefault
67 @abstract Default number of mDNS cache entries.
70 #define kDNSServiceCacheEntryCountDefault 512
72 //---------------------------------------------------------------------------------------------------------------------------
73 /*! @function DNSServiceInitialize_direct
75 @abstract Initializes the DNSService API. No DNSService API's should be called before this call returns successfully.
78 DNSServiceErrorType
DNSServiceInitialize_direct( DNSServiceInitializeFlags inFlags
, int inCacheEntryCount
);
80 //---------------------------------------------------------------------------------------------------------------------------
81 /*! @function DNSServiceFinalize_direct
83 @abstract Finalizes the DNSService API. No DNSService API's should be called after this call is made.
86 void DNSServiceFinalize_direct( void );
88 //---------------------------------------------------------------------------------------------------------------------------
89 /*! @function DNSServiceRefDeallocate_direct
91 @abstract Direct version of DNSServiceRefDeallocate.
94 void DNSServiceRefDeallocate_direct( DNSServiceRef inRef
);
97 #pragma mark == Domain Enumeration ==
100 //---------------------------------------------------------------------------------------------------------------------------
101 /*! @function DNSServiceEnumerateDomains_client
103 @abstract Direct version of DNSServiceEnumerateDomains.
107 DNSServiceEnumerateDomains_direct(
108 DNSServiceRef
* outRef
,
109 const DNSServiceFlags inFlags
,
110 const uint32_t inInterfaceIndex
,
111 const DNSServiceDomainEnumReply inCallBack
,
115 #pragma mark == Service Registration ==
118 //---------------------------------------------------------------------------------------------------------------------------
119 /*! @function DNSServiceRegister_direct
121 @abstract Direct version of DNSServiceRegister.
125 DNSServiceRegister_direct(
126 DNSServiceRef
* outRef
,
127 DNSServiceFlags inFlags
,
128 uint32_t inInterfaceIndex
,
131 const char * inDomain
,
136 DNSServiceRegisterReply inCallBack
,
139 //---------------------------------------------------------------------------------------------------------------------------
140 /*! @function DNSServiceAddRecord_direct
142 @abstract Direct version of DNSServiceAddRecord.
146 DNSServiceAddRecord_direct(
148 DNSRecordRef
* outRecordRef
,
149 DNSServiceFlags inFlags
,
151 uint16_t inRDataSize
,
152 const void * inRData
,
155 //---------------------------------------------------------------------------------------------------------------------------
156 /*! @function DNSServiceUpdateRecord_direct
158 @abstract Direct version of DNSServiceUpdateRecord.
162 DNSServiceUpdateRecord_direct(
164 DNSRecordRef inRecordRef
,
165 DNSServiceFlags inFlags
,
166 uint16_t inRDataSize
,
167 const void * inRData
,
170 //---------------------------------------------------------------------------------------------------------------------------
171 /*! @function DNSServiceRemoveRecord_direct
173 @abstract Direct version of DNSServiceRemoveRecord.
176 DNSServiceErrorType
DNSServiceRemoveRecord_direct( DNSServiceRef inRef
, DNSRecordRef inRecordRef
, DNSServiceFlags inFlags
);
179 #pragma mark == Service Discovery ==
182 //---------------------------------------------------------------------------------------------------------------------------
183 /*! @function DNSServiceBrowse_direct
185 @abstract Direct version of DNSServiceBrowse.
189 DNSServiceBrowse_direct(
190 DNSServiceRef
* outRef
,
191 DNSServiceFlags inFlags
,
192 uint32_t inInterfaceIndex
,
194 const char * inDomain
,
195 DNSServiceBrowseReply inCallBack
,
198 //---------------------------------------------------------------------------------------------------------------------------
199 /*! @function DNSServiceResolve_direct
201 @abstract Direct version of DNSServiceResolve.
205 DNSServiceResolve_direct(
206 DNSServiceRef
* inRef
,
207 DNSServiceFlags inFlags
,
208 uint32_t inInterfaceIndex
,
211 const char * inDomain
,
212 DNSServiceResolveReply inCallBack
,
216 #pragma mark == Special Purpose ==
219 //---------------------------------------------------------------------------------------------------------------------------
220 /*! @function DNSServiceCreateConnection_direct
222 @abstract Direct version of DNSServiceCreateConnection.
225 DNSServiceErrorType
DNSServiceCreateConnection_direct( DNSServiceRef
*outRef
);
227 //---------------------------------------------------------------------------------------------------------------------------
228 /*! @function DNSServiceRegisterRecord_direct
230 @abstract Direct version of DNSServiceRegisterRecord.
234 DNSServiceRegisterRecord_direct(
236 DNSRecordRef
* outRecordRef
,
237 DNSServiceFlags inFlags
,
238 uint32_t inInterfaceIndex
,
242 uint16_t inRDataSize
,
243 const void * inRData
,
245 DNSServiceRegisterRecordReply inCallBack
,
248 //---------------------------------------------------------------------------------------------------------------------------
249 /*! @function DNSServiceQueryRecord_direct
251 @abstract Direct version of DNSServiceQueryRecord.
255 DNSServiceQueryRecord_direct(
256 DNSServiceRef
* outRef
,
257 DNSServiceFlags inFlags
,
258 uint32_t inInterfaceIndex
,
262 DNSServiceQueryRecordReply inCallBack
,
265 //---------------------------------------------------------------------------------------------------------------------------
266 /*! @function DNSServiceReconfirmRecord_direct
268 @abstract Direct version of DNSServiceReconfirmRecord.
272 DNSServiceReconfirmRecord_direct(
273 DNSServiceFlags inFlags
,
274 uint32_t inInterfaceIndex
,
278 uint16_t inRDataSize
,
279 const void * inRData
);
285 #endif // __DNS_SD_DIRECT__