diff options
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/Fake')
| -rw-r--r-- | Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp | 6 | ||||
| -rw-r--r-- | Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h | 6 | ||||
| -rw-r--r-- | Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp index c17f8b2..3381a26 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2016 Isode Limited. | 2 | * Copyright (c) 2010-2018 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -32,7 +32,7 @@ std::shared_ptr<DNSSDBrowseQuery> FakeDNSSDQuerier::createBrowseQuery() { | |||
| 32 | return std::make_shared<FakeDNSSDBrowseQuery>(shared_from_this()); | 32 | return std::make_shared<FakeDNSSDBrowseQuery>(shared_from_this()); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | std::shared_ptr<DNSSDRegisterQuery> FakeDNSSDQuerier::createRegisterQuery(const std::string& name, int port, const ByteArray& info) { | 35 | std::shared_ptr<DNSSDRegisterQuery> FakeDNSSDQuerier::createRegisterQuery(const std::string& name, unsigned short port, const ByteArray& info) { |
| 36 | return std::make_shared<FakeDNSSDRegisterQuery>(name, port, info, shared_from_this()); | 36 | return std::make_shared<FakeDNSSDRegisterQuery>(name, port, info, shared_from_this()); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| @@ -105,7 +105,7 @@ void FakeDNSSDQuerier::setServiceInfo(const DNSSDServiceID& id, const DNSSDResol | |||
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | bool FakeDNSSDQuerier::isServiceRegistered(const std::string& name, int port, const ByteArray& info) { | 108 | bool FakeDNSSDQuerier::isServiceRegistered(const std::string& name, unsigned short port, const ByteArray& info) { |
| 109 | for (const auto& query : getQueries<FakeDNSSDRegisterQuery>()) { | 109 | for (const auto& query : getQueries<FakeDNSSDRegisterQuery>()) { |
| 110 | if (query->name == name && query->port == port && query->info == info) { | 110 | if (query->name == name && query->port == port && query->info == info) { |
| 111 | return true; | 111 | return true; |
diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h index 5d4fefd..07cb75c 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2017 Isode Limited. | 2 | * Copyright (c) 2010-2018 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -39,7 +39,7 @@ namespace Swift { | |||
| 39 | 39 | ||
| 40 | std::shared_ptr<DNSSDBrowseQuery> createBrowseQuery(); | 40 | std::shared_ptr<DNSSDBrowseQuery> createBrowseQuery(); |
| 41 | std::shared_ptr<DNSSDRegisterQuery> createRegisterQuery( | 41 | std::shared_ptr<DNSSDRegisterQuery> createRegisterQuery( |
| 42 | const std::string& name, int port, const ByteArray& info); | 42 | const std::string& name, unsigned short port, const ByteArray& info); |
| 43 | std::shared_ptr<DNSSDResolveServiceQuery> createResolveServiceQuery( | 43 | std::shared_ptr<DNSSDResolveServiceQuery> createResolveServiceQuery( |
| 44 | const DNSSDServiceID&); | 44 | const DNSSDServiceID&); |
| 45 | std::shared_ptr<DNSSDResolveHostnameQuery> createResolveHostnameQuery( | 45 | std::shared_ptr<DNSSDResolveHostnameQuery> createResolveHostnameQuery( |
| @@ -51,7 +51,7 @@ namespace Swift { | |||
| 51 | void addService(const DNSSDServiceID& id); | 51 | void addService(const DNSSDServiceID& id); |
| 52 | void removeService(const DNSSDServiceID& id); | 52 | void removeService(const DNSSDServiceID& id); |
| 53 | void setServiceInfo(const DNSSDServiceID& id, const DNSSDResolveServiceQuery::Result& info); | 53 | void setServiceInfo(const DNSSDServiceID& id, const DNSSDResolveServiceQuery::Result& info); |
| 54 | bool isServiceRegistered(const std::string& name, int port, const ByteArray& info); | 54 | bool isServiceRegistered(const std::string& name, unsigned short port, const ByteArray& info); |
| 55 | void setAddress(const std::string& hostname, boost::optional<HostAddress> address); | 55 | void setAddress(const std::string& hostname, boost::optional<HostAddress> address); |
| 56 | 56 | ||
| 57 | void setBrowseError(); | 57 | void setBrowseError(); |
diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h index 7478841..ee6bb92 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2016 Isode Limited. | 2 | * Copyright (c) 2010-2018 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -17,7 +17,7 @@ namespace Swift { | |||
| 17 | 17 | ||
| 18 | class FakeDNSSDRegisterQuery : public DNSSDRegisterQuery, public FakeDNSSDQuery { | 18 | class FakeDNSSDRegisterQuery : public DNSSDRegisterQuery, public FakeDNSSDQuery { |
| 19 | public: | 19 | public: |
| 20 | FakeDNSSDRegisterQuery(const std::string& name, int port, const ByteArray& info, std::shared_ptr<FakeDNSSDQuerier> querier) : FakeDNSSDQuery(querier), name(name), port(port), info(info) { | 20 | FakeDNSSDRegisterQuery(const std::string& name, unsigned short port, const ByteArray& info, std::shared_ptr<FakeDNSSDQuerier> querier) : FakeDNSSDQuery(querier), name(name), port(port), info(info) { |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | void registerService() { | 23 | void registerService() { |
| @@ -33,7 +33,7 @@ namespace Swift { | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | std::string name; | 35 | std::string name; |
| 36 | int port; | 36 | unsigned short port; |
| 37 | ByteArray info; | 37 | ByteArray info; |
| 38 | }; | 38 | }; |
| 39 | } | 39 | } |
Swift