diff options
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.cpp')
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.cpp b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.cpp index 79f99b9..b4448c7 100644 --- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.cpp +++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.cpp @@ -1,37 +1,38 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h> + #include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.h> namespace Swift { -BonjourQuery::BonjourQuery(boost::shared_ptr<BonjourQuerier> q, EventLoop* eventLoop) : eventLoop(eventLoop), querier(q), sdRef(0) { +BonjourQuery::BonjourQuery(std::shared_ptr<BonjourQuerier> q, EventLoop* eventLoop) : eventLoop(eventLoop), querier(q), sdRef(nullptr) { } BonjourQuery::~BonjourQuery() { - DNSServiceRefDeallocate(sdRef); + DNSServiceRefDeallocate(sdRef); } void BonjourQuery::processResult() { - boost::lock_guard<boost::mutex> lock(sdRefMutex); - DNSServiceProcessResult(sdRef); + std::lock_guard<std::mutex> lock(sdRefMutex); + DNSServiceProcessResult(sdRef); } int BonjourQuery::getSocketID() const { - boost::lock_guard<boost::mutex> lock(sdRefMutex); - return DNSServiceRefSockFD(sdRef); + std::lock_guard<std::mutex> lock(sdRefMutex); + return DNSServiceRefSockFD(sdRef); } void BonjourQuery::run() { - querier->addRunningQuery(shared_from_this()); + querier->addRunningQuery(shared_from_this()); } void BonjourQuery::finish() { - querier->removeRunningQuery(shared_from_this()); + querier->removeRunningQuery(shared_from_this()); } } |