1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2009-2013 Apple Computer, 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.
20 // This file will be processed by the MIDL tool to
22 // produce the type library (DLLComponent.tlb) and marshalling code.
26 typedef [ uuid(4085DD59-D0E1-4efe-B6EE-DDBF7631B9C0) ]
32 kDNSSDFlagsMoreComing = 0x0001,
34 kDNSSDFlagsDefault = 0x0004,
36 kDNSSDFlagsNoAutoRename = 0x0008,
38 kDNSSDFlagsShared = 0x0010,
40 kDNSSDFlagsUnique = 0x0020,
42 kDNSSDFlagsBrowseDomains = 0x0040,
44 kDNSSDFlagsRegistrationDomains = 0x0080,
46 kDNSSDFlagsLongLivedQuery = 0x0100,
48 kDNSSDFlagsAllowRemoteQuery = 0x0200,
50 kDNSSDFlagsForceMulticast = 0x0400,
52 kDNSSDFlagsForce = 0x0800,
54 kDNSSDFlagsReturnIntermediates = 0x1000,
56 kDNSSDFlagsNonBrowsable = 0x2000
64 typedef [ uuid(30CDF335-CA52-4b17-AFF2-E83C64C450D4) ]
66 enum DNSSDAddressFamily
70 kDNSSDAddressFamily_IPv4 = 0x1,
72 kDNSSDAddressFamily_IPv6 = 0x2
80 typedef [ uuid(98FB4702-7374-4b16-A8DB-AD35BFB8364D) ]
86 kDNSSDProtocol_UDP = 0x10,
88 kDNSSDProtocol_TCP = 0x20
96 typedef [ uuid(72BF3EC3-19BC-47e5-8D95-3B73FF37D893) ]
110 typedef [ uuid(08E362DF-5468-4c9a-AC66-FD4747B917BD) ]
120 kDNSSDType_CNAME = 5,
125 kDNSSDType_NULL = 10,
128 kDNSSDType_HINFO = 13,
129 kDNSSDType_MINFO = 14,
133 kDNSSDType_AFSDB = 18,
135 kDNSSDType_ISDN = 20,
137 kDNSSDType_NSAP = 22,
138 kDNSSDType_NSAP_PTR = 23,
142 kDNSSDType_GPOS = 27,
143 kDNSSDType_AAAA = 28,
147 kDNSSDType_NIMLOC = 32,
149 kDNSSDType_ATMA = 34,
150 kDNSSDType_NAPTR = 35,
152 kDNSSDType_CERT = 37,
154 kDNSSDType_DNAME = 39,
155 kDNSSDType_SINK = 40,
159 kDNSSDType_SSHFP = 44,
160 kDNSSDType_IPSECKEY = 45,
161 kDNSSDType_RRSIG = 46,
162 kDNSSDType_NSEC = 47,
163 kDNSSDType_DNSKEY = 48,
164 kDNSSDType_DHCID = 49,
165 kDNSSDType_NSEC3 = 50,
166 kDNSSDType_NSEC3PARAM= 51,
169 kDNSSDType_UINFO = 100,
170 kDNSSDType_UID = 101,
171 kDNSSDType_GID = 102,
172 kDNSSDType_UNSPEC = 103,
173 kDNSSDType_TKEY = 249,
174 kDNSSDType_TSIG = 250,
175 kDNSSDType_IXFR = 251,
176 kDNSSDType_AXFR = 252,
177 kDNSSDType_MAILB = 253,
178 kDNSSDType_MAILA = 254,
187 typedef [ uuid(3B0059E7-5297-4301-9AAB-1522F31EC8A7) ]
191 kDNSSDError_NoError = 0,
192 kDNSSDError_Unknown = -65537,
193 kDNSSDError_NoSuchName = -65538,
194 kDNSSDError_NoMemory = -65539,
195 kDNSSDError_BadParam = -65540,
196 kDNSSDError_BadReference = -65541,
197 kDNSSDError_BadState = -65542,
198 kDNSSDError_BadFlags = -65543,
199 kDNSSDError_Unsupported = -65544,
200 kDNSSDError_NotInitialized = -65545,
201 kDNSSDError_AlreadyRegistered = -65547,
202 kDNSSDError_NameConflict = -65548,
203 kDNSSDError_Invalid = -65549,
204 kDNSSDError_Firewall = -65550,
205 kDNSSDError_Incompatible = -65551,
206 kDNSSDError_BadInterfaceIndex = -65552,
207 kDNSSDError_Refused = -65553,
208 kDNSSDError_NoSuchRecord = -65554,
209 kDNSSDError_NoAuth = -65555,
210 kDNSSDError_NoSuchKey = -65556,
211 kDNSSDError_NATTraversal = -65557,
212 kDNSSDError_DoubleNAT = -65558,
213 kDNSSDError_BadTime = -65559,
214 kDNSSDError_BadSig = -65560,
215 kDNSSDError_BadKey = -65561,
216 kDNSSDError_Transient = -65562,
217 kDNSSDError_ServiceNotRunning = -65563, /* Background daemon not running */
218 kDNSSDError_NATPortMappingUnsupported = -65564, /* NAT doesn't support PCP, NAT-PMP or UPnP */
219 kDNSSDError_NATPortMappingDisabled = -65565, /* NAT supports PCP, NAT-PMP or UPnP, but it's disabled by the administrator */
220 kDNSSDError_NoRouter = -65566, /* No router currently configured (probably no network connectivity) */
221 kDNSSDError_PollingMode = -65567
238 uuid(8FA0889C-5973-4FC9-970B-EC15C925D0CE),
244 helpstring("ITXTRecord Interface"),
246 pointer_default(unique)
250 interface ITXTRecord : IDispatch{
252 [id(1), helpstring("method SetValue")] HRESULT SetValue([in] BSTR key, [in] VARIANT value);
254 [id(2), helpstring("method RemoveValue")] HRESULT RemoveValue([in] BSTR key);
256 [id(3), helpstring("method ContainsKey")] HRESULT ContainsKey([in] BSTR key, [out,retval] VARIANT_BOOL* retval);
258 [id(4), helpstring("method GetValueForKey")] HRESULT GetValueForKey([in] BSTR key, [out,retval] VARIANT* value);
260 [id(5), helpstring("method GetCount")] HRESULT GetCount([out,retval] ULONG* count);
262 [id(6), helpstring("method GetKeyAtIndex")] HRESULT GetKeyAtIndex([in] ULONG index, [out,retval] BSTR* retval);
264 [id(7), helpstring("method GetValueAtIndex")] HRESULT GetValueAtIndex([in] ULONG index, [out,retval] VARIANT* retval);
272 uuid(9CE603A0-3365-4DA0-86D1-3F780ECBA110),
278 helpstring("IDNSSDRecord Interface"),
280 pointer_default(unique)
284 interface IDNSSDRecord : IDispatch{
286 [id(1), helpstring("method Update")] HRESULT Update([in] DNSSDFlags flags, [in] VARIANT rdata, [in] ULONG ttl);
288 [id(2), helpstring("method Remove")] HRESULT Remove([in] DNSSDFlags flags);
296 uuid(7FD72324-63E1-45AD-B337-4D525BD98DAD),
302 helpstring("IDNSSDEventManager Interface"),
304 pointer_default(unique)
308 interface IDNSSDEventManager : IDispatch{
316 uuid(29DE265F-8402-474F-833A-D4653B23458F),
322 helpstring("IDNSSDService Interface"),
324 pointer_default(unique)
328 interface IDNSSDService : IDispatch{
330 [id(1), helpstring("method EnumerateDomains")] HRESULT EnumerateDomains([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDService** service);
332 [id(2), helpstring("method Browse"), local] HRESULT Browse([in] DNSSDFlags flags, [in] ULONG interfaceIndex, [in] BSTR regtype, [in] BSTR domain, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDService** sdref);
334 [id(3), helpstring("method Resolve")] HRESULT Resolve([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR serviceName, [in] BSTR regType, [in] BSTR domain, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDService** service);
336 [id(4), helpstring("method Register")] HRESULT Register([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR name, [in] BSTR regType, [in] BSTR domain, [in] BSTR host, [in] USHORT port, [in] ITXTRecord* record, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDService** service);
338 [id(5), helpstring("method QueryRecord")] HRESULT QueryRecord([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR fullname, [in] DNSSDRRType rrtype, [in] DNSSDRRClass rrclass, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDService** service);
340 [id(6), helpstring("method RegisterRecord")] HRESULT RegisterRecord([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR fullname, [in] DNSSDRRType rrtype, [in] DNSSDRRClass rrclass, [in] VARIANT rdata, [in] ULONG ttl, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDRecord** record);
342 [id(7), helpstring("method AddRecord")] HRESULT AddRecord([in] DNSSDFlags flags, [in] DNSSDRRType rrtype, [in] VARIANT rdata, [in] ULONG ttl, [out,retval] IDNSSDRecord** record);
344 [id(8), helpstring("method ReconfirmRecord")] HRESULT ReconfirmRecord([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR fullname, [in] DNSSDRRType rrtype, [in] DNSSDRRClass rrclass, [in] VARIANT rdata);
346 [id(9), helpstring("method GetProperty")] HRESULT GetProperty([in] BSTR prop, [in,out] VARIANT * value );
348 [id(10), helpstring("method GetAddrInfo")] HRESULT GetAddrInfo([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] DNSSDAddressFamily addressFamily, [in] BSTR hostname, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDService** service);
350 [id(11), helpstring("method NATPortMappingCreate")] HRESULT NATPortMappingCreate([in] DNSSDFlags flags, [in] ULONG ifIndex, [in] DNSSDAddressFamily addressFamily, [in] DNSSDProtocol protocol, [in] USHORT internalPort, [in] USHORT externalPort, [in] ULONG ttl, [in] IDNSSDEventManager* eventManager, [out,retval] IDNSSDService** service);
352 [id(12), helpstring("method Stop"), local] HRESULT Stop(void);
358 uuid(18FBED6D-F2B7-4EC8-A4A4-46282E635308),
362 helpstring("Apple Bonjour Library 1.0")
370 importlib("stdole2.tlb");
374 uuid(21AE8D7F-D5FE-45cf-B632-CFA2C2C6B498),
376 helpstring("_IDNSSDEvents Interface")
380 dispinterface _IDNSSDEvents
388 [id(1), helpstring("method DomainFound")] void DomainFound([in] IDNSSDService* service, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR domain);
390 [id(2), helpstring("method DomainLost")] void DomainLost([in] IDNSSDService* service, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR domain);
392 [id(3), helpstring("method ServiceFound")] void ServiceFound([in] IDNSSDService* browser, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR serviceName, [in] BSTR regType, [in] BSTR domain);
394 [id(4), helpstring("method ServiceLost")] void ServiceLost([in] IDNSSDService* browser, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR serviceName, [in] BSTR regType, [in] BSTR domain);
396 [id(5), helpstring("method ServiceResolved")] void ServiceResolved([in] IDNSSDService* service, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR fullName, [in] BSTR hostName, [in] USHORT port, [in] ITXTRecord* record);
398 [id(6), helpstring("method ServiceRegistered")] void ServiceRegistered([in] IDNSSDService* service, [in] DNSSDFlags flags, [in] BSTR name, [in] BSTR regType, [in] BSTR domain);
400 [id(7), helpstring("method QueryRecordAnswered")] void QueryRecordAnswered([in] IDNSSDService* service, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR fullName, [in] DNSSDRRType rrtype, [in] DNSSDRRClass rrclass, [in] VARIANT rdata, [in] ULONG ttl);
402 [id(8), helpstring("method RecordRegistered")] void RecordRegistered([in] IDNSSDRecord* record, [in] DNSSDFlags flags);
404 [id(9), helpstring("method AddressFound")] void AddressFound([in] IDNSSDService* service, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] BSTR hostname, [in] DNSSDAddressFamily addressFamily, [in] BSTR address, [in] ULONG ttl);
406 [id(10), helpstring("method MappingCreated")] void MappingCreated([in] IDNSSDService* service, [in] DNSSDFlags flags, [in] ULONG ifIndex, [in] ULONG externalAddress, [in] DNSSDAddressFamily addressFamily, [in] DNSSDProtocol protocol, [in] USHORT internalPort, [in] USHORT externalPort, [in] ULONG ttl);
408 [id(11), helpstring("method OperationFailed")] void OperationFailed([in] IDNSSDService* service, [in] DNSSDError error);
414 uuid(24CD4DE9-FF84-4701-9DC1-9B69E0D1090A),
416 helpstring("DNSSDService Class")
424 [default] interface IDNSSDService;
430 uuid(AFEE063C-05BA-4248-A26E-168477F49734),
432 helpstring("TXTRecord Class")
440 [default] interface ITXTRecord;
446 uuid(5E93C5A9-7516-4259-A67B-41A656F6E01C),
448 helpstring("DNSSDRecord Class")
456 [default] interface IDNSSDRecord;
462 uuid(BEEB932A-8D4A-4619-AEFE-A836F988B221),
464 helpstring("DNSSDEventManager Class")
468 coclass DNSSDEventManager
472 [default] interface IDNSSDEventManager;
474 [default, source] dispinterface _IDNSSDEvents;
480 enum DNSSDAddressFamily;