summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/DNSSDServiceID.h')
-rw-r--r--Swiften/LinkLocal/DNSSD/DNSSDServiceID.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h b/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h
index b1986d3..5243662 100644
--- a/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h
+++ b/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h
@@ -9,31 +9,31 @@ namespace Swift {
DNSSDServiceID(
const String& name,
- const String& type,
- const String& domain = PresenceServiceType,
+ const String& domain,
+ const String& type = PresenceServiceType,
int networkInterface = 0) :
name(name),
- type(type),
domain(domain),
+ type(type),
networkInterface(networkInterface) {
}
bool operator==(const DNSSDServiceID& o) const {
- return name == o.name && type == o.type && domain == o.domain && (networkInterface != 0 && o.networkInterface != 0 ? networkInterface == o.networkInterface : true);
+ return name == o.name && domain == o.domain && type == o.type && (networkInterface != 0 && o.networkInterface != 0 ? networkInterface == o.networkInterface : true);
}
bool operator<(const DNSSDServiceID& o) const {
if (o.name == name) {
- if (o.type == type) {
- if (o.domain == domain) {
+ if (o.domain == domain) {
+ if (o.type == type) {
return networkInterface < o.networkInterface;
}
else {
- return domain < o.domain;
+ return type < o.type;
}
}
else {
- return type < o.type;
+ return domain < o.domain;
}
}
else {
@@ -45,22 +45,22 @@ namespace Swift {
return name;
}
- const String& getType() const {
- return type;
- }
-
const String& getDomain() const {
return domain;
}
+ const String& getType() const {
+ return type;
+ }
+
int getNetworkInterfaceID() const {
return networkInterface;
}
private:
String name;
- String type;
String domain;
+ String type;
int networkInterface;
};
}