im.pidgin.pidgin: 6f133a093581cd9a632ca6d0ce110d180e582714

datallah at pidgin.im datallah at pidgin.im
Tue Oct 2 20:50:31 EDT 2007


revision:            6f133a093581cd9a632ca6d0ce110d180e582714
date:                2007-10-03T00:47:25
author:              datallah at pidgin.im
branch:              im.pidgin.pidgin
changelog:
Don't link the bonjour prpl on win32 directly to the Apple Bonjour library, instead do everything indirectly and display an error message at login time indicating that Bonjour isn't installed.  This should make the prpl more discoverable.

manifest:
format_version "1"

new_manifest [fe24d25c7d01052c16453815ef11fcd12939e46a]

old_revision [fbb7ffaf4075cf690cc3ff9d171e56320e9af8da]

add_file "libpurple/protocols/bonjour/dns_sd_proxy.c"
 content [5199882594a26f949814387e509c1766c0f67dd4]

patch "libpurple/protocols/bonjour/Makefile.am"
 from [90d47f9af47c6f91ae2437b6776523064549ca32]
   to [66528f8cacc25d2764e00f74003ed1fa14e095da]

patch "libpurple/protocols/bonjour/Makefile.mingw"
 from [d854d40f013c09f8f07c4674c9905b77d6b750b3]
   to [68142a3871b3bcb2be7229170c4bc8ea4fd13943]

patch "libpurple/protocols/bonjour/bonjour.c"
 from [4bf190ec74fffd44c858abfabab31e1cd8cbfa18]
   to [64780fa8de009d3f0535aae3bc3d10505be400da]

patch "libpurple/protocols/bonjour/dns_sd_proxy.h"
 from [5c8bb1f2d994ebfb1554d95a18b59601a1f06e4b]
   to [51e3eb25f562cfbd2a9609ce2511f8a2dedee880]

patch "libpurple/protocols/bonjour/mdns_win32.c"
 from [03e5cd92236058b8970463c7932950f7a356c058]
   to [aeba928ec9fa711f19c2bfbbee52b2ca9c1469c1]
