summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/LinkLocal/LinkLocalService.h')
-rw-r--r--Swiften/LinkLocal/LinkLocalService.h43
1 files changed, 17 insertions, 26 deletions
diff --git a/Swiften/LinkLocal/LinkLocalService.h b/Swiften/LinkLocal/LinkLocalService.h
index 446feb8..6616303 100644
--- a/Swiften/LinkLocal/LinkLocalService.h
+++ b/Swiften/LinkLocal/LinkLocalService.h
@@ -2,49 +2,40 @@
#include "Swiften/Base/String.h"
#include "Swiften/Network/HostAddress.h"
+#include "Swiften/LinkLocal/LinkLocalServiceID.h"
#include "Swiften/LinkLocal/LinkLocalServiceInfo.h"
namespace Swift {
class LinkLocalService {
public:
- LinkLocalService();
+ LinkLocalService(
+ const LinkLocalServiceID& id,
+ const DNSSDService::ResolveResult& info) :
+ id(id),
+ info(info) {}
- const String& getName() const {
- return name;
- }
-
- void setName(const String& n) {
- name = n;
- }
-
- const String& getHostname() const {
- return hostname;
+ const LinkLocalServiceID& getID() const {
+ return id;
}
- void setHostname(const String& h) {
- hostname = h;
+ const String& getName() const {
+ return id.getName();
}
- const HostAddress& getAddress() const {
- return address;
+ int getPort() const {
+ return info.port;
}
- void setAddress(const HostAddress& a) {
- address = a;
+ const String& getHostname() const {
+ return info.host;
}
const LinkLocalServiceInfo& getInfo() const {
- return info;
- }
-
- void setInfo(const LinkLocalServiceInfo& i) {
- info = i;
+ return info.info;
}
private:
- String name;
- String hostname;
- LinkLocalServiceInfo info;
- HostAddress address;
+ LinkLocalServiceID id;
+ DNSSDService::ResolveResult info;
};
}