]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/DNSSDDirect.h
mDNSResponder-66.3.tar.gz
[apple/mdnsresponder.git] / mDNSWindows / DNSSDDirect.h
1 /*
2 * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
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
13 * file.
14 *
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.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24
25 Change History (most recent first):
26
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.
33
34 */
35
36 //---------------------------------------------------------------------------------------------------------------------------
37 /*! @header DNSSDDirect.h
38
39 @abstract Direct (compiled-in) implementation of DNS-SD APIs.
40
41 @discussion
42
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.
47 */
48
49 #ifndef __DNS_SD_DIRECT__
50 #define __DNS_SD_DIRECT__
51
52 #include "CommonServices.h"
53
54 #include "DNSSD.h"
55
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 #if 0
61 #pragma mark == General ==
62 #endif
63
64 //---------------------------------------------------------------------------------------------------------------------------
65 /*! @defined kDNSServiceCacheEntryCountDefault
66
67 @abstract Default number of mDNS cache entries.
68 */
69
70 #define kDNSServiceCacheEntryCountDefault 512
71
72 //---------------------------------------------------------------------------------------------------------------------------
73 /*! @function DNSServiceInitialize_direct
74
75 @abstract Initializes the DNSService API. No DNSService API's should be called before this call returns successfully.
76 */
77
78 DNSServiceErrorType DNSServiceInitialize_direct( DNSServiceInitializeFlags inFlags, int inCacheEntryCount );
79
80 //---------------------------------------------------------------------------------------------------------------------------
81 /*! @function DNSServiceFinalize_direct
82
83 @abstract Finalizes the DNSService API. No DNSService API's should be called after this call is made.
84 */
85
86 void DNSServiceFinalize_direct( void );
87
88 //---------------------------------------------------------------------------------------------------------------------------
89 /*! @function DNSServiceRefDeallocate_direct
90
91 @abstract Direct version of DNSServiceRefDeallocate.
92 */
93
94 void DNSServiceRefDeallocate_direct( DNSServiceRef inRef );
95
96 #if 0
97 #pragma mark == Domain Enumeration ==
98 #endif
99
100 //---------------------------------------------------------------------------------------------------------------------------
101 /*! @function DNSServiceEnumerateDomains_client
102
103 @abstract Direct version of DNSServiceEnumerateDomains.
104 */
105
106 DNSServiceErrorType
107 DNSServiceEnumerateDomains_direct(
108 DNSServiceRef * outRef,
109 const DNSServiceFlags inFlags,
110 const uint32_t inInterfaceIndex,
111 const DNSServiceDomainEnumReply inCallBack,
112 void * inContext );
113
114 #if 0
115 #pragma mark == Service Registration ==
116 #endif
117
118 //---------------------------------------------------------------------------------------------------------------------------
119 /*! @function DNSServiceRegister_direct
120
121 @abstract Direct version of DNSServiceRegister.
122 */
123
124 DNSServiceErrorType
125 DNSServiceRegister_direct(
126 DNSServiceRef * outRef,
127 DNSServiceFlags inFlags,
128 uint32_t inInterfaceIndex,
129 const char * inName,
130 const char * inType,
131 const char * inDomain,
132 const char * inHost,
133 uint16_t inPort,
134 uint16_t inTXTSize,
135 const void * inTXT,
136 DNSServiceRegisterReply inCallBack,
137 void * inContext );
138
139 //---------------------------------------------------------------------------------------------------------------------------
140 /*! @function DNSServiceAddRecord_direct
141
142 @abstract Direct version of DNSServiceAddRecord.
143 */
144
145 DNSServiceErrorType
146 DNSServiceAddRecord_direct(
147 DNSServiceRef inRef,
148 DNSRecordRef * outRecordRef,
149 DNSServiceFlags inFlags,
150 uint16_t inRRType,
151 uint16_t inRDataSize,
152 const void * inRData,
153 uint32_t inTTL );
154
155 //---------------------------------------------------------------------------------------------------------------------------
156 /*! @function DNSServiceUpdateRecord_direct
157
158 @abstract Direct version of DNSServiceUpdateRecord.
159 */
160
161 DNSServiceErrorType
162 DNSServiceUpdateRecord_direct(
163 DNSServiceRef inRef,
164 DNSRecordRef inRecordRef,
165 DNSServiceFlags inFlags,
166 uint16_t inRDataSize,
167 const void * inRData,
168 uint32_t inTTL );
169
170 //---------------------------------------------------------------------------------------------------------------------------
171 /*! @function DNSServiceRemoveRecord_direct
172
173 @abstract Direct version of DNSServiceRemoveRecord.
174 */
175
176 DNSServiceErrorType DNSServiceRemoveRecord_direct( DNSServiceRef inRef, DNSRecordRef inRecordRef, DNSServiceFlags inFlags );
177
178 #if 0
179 #pragma mark == Service Discovery ==
180 #endif
181
182 //---------------------------------------------------------------------------------------------------------------------------
183 /*! @function DNSServiceBrowse_direct
184
185 @abstract Direct version of DNSServiceBrowse.
186 */
187
188 DNSServiceErrorType
189 DNSServiceBrowse_direct(
190 DNSServiceRef * outRef,
191 DNSServiceFlags inFlags,
192 uint32_t inInterfaceIndex,
193 const char * inType,
194 const char * inDomain,
195 DNSServiceBrowseReply inCallBack,
196 void * inContext );
197
198 //---------------------------------------------------------------------------------------------------------------------------
199 /*! @function DNSServiceResolve_direct
200
201 @abstract Direct version of DNSServiceResolve.
202 */
203
204 DNSServiceErrorType
205 DNSServiceResolve_direct(
206 DNSServiceRef * inRef,
207 DNSServiceFlags inFlags,
208 uint32_t inInterfaceIndex,
209 const char * inName,
210 const char * inType,
211 const char * inDomain,
212 DNSServiceResolveReply inCallBack,
213 void * inContext );
214
215 #if 0
216 #pragma mark == Special Purpose ==
217 #endif
218
219 //---------------------------------------------------------------------------------------------------------------------------
220 /*! @function DNSServiceCreateConnection_direct
221
222 @abstract Direct version of DNSServiceCreateConnection.
223 */
224
225 DNSServiceErrorType DNSServiceCreateConnection_direct( DNSServiceRef *outRef );
226
227 //---------------------------------------------------------------------------------------------------------------------------
228 /*! @function DNSServiceRegisterRecord_direct
229
230 @abstract Direct version of DNSServiceRegisterRecord.
231 */
232
233 DNSServiceErrorType
234 DNSServiceRegisterRecord_direct(
235 DNSServiceRef inRef,
236 DNSRecordRef * outRecordRef,
237 DNSServiceFlags inFlags,
238 uint32_t inInterfaceIndex,
239 const char * inName,
240 uint16_t inRRType,
241 uint16_t inRRClass,
242 uint16_t inRDataSize,
243 const void * inRData,
244 uint32_t inTTL,
245 DNSServiceRegisterRecordReply inCallBack,
246 void * inContext );
247
248 //---------------------------------------------------------------------------------------------------------------------------
249 /*! @function DNSServiceQueryRecord_direct
250
251 @abstract Direct version of DNSServiceQueryRecord.
252 */
253
254 DNSServiceErrorType
255 DNSServiceQueryRecord_direct(
256 DNSServiceRef * outRef,
257 DNSServiceFlags inFlags,
258 uint32_t inInterfaceIndex,
259 const char * inName,
260 uint16_t inRRType,
261 uint16_t inRRClass,
262 DNSServiceQueryRecordReply inCallBack,
263 void * inContext );
264
265 //---------------------------------------------------------------------------------------------------------------------------
266 /*! @function DNSServiceReconfirmRecord_direct
267
268 @abstract Direct version of DNSServiceReconfirmRecord.
269 */
270
271 void
272 DNSServiceReconfirmRecord_direct(
273 DNSServiceFlags inFlags,
274 uint32_t inInterfaceIndex,
275 const char * inName,
276 uint16_t inRRType,
277 uint16_t inRRClass,
278 uint16_t inRDataSize,
279 const void * inRData );
280
281 #ifdef __cplusplus
282 }
283 #endif
284
285 #endif // __DNS_SD_DIRECT__