1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
/*
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
*/
#ifndef _DNS_SD_PROXY
#define _DNS_SD_PROXY
#ifndef _MSC_VER
#include <stdint.h>
#endif
/* fixup to make pidgin compile against win32 bonjour */
#if defined(_WIN32) && !defined(_MSC_VER)
#define _MSL_STDINT_H
#endif
#include <dns_sd.h>
gboolean dns_sd_available(void);
#ifndef LINK_DNS_SD_DIRECTLY
DNSServiceErrorType _wpurple_DNSServiceAddRecord(DNSServiceRef sdRef, DNSRecordRef *RecordRef, DNSServiceFlags flags,
uint16_t rrtype, uint16_t rdlen, const void *rdata, uint32_t ttl);
#define DNSServiceAddRecord(sdRef, RecordRef, flags, rrtype, rdlen, rdata, ttl) \
_wpurple_DNSServiceAddRecord(sdRef, RecordRef, flags, rrtype, rdlen, rdata, ttl)
DNSServiceErrorType _wpurple_DNSServiceBrowse(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex,
const char *regtype, const char *domain, DNSServiceBrowseReply callBack, void *context);
#define DNSServiceBrowse(sdRef, flags, interfaceIndex, regtype, domain, callBack, context) \
_wpurple_DNSServiceBrowse(sdRef, flags, interfaceIndex, regtype, domain, callBack, context)
int _wpurple_DNSServiceConstructFullName(char *fullName, const char *service, const char *regtype, const char *domain);
#define DNSServiceConstructFullName(fullName, service, regtype, domain) \
_wpurple_DNSServiceConstructFullName(fullName, service, regtype, domain)
DNSServiceErrorType _wpurple_DNSServiceProcessResult(DNSServiceRef sdRef);
#define DNSServiceProcessResult(sdRef) \
_wpurple_DNSServiceProcessResult(sdRef);
DNSServiceErrorType _wpurple_DNSServiceQueryRecord(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex,
const char *fullname, uint16_t rrtype, uint16_t rrclass, DNSServiceQueryRecordReply callBack, void *context);
#define DNSServiceQueryRecord(sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, callBack, context) \
_wpurple_DNSServiceQueryRecord(sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, callBack, context)
void _wpurple_DNSServiceRefDeallocate(DNSServiceRef sdRef);
#define DNSServiceRefDeallocate(sdRef) \
_wpurple_DNSServiceRefDeallocate(sdRef)
int _wpurple_DNSServiceRefSockFD(DNSServiceRef sdRef);
#define DNSServiceRefSockFD(sdRef) \
_wpurple_DNSServiceRefSockFD(sdRef)
DNSServiceErrorType _wpurple_DNSServiceRegister(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex,
const char *name, const char *regtype, const char *domain, const char *host, uint16_t port, uint16_t txtLen,
const void *txtRecord, DNSServiceRegisterReply callBack, void *context);
#define DNSServiceRegister(sdRef, flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, callBack, context) \
_wpurple_DNSServiceRegister(sdRef, flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, callBack, context)
DNSServiceErrorType _wpurple_DNSServiceResolve(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, const char *name,
const char *regtype, const char *domain, DNSServiceResolveReply callBack, void *context);
#define DNSServiceResolve(sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context) \
_wpurple_DNSServiceResolve(sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context)
DNSServiceErrorType _wpurple_DNSServiceRemoveRecord(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags);
#define DNSServiceRemoveRecord(sdRef, RecordRef, flags) \
_wpurple_DNSServiceRemoveRecord(sdRef, RecordRef, flags)
DNSServiceErrorType _wpurple_DNSServiceUpdateRecord(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags,
uint16_t rdlen, const void *rdata, uint32_t ttl);
#define DNSServiceUpdateRecord(sdRef, RecordRef, flags, rdlen, rdata, ttl) \
_wpurple_DNSServiceUpdateRecord(sdRef, RecordRef, flags, rdlen, rdata, ttl)
void _wpurple_TXTRecordCreate(TXTRecordRef *txtRecord, uint16_t bufferLen, void *buffer);
#define TXTRecordCreate(txtRecord, bufferLen, buffer) \
_wpurple_TXTRecordCreate(txtRecord, bufferLen, buffer)
void _wpurple_TXTRecordDeallocate(TXTRecordRef *txtRecord);
#define TXTRecordDeallocate(txtRecord) \
_wpurple_TXTRecordDeallocate(txtRecord)
const void * _wpurple_TXTRecordGetBytesPtr(const TXTRecordRef *txtRecord);
#define TXTRecordGetBytesPtr(txtRecord) \
_wpurple_TXTRecordGetBytesPtr(txtRecord)
uint16_t _wpurple_TXTRecordGetLength(const TXTRecordRef *txtRecord);
#define TXTRecordGetLength(txtRecord) \
_wpurple_TXTRecordGetLength(txtRecord)
const void * _wpurple_TXTRecordGetValuePtr(uint16_t txtLen, const void *txtRecord, const char *key, uint8_t *valueLen);
#define TXTRecordGetValuePtr(txtLen, txtRecord, key, valueLen) \
_wpurple_TXTRecordGetValuePtr(txtLen, txtRecord, key, valueLen)
DNSServiceErrorType _wpurple_TXTRecordSetValue(TXTRecordRef *txtRecord, const char *key, uint8_t valueSize, const void *value);
#define TXTRecordSetValue(txtRecord, key, valueSize, value) \
_wpurple_TXTRecordSetValue(txtRecord, key, valueSize, value)
#endif /*LINK_DNS_SD_DIRECTLY*/
#endif
|