| 8 #define _MSL_STDINT_H |
8 #define _MSL_STDINT_H |
| 9 #endif |
9 #endif |
| 10 |
10 |
| 11 #include <dns_sd.h> |
11 #include <dns_sd.h> |
| 12 |
12 |
| |
13 gboolean dns_sd_available(void); |
| |
14 |
| |
15 #ifndef LINK_DNS_SD_DIRECTLY |
| |
16 |
| |
17 DNSServiceErrorType _wpurple_DNSServiceAddRecord(DNSServiceRef sdRef, DNSRecordRef *RecordRef, DNSServiceFlags flags, |
| |
18 uint16_t rrtype, uint16_t rdlen, const void *rdata, uint32_t ttl); |
| |
19 #define DNSServiceAddRecord(sdRef, RecordRef, flags, rrtype, rdlen, rdata, ttl) \ |
| |
20 _wpurple_DNSServiceAddRecord(sdRef, RecordRef, flags, rrtype, rdlen, rdata, ttl) |
| |
21 |
| |
22 DNSServiceErrorType _wpurple_DNSServiceBrowse(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, |
| |
23 const char *regtype, const char *domain, DNSServiceBrowseReply callBack, void *context); |
| |
24 #define DNSServiceBrowse(sdRef, flags, interfaceIndex, regtype, domain, callBack, context) \ |
| |
25 _wpurple_DNSServiceBrowse(sdRef, flags, interfaceIndex, regtype, domain, callBack, context) |
| |
26 |
| |
27 int _wpurple_DNSServiceConstructFullName(char *fullName, const char *service, const char *regtype, const char *domain); |
| |
28 #define DNSServiceConstructFullName(fullName, service, regtype, domain) \ |
| |
29 _wpurple_DNSServiceConstructFullName(fullName, service, regtype, domain) |
| |
30 |
| |
31 DNSServiceErrorType _wpurple_DNSServiceProcessResult(DNSServiceRef sdRef); |
| |
32 #define DNSServiceProcessResult(sdRef) \ |
| |
33 _wpurple_DNSServiceProcessResult(sdRef); |
| |
34 |
| |
35 DNSServiceErrorType _wpurple_DNSServiceQueryRecord(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, |
| |
36 const char *fullname, uint16_t rrtype, uint16_t rrclass, DNSServiceQueryRecordReply callBack, void *context); |
| |
37 #define DNSServiceQueryRecord(sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, callBack, context) \ |
| |
38 _wpurple_DNSServiceQueryRecord(sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, callBack, context) |
| |
39 |
| |
40 void _wpurple_DNSServiceRefDeallocate(DNSServiceRef sdRef); |
| |
41 #define DNSServiceRefDeallocate(sdRef) \ |
| |
42 _wpurple_DNSServiceRefDeallocate(sdRef) |
| |
43 |
| |
44 int _wpurple_DNSServiceRefSockFD(DNSServiceRef sdRef); |
| |
45 #define DNSServiceRefSockFD(sdRef) \ |
| |
46 _wpurple_DNSServiceRefSockFD(sdRef) |
| |
47 |
| |
48 DNSServiceErrorType _wpurple_DNSServiceRegister(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, |
| |
49 const char *name, const char *regtype, const char *domain, const char *host, uint16_t port, uint16_t txtLen, |
| |
50 const void *txtRecord, DNSServiceRegisterReply callBack, void *context); |
| |
51 #define DNSServiceRegister(sdRef, flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, callBack, context) \ |
| |
52 _wpurple_DNSServiceRegister(sdRef, flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, callBack, context) |
| |
53 |
| |
54 DNSServiceErrorType _wpurple_DNSServiceResolve(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, const char *name, |
| |
55 const char *regtype, const char *domain, DNSServiceResolveReply callBack, void *context); |
| |
56 #define DNSServiceResolve(sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context) \ |
| |
57 _wpurple_DNSServiceResolve(sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context) |
| |
58 |
| |
59 DNSServiceErrorType _wpurple_DNSServiceRemoveRecord(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags); |
| |
60 #define DNSServiceRemoveRecord(sdRef, RecordRef, flags) \ |
| |
61 _wpurple_DNSServiceRemoveRecord(sdRef, RecordRef, flags) |
| |
62 |
| |
63 DNSServiceErrorType _wpurple_DNSServiceUpdateRecord(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags, |
| |
64 uint16_t rdlen, const void *rdata, uint32_t ttl); |
| |
65 #define DNSServiceUpdateRecord(sdRef, RecordRef, flags, rdlen, rdata, ttl) \ |
| |
66 _wpurple_DNSServiceUpdateRecord(sdRef, RecordRef, flags, rdlen, rdata, ttl) |
| |
67 |
| |
68 void _wpurple_TXTRecordCreate(TXTRecordRef *txtRecord, uint16_t bufferLen, void *buffer); |
| |
69 #define TXTRecordCreate(txtRecord, bufferLen, buffer) \ |
| |
70 _wpurple_TXTRecordCreate(txtRecord, bufferLen, buffer) |
| |
71 |
| |
72 void _wpurple_TXTRecordDeallocate(TXTRecordRef *txtRecord); |
| |
73 #define TXTRecordDeallocate(txtRecord) \ |
| |
74 _wpurple_TXTRecordDeallocate(txtRecord) |
| |
75 |
| |
76 const void * _wpurple_TXTRecordGetBytesPtr(const TXTRecordRef *txtRecord); |
| |
77 #define TXTRecordGetBytesPtr(txtRecord) \ |
| |
78 _wpurple_TXTRecordGetBytesPtr(txtRecord) |
| |
79 |
| |
80 uint16_t _wpurple_TXTRecordGetLength(const TXTRecordRef *txtRecord); |
| |
81 #define TXTRecordGetLength(txtRecord) \ |
| |
82 _wpurple_TXTRecordGetLength(txtRecord) |
| |
83 |
| |
84 const void * _wpurple_TXTRecordGetValuePtr(uint16_t txtLen, const void *txtRecord, const char *key, uint8_t *valueLen); |
| |
85 #define TXTRecordGetValuePtr(txtLen, txtRecord, key, valueLen) \ |
| |
86 _wpurple_TXTRecordGetValuePtr(txtLen, txtRecord, key, valueLen) |
| |
87 |
| |
88 DNSServiceErrorType _wpurple_TXTRecordSetValue(TXTRecordRef *txtRecord, const char *key, uint8_t valueSize, const void *value); |
| |
89 #define TXTRecordSetValue(txtRecord, key, valueSize, value) \ |
| |
90 _wpurple_TXTRecordSetValue(txtRecord, key, valueSize, value) |
| |
91 |
| |
92 #endif /*LINK_DNS_SD_DIRECTLY*/ |
| |
93 |
| 13 #endif |
94 #endif |