zeroconf: set exports consistently

Fixes build on windows.

Change-Id: I46d918aa9e22843f073f0ebae05dc4da2b701834
Reviewed-on: http://codereview.qt-project.org/6366
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Fawzi Mohamed
2011-10-10 19:21:00 +02:00
committed by Robert Löhning
parent a3d0b084a5
commit 8538459e6d
3 changed files with 74 additions and 74 deletions

View File

@@ -155,20 +155,20 @@ public:
if (m_refSockFD == 0) qDebug() << QLatin1String("NativeZConfLib.m_refSockFD == 0");
}
virtual ~NativeZConfLib() {
~NativeZConfLib() {
}
virtual QString name(){
QString name(){
return QString::fromUtf8("NativeZeroConfLib@%1").arg(size_t(this),0,16);
}
// virtual bool tryStartDaemon();
virtual void refDeallocate(DNSServiceRef sdRef) {
void refDeallocate(DNSServiceRef sdRef) {
if (m_refDeallocate == 0) return;
m_refDeallocate(sdRef);
}
virtual DNSServiceErrorType resolve(DNSServiceRef *sdRef, DNSServiceFlags flags,
DNSServiceErrorType resolve(DNSServiceRef *sdRef, DNSServiceFlags flags,
uint32_t interfaceIndex, const char *name,
const char *regtype, const char *domain,
DNSServiceResolveReply callBack, void *context)
@@ -177,7 +177,7 @@ public:
return m_resolve(sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context);
}
virtual DNSServiceErrorType queryRecord(DNSServiceRef *sdRef, DNSServiceFlags flags,
DNSServiceErrorType queryRecord(DNSServiceRef *sdRef, DNSServiceFlags flags,
uint32_t interfaceIndex, const char *fullname,
uint16_t rrtype, uint16_t rrclass,
DNSServiceQueryRecordReply callBack, void *context)
@@ -187,7 +187,7 @@ public:
rrtype, rrclass, callBack, context);
}
virtual DNSServiceErrorType getAddrInfo(DNSServiceRef *sdRef, DNSServiceFlags flags,
DNSServiceErrorType getAddrInfo(DNSServiceRef *sdRef, DNSServiceFlags flags,
uint32_t interfaceIndex, DNSServiceProtocol protocol,
const char *hostname, DNSServiceGetAddrInfoReply callBack,
void *context)
@@ -220,13 +220,13 @@ public:
hostname, callBack, context);
}
virtual uint16_t txtRecordGetCount(uint16_t txtLen, const void *txtRecord)
uint16_t txtRecordGetCount(uint16_t txtLen, const void *txtRecord)
{
if (m_txtRecordGetCount == 0) return 0;
return m_txtRecordGetCount(txtLen, txtRecord);
}
virtual DNSServiceErrorType txtRecordGetItemAtIndex(uint16_t txtLen, const void *txtRecord,
DNSServiceErrorType txtRecordGetItemAtIndex(uint16_t txtLen, const void *txtRecord,
uint16_t itemIndex, uint16_t keyBufLen,
char *key, uint8_t *valueLen, const void **value)
{
@@ -235,7 +235,7 @@ public:
key, valueLen, value);
}
virtual DNSServiceErrorType reconfirmRecord(DNSServiceFlags flags, uint32_t interfaceIndex,
DNSServiceErrorType reconfirmRecord(DNSServiceFlags flags, uint32_t interfaceIndex,
const char *fullname, uint16_t rrtype,
uint16_t rrclass, uint16_t rdlen, const void *rdata)
{
@@ -244,7 +244,7 @@ public:
rrclass, rdlen, rdata);
}
virtual DNSServiceErrorType browse(DNSServiceRef *sdRef, DNSServiceFlags flags,
DNSServiceErrorType browse(DNSServiceRef *sdRef, DNSServiceFlags flags,
uint32_t interfaceIndex, const char *regtype,
const char *domain, DNSServiceBrowseReply callBack,
void *context)
@@ -253,7 +253,7 @@ public:
return m_browse(sdRef, flags, interfaceIndex, regtype, domain, callBack, context);
}
virtual DNSServiceErrorType getProperty(const char *property, // Requested property (i.e. kDNSServiceProperty_DaemonVersion)
DNSServiceErrorType getProperty(const char *property, // Requested property (i.e. kDNSServiceProperty_DaemonVersion)
void *result, // Pointer to place to store result
uint32_t *size // size of result location
)
@@ -263,17 +263,17 @@ public:
return m_getProperty(property, result, size);
}
virtual DNSServiceErrorType processResult(DNSServiceRef sdRef) {
DNSServiceErrorType processResult(DNSServiceRef sdRef) {
if (m_processResult == 0) return kDNSServiceErr_Unsupported;
return m_processResult(sdRef);
}
virtual DNSServiceErrorType createConnection(DNSServiceRef *sdRef) {
DNSServiceErrorType createConnection(DNSServiceRef *sdRef) {
if (m_createConnection == 0) return kDNSServiceErr_Unsupported;
return m_createConnection(sdRef);
}
virtual int refSockFD(DNSServiceRef sdRef) {
int refSockFD(DNSServiceRef sdRef) {
if (m_refSockFD == 0) return kDNSServiceErr_Unsupported;
return m_refSockFD(sdRef);
}

View File

@@ -125,7 +125,7 @@ int fromFullNameC(const char * const fullName, QString &service, QString &regtyp
// ----------------- C callbacks -----------------
extern "C" void cServiceResolveReply(DNSServiceRef sdRef,
extern "C" void DNSSD_API cServiceResolveReply(DNSServiceRef sdRef,
DNSServiceFlags flags,
uint32_t interfaceIndex,
DNSServiceErrorType errorCode,
@@ -146,7 +146,7 @@ extern "C" void cServiceResolveReply(DNSServiceRef sdRef,
}
}
extern "C" void cTxtRecordReply(DNSServiceRef sdRef,
extern "C" void DNSSD_API cTxtRecordReply(DNSServiceRef sdRef,
DNSServiceFlags flags,
uint32_t interfaceIndex,
DNSServiceErrorType errorCode,
@@ -168,7 +168,7 @@ extern "C" void cTxtRecordReply(DNSServiceRef sdRef,
}
}
extern "C" void cAddrReply(DNSServiceRef sdRef,
extern "C" void DNSSD_API cAddrReply(DNSServiceRef sdRef,
DNSServiceFlags flags,
uint32_t interfaceIndex,
DNSServiceErrorType errorCode,
@@ -188,7 +188,7 @@ extern "C" void cAddrReply(DNSServiceRef sdRef,
}
/// callback for service browsing
extern "C" void cBrowseReply(DNSServiceRef sdRef,
extern "C" void DNSSD_API cBrowseReply(DNSServiceRef sdRef,
DNSServiceFlags flags,
uint32_t interfaceIndex,
DNSServiceErrorType errorCode,

View File

@@ -74,8 +74,8 @@ public:
DNSServiceGetAddrInfoReply callBack, void *context) = 0;
// remove txt functions from lib and always embed?
virtual uint16_t DNSSD_API txtRecordGetCount(uint16_t txtLen, const void *txtRecord) = 0;
virtual DNSServiceErrorType DNSSD_API txtRecordGetItemAtIndex(uint16_t txtLen, const void *txtRecord,
virtual uint16_t txtRecordGetCount(uint16_t txtLen, const void *txtRecord) = 0;
virtual DNSServiceErrorType txtRecordGetItemAtIndex(uint16_t txtLen, const void *txtRecord,
uint16_t itemIndex, uint16_t keyBufLen, char *key,
uint8_t *valueLen, const void **value) = 0;