diff options
Diffstat (limited to 'Swiften/LinkLocal/LinkLocalService.h')
-rw-r--r-- | Swiften/LinkLocal/LinkLocalService.h | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/Swiften/LinkLocal/LinkLocalService.h b/Swiften/LinkLocal/LinkLocalService.h index 07132b3..9b0e2ab 100644 --- a/Swiften/LinkLocal/LinkLocalService.h +++ b/Swiften/LinkLocal/LinkLocalService.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -7,47 +7,48 @@ #pragma once #include <string> + #include <Swiften/Base/API.h> #include <Swiften/JID/JID.h> -#include <Swiften/LinkLocal/DNSSD/DNSSDServiceID.h> #include <Swiften/LinkLocal/DNSSD/DNSSDResolveServiceQuery.h> +#include <Swiften/LinkLocal/DNSSD/DNSSDServiceID.h> #include <Swiften/LinkLocal/LinkLocalServiceInfo.h> namespace Swift { - class SWIFTEN_API LinkLocalService { - public: - LinkLocalService( - const DNSSDServiceID& id, - const DNSSDResolveServiceQuery::Result& info) : - id(id), - info(info) {} - - const DNSSDServiceID& getID() const { - return id; - } - - const std::string& getName() const { - return id.getName(); - } - - int getPort() const { - return info.port; - } - - const std::string& getHostname() const { - return info.host; - } - - LinkLocalServiceInfo getInfo() const { - return LinkLocalServiceInfo::createFromTXTRecord(info.info); - } - - std::string getDescription() const; - - JID getJID() const; - - private: - DNSSDServiceID id; - DNSSDResolveServiceQuery::Result info; - }; + class SWIFTEN_API LinkLocalService { + public: + LinkLocalService( + const DNSSDServiceID& id, + const DNSSDResolveServiceQuery::Result& info) : + id(id), + info(info) {} + + const DNSSDServiceID& getID() const { + return id; + } + + const std::string& getName() const { + return id.getName(); + } + + int getPort() const { + return info.port; + } + + const std::string& getHostname() const { + return info.host; + } + + LinkLocalServiceInfo getInfo() const { + return LinkLocalServiceInfo::createFromTXTRecord(info.info); + } + + std::string getDescription() const; + + JID getJID() const; + + private: + DNSSDServiceID id; + DNSSDResolveServiceQuery::Result info; + }; } |