-------------- next part --------------
#
#
# add_file "libpurple/protocols/bonjour/dns_sd_proxy.c"
#  content [5199882594a26f949814387e509c1766c0f67dd4]
# 
# patch "libpurple/protocols/bonjour/Makefile.am"
#  from [90d47f9af47c6f91ae2437b6776523064549ca32]
#    to [66528f8cacc25d2764e00f74003ed1fa14e095da]
# 
# patch "libpurple/protocols/bonjour/Makefile.mingw"
#  from [d854d40f013c09f8f07c4674c9905b77d6b750b3]
#    to [68142a3871b3bcb2be7229170c4bc8ea4fd13943]
# 
# patch "libpurple/protocols/bonjour/bonjour.c"
#  from [4bf190ec74fffd44c858abfabab31e1cd8cbfa18]
#    to [64780fa8de009d3f0535aae3bc3d10505be400da]
# 
# patch "libpurple/protocols/bonjour/dns_sd_proxy.h"
#  from [5c8bb1f2d994ebfb1554d95a18b59601a1f06e4b]
#    to [51e3eb25f562cfbd2a9609ce2511f8a2dedee880]
# 
# patch "libpurple/protocols/bonjour/mdns_win32.c"
#  from [03e5cd92236058b8970463c7932950f7a356c058]
#    to [aeba928ec9fa711f19c2bfbbee52b2ca9c1469c1]
#
============================================================
--- libpurple/protocols/bonjour/dns_sd_proxy.c	5199882594a26f949814387e509c1766c0f67dd4
+++ libpurple/protocols/bonjour/dns_sd_proxy.c	5199882594a26f949814387e509c1766c0f67dd4
@@ -0,0 +1,181 @@
+/**
+ *
+ * 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.
+ */
+
+#include "win32dep.h"
+#include "dns_sd_proxy.h"
+
+#ifndef LINK_DNS_SD_DIRECTLY
+static DNSServiceErrorType (DNSSD_API* _DNSServiceAddRecord)(DNSServiceRef sdRef, DNSRecordRef *RecordRef, DNSServiceFlags flags,
+		uint16_t rrtype, uint16_t rdlen, const void *rdata, uint32_t ttl);
+static DNSServiceErrorType (DNSSD_API* _DNSServiceBrowse)(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex,
+	const char *regtype, const char *domain, DNSServiceBrowseReply callBack, void *context);
+static int (DNSSD_API* _DNSServiceConstructFullName)(char *fullName, const char *service, const char *regtype, const char *domain);
+static DNSServiceErrorType (DNSSD_API* _DNSServiceProcessResult)(DNSServiceRef sdRef);
+static DNSServiceErrorType (DNSSD_API* _DNSServiceQueryRecord)(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex,
+	const char *fullname, uint16_t rrtype, uint16_t rrclass, DNSServiceQueryRecordReply callBack, void *context);
+static void (DNSSD_API* _DNSServiceRefDeallocate)(DNSServiceRef sdRef);
+static int (DNSSD_API* _DNSServiceRefSockFD)(DNSServiceRef sdRef);
+static DNSServiceErrorType (DNSSD_API* _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);
+static DNSServiceErrorType (DNSSD_API* _DNSServiceResolve)(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, const char *name,
+	const char *regtype, const char *domain, DNSServiceResolveReply callBack, void *context);
+static DNSServiceErrorType (DNSSD_API* _DNSServiceRemoveRecord)(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags);
+static DNSServiceErrorType (DNSSD_API* _DNSServiceUpdateRecord)(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags,
+	uint16_t rdlen, const void *rdata, uint32_t ttl);
+static void (DNSSD_API* _TXTRecordCreate)(TXTRecordRef *txtRecord, uint16_t bufferLen, void *buffer);
+static void (DNSSD_API* _TXTRecordDeallocate)(TXTRecordRef *txtRecord);
+static const void * (DNSSD_API* _TXTRecordGetBytesPtr)(const TXTRecordRef *txtRecord);
+static int16_t (DNSSD_API* _TXTRecordGetLength)(const TXTRecordRef *txtRecord);
+static const void * (DNSSD_API* _TXTRecordGetValuePtr)(uint16_t txtLen, const void *txtRecord, const char *key, uint8_t *valueLen);
+static DNSServiceErrorType (DNSSD_API* _TXTRecordSetValue)(TXTRecordRef *txtRecord, const char *key, uint8_t valueSize, const void *value);
+#endif
+
+gboolean dns_sd_available(void) {
+#ifndef LINK_DNS_SD_DIRECTLY
+	static gboolean initialized = FALSE;
+	static gboolean loaded = FALSE;
+
+	if (!initialized) {
+		initialized = TRUE;
+		if ((_DNSServiceAddRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceAddRecord"))
+				&& (_DNSServiceBrowse = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceBrowse"))
+				&& (_DNSServiceConstructFullName = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceConstructFullName"))
+				&& (_DNSServiceProcessResult = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceProcessResult"))
+				&& (_DNSServiceQueryRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceQueryRecord"))
+				&& (_DNSServiceRefDeallocate = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRefDeallocate"))
+				&& (_DNSServiceRefSockFD = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRefSockFD"))
+				&& (_DNSServiceRegister = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRegister"))
+				&& (_DNSServiceResolve = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceResolve"))
+				&& (_DNSServiceRemoveRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRemoveRecord"))
+				&& (_DNSServiceUpdateRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceUpdateRecord"))
+				&& (_TXTRecordCreate = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordCreate"))
+				&& (_TXTRecordDeallocate = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordDeallocate"))
+				&& (_TXTRecordGetBytesPtr = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetBytesPtr"))
+				&& (_TXTRecordGetLength = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetLength"))
+				&& (_TXTRecordGetValuePtr = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetValuePtr"))
+				&& (_TXTRecordSetValue = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordSetValue"))) {
+			loaded = TRUE;
+		}
+	}
+	return loaded;
+#else
+	return TRUE;
+#endif
+}
+
+#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) {
+	g_return_val_if_fail(_DNSServiceAddRecord != NULL, kDNSServiceErr_Unknown);
+	return (_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) {
+	g_return_val_if_fail(_DNSServiceBrowse != NULL, kDNSServiceErr_Unknown);
+	return (_DNSServiceBrowse)(sdRef, flags, interfaceIndex, regtype, domain, callBack, context);
+}
+
+int _wpurple_DNSServiceConstructFullName(char *fullName, const char *service, const char *regtype, const char *domain) {
+	g_return_val_if_fail(_DNSServiceConstructFullName != NULL, 0);
+	return (_DNSServiceConstructFullName)(fullName, service, regtype, domain);
+}
+
+DNSServiceErrorType _wpurple_DNSServiceProcessResult(DNSServiceRef sdRef) {
+	g_return_val_if_fail(_DNSServiceProcessResult != NULL, kDNSServiceErr_Unknown);
+	return (_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) {
+	g_return_val_if_fail(_DNSServiceQueryRecord != NULL, kDNSServiceErr_Unknown);
+	return (_DNSServiceQueryRecord)(sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, callBack, context);
+}
+
+void _wpurple_DNSServiceRefDeallocate(DNSServiceRef sdRef) {
+	g_return_if_fail(_DNSServiceRefDeallocate != NULL);
+	(_DNSServiceRefDeallocate)(sdRef);
+}
+
+int _wpurple_DNSServiceRefSockFD(DNSServiceRef sdRef) {
+	g_return_val_if_fail(_DNSServiceRefSockFD != NULL, -1);
+	return (_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) {
+	g_return_val_if_fail(_DNSServiceRegister != NULL, kDNSServiceErr_Unknown);
+	return (_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) {
+	g_return_val_if_fail(_DNSServiceResolve != NULL, kDNSServiceErr_Unknown);
+	return (_DNSServiceResolve)(sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context);
+}
+
+DNSServiceErrorType _wpurple_DNSServiceRemoveRecord(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags) {
+	g_return_val_if_fail(_DNSServiceRemoveRecord != NULL, kDNSServiceErr_Unknown);
+	return (_DNSServiceRemoveRecord)(sdRef, RecordRef, flags);
+}
+
+DNSServiceErrorType _wpurple_DNSServiceUpdateRecord(DNSServiceRef sdRef, DNSRecordRef RecordRef, DNSServiceFlags flags,
+		uint16_t rdlen, const void *rdata, uint32_t ttl) {
+	g_return_val_if_fail(_DNSServiceUpdateRecord != NULL, kDNSServiceErr_Unknown);
+	return (_DNSServiceUpdateRecord)(sdRef, RecordRef, flags, rdlen, rdata, ttl);
+}
+
+void _wpurple_TXTRecordCreate(TXTRecordRef *txtRecord, uint16_t bufferLen, void *buffer) {
+	g_return_if_fail(_TXTRecordCreate != NULL);
+	(_TXTRecordCreate)(txtRecord, bufferLen, buffer);
+}
+
+void _wpurple_TXTRecordDeallocate(TXTRecordRef *txtRecord) {
+	g_return_if_fail(_TXTRecordDeallocate != NULL);
+	(_TXTRecordDeallocate)(txtRecord);
+}
+
+const void * _wpurple_TXTRecordGetBytesPtr(const TXTRecordRef *txtRecord) {
+	g_return_val_if_fail(_TXTRecordGetBytesPtr != NULL, NULL);
+	return (_TXTRecordGetBytesPtr)(txtRecord);
+}
+
+uint16_t _wpurple_TXTRecordGetLength(const TXTRecordRef *txtRecord) {
+	g_return_val_if_fail(_TXTRecordGetLength != NULL, 0);
+	return (_TXTRecordGetLength)(txtRecord);
+}
+
+const void * _wpurple_TXTRecordGetValuePtr(uint16_t txtLen, const void *txtRecord, const char *key, uint8_t *valueLen) {
+	g_return_val_if_fail(_TXTRecordGetValuePtr != NULL, NULL);
+	return (_TXTRecordGetValuePtr)(txtLen, txtRecord, key, valueLen);
+}
+
+DNSServiceErrorType _wpurple_TXTRecordSetValue(TXTRecordRef *txtRecord, const char *key, uint8_t valueSize, const void *value) {
+	g_return_val_if_fail(_TXTRecordSetValue != NULL, kDNSServiceErr_Unknown);
+	return (_TXTRecordSetValue)(txtRecord, key, valueSize, value);
+}
+
+#endif /*LINK_DNS_SD_DIRECTLY*/
+
============================================================
--- libpurple/protocols/bonjour/Makefile.am	90d47f9af47c6f91ae2437b6776523064549ca32
+++ libpurple/protocols/bonjour/Makefile.am	66528f8cacc25d2764e00f74003ed1fa14e095da
@@ -1,5 +1,6 @@ EXTRA_DIST = \
 EXTRA_DIST = \
 	mdns_win32.c \
+	dns_sd_proxy.c \
 	dns_sd_proxy.h \
 	Makefile.mingw
 
============================================================
--- libpurple/protocols/bonjour/Makefile.mingw	d854d40f013c09f8f07c4674c9905b77d6b750b3
+++ libpurple/protocols/bonjour/Makefile.mingw	68142a3871b3bcb2be7229170c4bc8ea4fd13943
@@ -45,6 +45,7 @@ C_SRC =			bonjour.c \
 ##
 C_SRC =			bonjour.c \
 			buddy.c \
+			dns_sd_proxy.c \
 			mdns_common.c \
 			mdns_win32.c \
 			parser.c \
@@ -59,11 +60,15 @@ LIBS =	\
 			-lglib-2.0 \
 			-lws2_32 \
 			-lintl \
-			-ldnssd \
 			-lnetapi32 \
 			-lxml2 \
 			-lpurple
 
+ifeq ($(LINK_DNS_SD_DIRECTLY), 1)
+	CFLAGS += -DLINK_DNS_SD_DIRECTLY
+	LIBS += -ldnssd
+endif
+
 include $(PIDGIN_COMMON_RULES)
 
 ##
============================================================
--- libpurple/protocols/bonjour/bonjour.c	4bf190ec74fffd44c858abfabab31e1cd8cbfa18
+++ libpurple/protocols/bonjour/bonjour.c	64780fa8de009d3f0535aae3bc3d10505be400da
@@ -26,6 +26,7 @@
 #define UNICODE
 #include <windows.h>
 #include <lm.h>
+#include "dns_sd_proxy.h"
 #endif
 
 #include "internal.h"
@@ -99,6 +100,17 @@ bonjour_login(PurpleAccount *account)
 	PurpleStatus *status;
 	PurplePresence *presence;
 
+#ifdef _WIN32
+	if (!dns_sd_available()) {
+		gc->wants_to_die = TRUE;
+		purple_connection_error(gc,
+			_("The Apple Bonjour For Windows toolkit wasn't found, see the FAQ at: "
+			  "http://developer.pidgin.im/wiki/Using%20Pidgin#CanIusePidginforBonjourLink-LocalMessaging"
+			  " for more information."));
+		return;
+	}
+#endif
+
 	gc->flags |= PURPLE_CONNECTION_HTML;
 	gc->proto_data = bd = g_new0(BonjourData, 1);
 
@@ -155,13 +167,13 @@ bonjour_close(PurpleConnection *connecti
 	BonjourData *bd = connection->proto_data;
 
 	/* Stop looking for buddies in the LAN */
-	if (bd->dns_sd_data != NULL)
+	if (bd != NULL && bd->dns_sd_data != NULL)
 	{
 		bonjour_dns_sd_stop(bd->dns_sd_data);
 		bonjour_dns_sd_free(bd->dns_sd_data);
 	}
 
-	if (bd->jabber_data != NULL)
+	if (bd != NULL && bd->jabber_data != NULL)
 	{
 		/* Stop waiting for conversations */
 		bonjour_jabber_stop(bd->jabber_data);
============================================================
--- libpurple/protocols/bonjour/dns_sd_proxy.h	5c8bb1f2d994ebfb1554d95a18b59601a1f06e4b
+++ libpurple/protocols/bonjour/dns_sd_proxy.h	51e3eb25f562cfbd2a9609ce2511f8a2dedee880
@@ -10,4 +10,85 @@
 
 #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
============================================================
--- libpurple/protocols/bonjour/mdns_win32.c	03e5cd92236058b8970463c7932950f7a356c058
+++ libpurple/protocols/bonjour/mdns_win32.c	aeba928ec9fa711f19c2bfbbee52b2ca9c1469c1
@@ -1,4 +1,9 @@
-/*
+/**
+ *
+ * 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


More information about the Commits mailing list